From d9d124cbf0e0dc93496796076a0c89f7607200ec Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Thu, 5 Jan 2023 04:06:48 +0000 Subject: [PATCH 01/89] Admin set default reactions (#9404) Co-authored-by: ThatOneCalculator Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9404 --- CALCKEY.md | 2 ++ locales/ar-SA.yml | 1 - locales/bn-BD.yml | 1 - locales/de-DE.yml | 1 - locales/en-US.yml | 2 +- locales/es-ES.yml | 1 - locales/fr-FR.yml | 3 +- locales/id-ID.yml | 1 - locales/it-IT.yml | 1 - locales/ja-JP.yml | 1 - locales/ja-KS.yml | 1 - locales/ko-KR.yml | 1 - locales/pl-PL.yml | 1 - locales/ro-RO.yml | 1 - locales/ru-RU.yml | 1 - locales/sk-SK.yml | 1 - locales/th-TH.yml | 1 - locales/uk-UA.yml | 1 - locales/vi-VN.yml | 1 - locales/zh-CN.yml | 1 - locales/zh-TW.yml | 1 - .../1672882664294-DefaultReaction.js | 12 ++++++++ packages/backend/src/misc/reaction-lib.ts | 2 +- packages/backend/src/models/entities/meta.ts | 6 ++-- .../src/remote/activitypub/renderer/like.ts | 4 ++- .../src/server/api/endpoints/admin/meta.ts | 10 +++---- .../server/api/endpoints/admin/update-meta.ts | 6 ++-- .../backend/src/server/api/endpoints/meta.ts | 6 ++++ .../src/services/fetch-instance-metadata.ts | 13 +++++---- .../client/src/components/MkStarButton.vue | 9 ++++-- packages/client/src/instance.ts | 4 +-- packages/client/src/pages/admin/settings.vue | 29 ++++++++++++++++++- packages/client/src/pages/instance-info.vue | 3 +- 33 files changed, 81 insertions(+), 48 deletions(-) create mode 100644 packages/backend/migration/1672882664294-DefaultReaction.js diff --git a/CALCKEY.md b/CALCKEY.md index 379915f41..6a6faed2f 100644 --- a/CALCKEY.md +++ b/CALCKEY.md @@ -104,6 +104,8 @@ - Improve blocking instances - Release notes - New post style +- Admins set default reaction emoji + - Allows custom emoji - MissV: [fix Misskey Forkbomb](https://code.vtopia.live/Vtopia/MissV/commit/40b23c070bd4adbb3188c73546c6c625138fb3c1) - [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996) - [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056) diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml index da4361ef7..fc29623dd 100644 --- a/locales/ar-SA.yml +++ b/locales/ar-SA.yml @@ -556,7 +556,6 @@ tokenRequested: "منح حق الوصول إلى الحساب" pluginTokenRequestedDescription: "ستتمكن الإضافة من استخدام هذه الأذونات." notificationType: "أنواع الإشعارات" edit: "التعديل" -useStarForReactionFallback: "استخدم ★ كبديل إذا كان التفاعل مجهولًا" emailServer: "خادم البريد الإلكتروني" emailConfigInfo: "يستخدم لتأكيد عنوان بريدك الإلكتروني ولإعادة تعيين كلمة المرور إن نسيتها." email: "البريد الإلكتروني " diff --git a/locales/bn-BD.yml b/locales/bn-BD.yml index 58e03e4ba..3ed6e53aa 100644 --- a/locales/bn-BD.yml +++ b/locales/bn-BD.yml @@ -577,7 +577,6 @@ tokenRequested: "অ্যাকাউন্টে অ্যাক্সেস pluginTokenRequestedDescription: "এই প্লাগইনটি এখানে দেওয়া অনুমুতিসমূহ ব্যাবহার করবে" notificationType: "বিজ্ঞপ্তির ধরন" edit: "সম্পাদনা" -useStarForReactionFallback: "রিঅ্যাকশনের ইমোজি না জানলে ★ ব্যবহার করুন" emailServer: "ইমেইল সার্ভার" enableEmail: "ইমেইল বিতরণ চালু করুন" emailConfigInfo: "আপনার ইমেল ঠিকানা নিশ্চিত করতে এবং আপনার পাসওয়ার্ড পুনরায় সেট করতে ব্যবহৃত হয়" diff --git a/locales/de-DE.yml b/locales/de-DE.yml index cf9cc7d83..da470c294 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -581,7 +581,6 @@ tokenRequested: "Zugriff zum Benutzerkonto gewähren" pluginTokenRequestedDescription: "Dieses Plugin wird die hier konfigurierten Berechtigungen verwenden können." notificationType: "Art der Benachrichtigung" edit: "Bearbeiten" -useStarForReactionFallback: "Verwende ★ falls das Reaktions-Emoji unbekannt ist" emailServer: "Email-Server" enableEmail: "Email-Versand aktivieren" emailConfigInfo: "Zur Email-Bestätigung bei Registrierung oder zum Zurücksetzen des Passworts verwendet" diff --git a/locales/en-US.yml b/locales/en-US.yml index b6118ec29..ba39a1b29 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -583,7 +583,6 @@ tokenRequested: "Grant access to account" pluginTokenRequestedDescription: "This plugin will be able to use the permissions set here." notificationType: "Notification type" edit: "Edit" -useStarForReactionFallback: "Use ★ as fallback if the reaction emoji is unknown" emailServer: "Email server" enableEmail: "Enable email distribution" emailConfigInfo: "Used to confirm your email during sign-up or if you forget your password" @@ -930,6 +929,7 @@ moveFrom: "Move to this account from an older account" moveFromLabel: "Account you're moving from:" moveFromDescription: "This will set an alias of your old account so that you can move from that account to this current one. Do this BEFORE moving from your older account. Please enter the tag of the account formatted like @person@instance.com" migrationConfirm: "Are you absolutely sure you want to migrate your acccount to {account}? Once you do this, you won't be able to reverse it, and you won't be able to use your account normally again.\nAlso, please ensure that you've set this current account as the account you're moving from." +defaultReaction: "Default emoji reaction for outgoing and incoming posts" _sensitiveMediaDetection: description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server." diff --git a/locales/es-ES.yml b/locales/es-ES.yml index 92e305d92..1d35c878c 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -580,7 +580,6 @@ tokenRequested: "Permiso de acceso a la cuenta" pluginTokenRequestedDescription: "Este plugin podrá usar los permisos descritos aquí" notificationType: "Tipo de notificación" edit: "Editar" -useStarForReactionFallback: "En caso de que los emojis de reacciones no sean claros, usar en su lugar una estrella" emailServer: "Servidor de correo" enableEmail: "Activar el envío de correos electrónicos" emailConfigInfo: "Usar en caso de validación de correo electrónico y pedido de contraseña" diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 5c5e7089f..9f7028d3b 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -567,14 +567,13 @@ large: "Grand" medium: "Moyen" small: "Petit" generateAccessToken: "Générer un jeton d'accès" -permission: "Autorisations " +permission: "Autorisations" enableAll: "Tout activer" disableAll: "Tout désactiver" tokenRequested: "Autoriser l'accès au compte" pluginTokenRequestedDescription: "Ce plugin pourra utiliser les autorisations définies ici." notificationType: "Type de notifications" edit: "Editer" -useStarForReactionFallback: "Utiliser ★ comme alternative si l’émoji de réaction est inconnu" emailServer: "Serveur mail" enableEmail: "Activer la distribution de courriel" emailConfigInfo: "Utilisé pour confirmer votre adresse de courriel et la réinitialisation de votre mot de passe en cas d’oubli." diff --git a/locales/id-ID.yml b/locales/id-ID.yml index b83a70bc1..bb3904e2e 100644 --- a/locales/id-ID.yml +++ b/locales/id-ID.yml @@ -577,7 +577,6 @@ tokenRequested: "Berikan ijin akses ke akun" pluginTokenRequestedDescription: "Plugin ini dapat menggunakan setelan ijin disini." notificationType: "Jenis pemberitahuan" edit: "Sunting" -useStarForReactionFallback: "Gunakan ★ sebagai fallback jika reaksi emoji tidak diketahui" emailServer: "Peladen surel" enableEmail: "Nyalakan distribusi surel" emailConfigInfo: "Digunakan untuk mengonfirmasi surel kamu disaat mendaftar dan lupa kata sandi" diff --git a/locales/it-IT.yml b/locales/it-IT.yml index 9e188ae08..185d12d5a 100644 --- a/locales/it-IT.yml +++ b/locales/it-IT.yml @@ -573,7 +573,6 @@ tokenRequested: "Autorizza accesso all'account" pluginTokenRequestedDescription: "Il plugin potrà utilizzare le autorizzazioni impostate qui." notificationType: "Tipo di notifiche" edit: "Modifica" -useStarForReactionFallback: "Se è sconosciuto l'emoji di reazione, usare la ★ come alternativa." emailServer: "Server email" enableEmail: "Abilita consegna email" emailConfigInfo: "Utilizzato per verificare il tuo indirizzo di posta elettronica e per reimpostare la tua password" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ba29131a5..867331cc9 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -583,7 +583,6 @@ tokenRequested: "アカウントへのアクセス許可" pluginTokenRequestedDescription: "このプラグインはここで設定した権限を行使できるようになります。" notificationType: "通知の種類" edit: "編集" -useStarForReactionFallback: "リアクション絵文字が不明な場合、代わりに★を使う" emailServer: "メールサーバー" enableEmail: "メール配信機能を有効化する" emailConfigInfo: "メールアドレスの確認やパスワードリセットの際に使います" diff --git a/locales/ja-KS.yml b/locales/ja-KS.yml index 02d9e87bb..d5c48276f 100644 --- a/locales/ja-KS.yml +++ b/locales/ja-KS.yml @@ -579,7 +579,6 @@ tokenRequested: "アカウントへのアクセス許可" pluginTokenRequestedDescription: "このプラグインはここで設定した権限を使えるようになるで。" notificationType: "通知の種類" edit: "編集" -useStarForReactionFallback: "リアクションがようわからん場合、★を使う" emailServer: "メールサーバー" enableEmail: "メール配信を受け取る" emailConfigInfo: "メールアドレスの確認とかパスワードリセットの時に使うで" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 8b2730a94..b87a4b06c 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -580,7 +580,6 @@ tokenRequested: "계정 접근 허용" pluginTokenRequestedDescription: "이 플러그인은 여기서 설정한 권한을 사용할 수 있게 됩니다." notificationType: "알림 유형" edit: "편집" -useStarForReactionFallback: "알 수 없는 리액션 이모지 대신 ★ 사용" emailServer: "메일 서버" enableEmail: "이메일 송신 기능 활성화" emailConfigInfo: "가입 시 메일 주소 확인이나 비밀번호 초기화 시에 사용합니다." diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index ce24665e8..a7cbec5b6 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -572,7 +572,6 @@ tokenRequested: "Przydziel dostęp do konta" pluginTokenRequestedDescription: "Ta wtyczka będzie mogła korzystać z ustawionych tu uprawnień." notificationType: "Rodzaj powiadomień" edit: "Edytuj" -useStarForReactionFallback: "Użyj ★ jako zapasowego emoji, gdy emoji reakcji jest nieznane" emailServer: "Serwer poczty e-mail" enableEmail: "Włącz dostarczanie wiadomości e-mail" emailConfigInfo: "Wykorzystywany do potwierdzenia adresu e-mail w trakcie rejestracji, lub gdy zapomnisz hasła" diff --git a/locales/ro-RO.yml b/locales/ro-RO.yml index 1ccddd145..8408d4c77 100644 --- a/locales/ro-RO.yml +++ b/locales/ro-RO.yml @@ -576,7 +576,6 @@ tokenRequested: "Acordă acces la cont" pluginTokenRequestedDescription: "Acest plugin va putea să folosească permisiunile setate aici." notificationType: "Tipul notificării" edit: "Editează" -useStarForReactionFallback: "Folosește ★ ca fallback dacă emoji-ul este necunoscut" emailServer: "Server email" enableEmail: "Activează distribuția de emailuri" emailConfigInfo: "Folosit pentru a confirma emailul tău în timpul logări dacă îți uiți parola" diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index 6f985a5f6..9d76dc623 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -580,7 +580,6 @@ tokenRequested: "Открыть доступ к учётной записи" pluginTokenRequestedDescription: "Это расширение сможет пользоваться разрешениями, установленными здесь." notificationType: "Тип уведомления" edit: "Изменить" -useStarForReactionFallback: "Ставить ★ в качестве реакции вместо неизвестного эмодзи" emailServer: "Сервер электронной почты" enableEmail: "Включить обмен электронной почтой" emailConfigInfo: "Используется для подтверждения адреса электронной почты и сброса пароля." diff --git a/locales/sk-SK.yml b/locales/sk-SK.yml index 38ded0c8f..ced0d67b7 100644 --- a/locales/sk-SK.yml +++ b/locales/sk-SK.yml @@ -579,7 +579,6 @@ tokenRequested: "Povoliť prístup k účtu" pluginTokenRequestedDescription: "Tento plugin bude môcť používať oprávnenia nastavené tu." notificationType: "Typ oznámenia" edit: "Upraviť" -useStarForReactionFallback: "Použiť ★ keď emoji reakcie nie je známe" emailServer: "Email server" enableEmail: "Zapnúť email" emailConfigInfo: "Používa sa na overenie emaily pri registrácii alebo pri zabudnutí hesla" diff --git a/locales/th-TH.yml b/locales/th-TH.yml index 6f0a28b08..173548e90 100644 --- a/locales/th-TH.yml +++ b/locales/th-TH.yml @@ -580,7 +580,6 @@ tokenRequested: "ให้สิทธิ์การเข้าถึงบั pluginTokenRequestedDescription: "ปลั๊กอินนี้จะสามารถใช้การอนุญาตที่ตั้งค่าไว้ที่นี่นะ" notificationType: "ประเภทการแจ้งเตือน" edit: "แก้ไข" -useStarForReactionFallback: "ใช้ ★ เป็นทางเลือกแทนถ้าหากไม่ทราบอิโมจิ" emailServer: "อีเมล์เซิร์ฟเวอร์" enableEmail: "เปิดใช้งานการกระจายอีเมล" emailConfigInfo: "ใช้เพื่อยืนยันอีเมลของคุณระหว่างการสมัครหรือถ้าหากคุณลืมรหัสผ่าน" diff --git a/locales/uk-UA.yml b/locales/uk-UA.yml index 053827fa1..63caf22c1 100644 --- a/locales/uk-UA.yml +++ b/locales/uk-UA.yml @@ -577,7 +577,6 @@ tokenRequested: "Надати доступ до акаунту" pluginTokenRequestedDescription: "Цей плагін зможе використовувати дозволи які тут вказані." notificationType: "Тип сповіщення" edit: "Редагувати" -useStarForReactionFallback: "Використовувати ★ як запасний варіант, якщо емодзі реакції невідомий" emailServer: "Сервер електронної пошти" enableEmail: "Увімкнути функцію доставки пошти" emailConfigInfo: "Використовується для підтвердження електронної пошти підчас реєстрації, а також для відновлення паролю." diff --git a/locales/vi-VN.yml b/locales/vi-VN.yml index bd0ab3e45..4f38b80c8 100644 --- a/locales/vi-VN.yml +++ b/locales/vi-VN.yml @@ -580,7 +580,6 @@ tokenRequested: "Cấp quyền truy cập vào tài khoản" pluginTokenRequestedDescription: "Plugin này sẽ có thể sử dụng các quyền được đặt ở đây." notificationType: "Loại thông báo" edit: "Sửa" -useStarForReactionFallback: "Dùng ★ nếu emoji biểu cảm không có" emailServer: "Email máy chủ" enableEmail: "Bật phân phối email" emailConfigInfo: "Được dùng để xác minh email của bạn lúc đăng ký hoặc nếu bạn quên mật khẩu của mình" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index e4782914a..310121c5a 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -580,7 +580,6 @@ tokenRequested: "允许访问账户" pluginTokenRequestedDescription: "此插件将能够拥有此处设置的权限" notificationType: "通知类型" edit: "编辑" -useStarForReactionFallback: "如果回应的是未知表情符号,则使用★作为代替" emailServer: "邮件服务器" enableEmail: "启用发送邮件功能" emailConfigInfo: "用于确认电子邮件和密码重置" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 892cdbcf1..e7528f9a2 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -580,7 +580,6 @@ tokenRequested: "允許存取帳戶" pluginTokenRequestedDescription: "此外掛將擁有在此設定的權限。" notificationType: "通知形式" edit: "編輯" -useStarForReactionFallback: "以★代替未知的表情符號" emailServer: "電郵伺服器" enableEmail: "啟用發送電郵功能" emailConfigInfo: "用於確認電郵地址及密碼重置" diff --git a/packages/backend/migration/1672882664294-DefaultReaction.js b/packages/backend/migration/1672882664294-DefaultReaction.js new file mode 100644 index 000000000..498a1810d --- /dev/null +++ b/packages/backend/migration/1672882664294-DefaultReaction.js @@ -0,0 +1,12 @@ +export class DefaultReaction1672882664294 { + name = 'DefaultReaction1672882664294' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" ADD "defaultReaction" character varying(256) NOT NULL DEFAULT '⭐'`); + await queryRunner.query(`COMMENT ON COLUMN "meta"."defaultReaction" IS 'The fallback reaction for emoji reacts'`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "defaultReaction"`); + } +} diff --git a/packages/backend/src/misc/reaction-lib.ts b/packages/backend/src/misc/reaction-lib.ts index fefc2781f..5799fd57d 100644 --- a/packages/backend/src/misc/reaction-lib.ts +++ b/packages/backend/src/misc/reaction-lib.ts @@ -21,7 +21,7 @@ const legacies: Record = { export async function getFallbackReaction(): Promise { const meta = await fetchMeta(); - return meta.useStarForReactionFallback ? '⭐' : '👍'; + return meta.defaultReaction; } export function convertLegacyReactions(reactions: Record) { diff --git a/packages/backend/src/models/entities/meta.ts b/packages/backend/src/models/entities/meta.ts index c24936c03..46cde0505 100644 --- a/packages/backend/src/models/entities/meta.ts +++ b/packages/backend/src/models/entities/meta.ts @@ -57,10 +57,10 @@ export class Meta { }) public disableGlobalTimeline: boolean; - @Column('boolean', { - default: false, + @Column('varchar', { + length: 256, default: '⭐', }) - public useStarForReactionFallback: boolean; + public defaultReaction: string; @Column('varchar', { length: 64, array: true, default: '{}', diff --git a/packages/backend/src/remote/activitypub/renderer/like.ts b/packages/backend/src/remote/activitypub/renderer/like.ts index 12477d637..a54095139 100644 --- a/packages/backend/src/remote/activitypub/renderer/like.ts +++ b/packages/backend/src/remote/activitypub/renderer/like.ts @@ -4,16 +4,18 @@ import { NoteReaction } from '@/models/entities/note-reaction.js'; import { Note } from '@/models/entities/note.js'; import { Emojis } from '@/models/index.js'; import renderEmoji from './emoji.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; export const renderLike = async (noteReaction: NoteReaction, note: Note) => { const reaction = noteReaction.reaction; + const meta = await fetchMeta(); const object = { type: 'Like', id: `${config.url}/likes/${noteReaction.id}`, actor: `${config.url}/users/${noteReaction.userId}`, object: note.uri ? note.uri : `${config.url}/notes/${noteReaction.noteId}`, - ... (!['\u2b50', '\u1f44d'].includes(reaction) ? { + ... (!meta.defaultReaction.includes(reaction) ? { content: reaction, _misskey_reaction: reaction, } : {}), diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index 71a217d93..c6b6a3cd9 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -159,10 +159,6 @@ export const meta = { type: 'string', optional: false, nullable: true, }, - userStarForReactionFallback: { - type: 'boolean', - optional: true, nullable: false, - }, recommendedInstances: { type: 'array', optional: true, nullable: false, @@ -368,6 +364,10 @@ export const meta = { type: 'boolean', optional: true, nullable: false, }, + defaultReaction: { + type: 'string', + optional: false, nullable: false, + }, }, }, } as const; @@ -425,7 +425,7 @@ export default define(meta, paramDef, async (ps, me) => { pinnedPages: instance.pinnedPages, pinnedClipId: instance.pinnedClipId, cacheRemoteFiles: instance.cacheRemoteFiles, - useStarForReactionFallback: instance.useStarForReactionFallback, + defaultReaction: instance.defaultReaction, recommendedInstances: instance.recommendedInstances, pinnedUsers: instance.pinnedUsers, customMOTD: instance.customMOTD, diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 61a1338f2..3efacdf50 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -18,7 +18,7 @@ export const paramDef = { disableLocalTimeline: { type: 'boolean', nullable: true }, disableRecommendedTimeline: { type: 'boolean', nullable: true }, disableGlobalTimeline: { type: 'boolean', nullable: true }, - useStarForReactionFallback: { type: 'boolean', nullable: true }, + defaultReaction: { type: 'string', nullable: true }, recommendedInstances: { type: 'array', nullable: true, items: { type: 'string', } }, @@ -141,8 +141,8 @@ export default define(meta, paramDef, async (ps, me) => { set.disableGlobalTimeline = ps.disableGlobalTimeline; } - if (typeof ps.useStarForReactionFallback === 'boolean') { - set.useStarForReactionFallback = ps.useStarForReactionFallback; + if (typeof ps.defaultReaction === 'string') { + set.defaultReaction = ps.defaultReaction; } if (Array.isArray(ps.pinnedUsers)) { diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index f61236fa0..3e3288d6d 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -309,6 +309,11 @@ export const meta = { optional: true, nullable: false, default: false, }, + defaultReaction: { + type: 'string', + optional: 'false', nullable: false, + default: '⭐', + }, }, }, } as const; @@ -401,6 +406,7 @@ export default define(meta, paramDef, async (ps, me) => { enableServiceWorker: instance.enableServiceWorker, translatorAvailable: instance.deeplAuthKey != null, + defaultReaction: instance.defaultReaction, ...(ps.detail ? { pinnedPages: instance.privateMode && !me ? [] : instance.pinnedPages, diff --git a/packages/backend/src/services/fetch-instance-metadata.ts b/packages/backend/src/services/fetch-instance-metadata.ts index 4bf101bb4..d3f674d6f 100644 --- a/packages/backend/src/services/fetch-instance-metadata.ts +++ b/packages/backend/src/services/fetch-instance-metadata.ts @@ -1,12 +1,13 @@ -import { DOMWindow, JSDOM } from 'jsdom'; +import { URL } from 'node:url'; +import { JSDOM } from 'jsdom'; import fetch from 'node-fetch'; import tinycolor from 'tinycolor2'; import { getJson, getHtml, getAgentByUrl } from '@/misc/fetch.js'; -import { Instance } from '@/models/entities/instance.js'; +import type { Instance } from '@/models/entities/instance.js'; import { Instances } from '@/models/index.js'; import { getFetchInstanceMetadataLock } from '@/misc/app-lock.js'; import Logger from './logger.js'; -import { URL } from 'node:url'; +import type { DOMWindow } from 'jsdom'; const logger = new Logger('metadata', 'cyan'); @@ -198,7 +199,7 @@ async function fetchIconUrl(instance: Instance, doc: DOMWindow['document'] | nul links.find(link => link.relList.contains('apple-touch-icon'))?.href, links.find(link => link.relList.contains('icon'))?.href, ] - .find(href => href); + .find(href => href); if (href) { return (new URL(href, url)).href; @@ -235,7 +236,7 @@ async function getSiteName(info: NodeInfo | null, doc: DOMWindow['document'] | n } if (manifest) { - return manifest?.name || manifest?.short_name; + return manifest.name || manifest.short_name; } return null; @@ -261,7 +262,7 @@ async function getDescription(info: NodeInfo | null, doc: DOMWindow['document'] } if (manifest) { - return manifest?.name || manifest?.short_name; + return manifest.name || manifest.short_name; } return null; diff --git a/packages/client/src/components/MkStarButton.vue b/packages/client/src/components/MkStarButton.vue index 5d4778751..9a0cca414 100644 --- a/packages/client/src/components/MkStarButton.vue +++ b/packages/client/src/components/MkStarButton.vue @@ -1,12 +1,14 @@ @@ -17,6 +19,7 @@ import { pleaseLogin } from '@/scripts/please-login'; import * as os from '@/os'; import { defaultStore } from '@/store'; import { i18n } from '@/i18n'; +import { instance } from '@/instance'; const props = defineProps<{ note: Note; @@ -26,7 +29,7 @@ function star(ev?: MouseEvent): void { pleaseLogin(); os.api('notes/reactions/create', { noteId: props.note.id, - reaction: defaultStore.state.woozyMode === true ? '🥴' : '⭐', + reaction: defaultStore.state.woozyMode === true ? '🥴' : instance.defaultReaction, }); const el = ev && (ev.currentTarget ?? ev.target) as HTMLElement | null | undefined; if (el) { diff --git a/packages/client/src/instance.ts b/packages/client/src/instance.ts index dfa088d11..e9f5122e9 100644 --- a/packages/client/src/instance.ts +++ b/packages/client/src/instance.ts @@ -1,6 +1,6 @@ import { computed, reactive } from 'vue'; -import * as Misskey from 'calckey-js'; import { api } from './os'; +import type * as Misskey from 'calckey-js'; // TODO: 他のタブと永続化されたstateを同期 @@ -14,7 +14,7 @@ export const instance: Misskey.entities.InstanceMetadata = reactive(instanceData export async function fetchInstance() { const meta = await api('meta', { - detail: false + detail: false, }); for (const [k, v] of Object.entries(meta)) { diff --git a/packages/client/src/pages/admin/settings.vue b/packages/client/src/pages/admin/settings.vue index 171590813..83eb12730 100644 --- a/packages/client/src/pages/admin/settings.vue +++ b/packages/client/src/pages/admin/settings.vue @@ -58,6 +58,24 @@ {{ i18n.ts.disablingTimelinesInfo }} + + + + + + + + + + @@ -175,7 +193,7 @@ diff --git a/packages/client/src/pages/welcome.entrance.c.vue b/packages/client/src/pages/welcome.entrance.c.vue index 0b35a2253..7567fa408 100644 --- a/packages/client/src/pages/welcome.entrance.c.vue +++ b/packages/client/src/pages/welcome.entrance.c.vue @@ -58,12 +58,12 @@ diff --git a/packages/client/src/ui/_common_/navbar-for-mobile.vue b/packages/client/src/ui/_common_/navbar-for-mobile.vue index 6f6fdb8ab..5374e67c9 100644 --- a/packages/client/src/ui/_common_/navbar-for-mobile.vue +++ b/packages/client/src/ui/_common_/navbar-for-mobile.vue @@ -99,7 +99,7 @@ function openInstanceMenu(ev: MouseEvent) { text: i18n.ts.document, icon: 'ph-question-bold ph-lg', action: () => { - window.open('https://misskey-hub.net/help.html', '_blank'); + window.open('/api-doc', '_blank'); }, }], }, { diff --git a/packages/client/src/ui/visitor/a.vue b/packages/client/src/ui/visitor/a.vue index 1be716335..593ff6ea3 100644 --- a/packages/client/src/ui/visitor/a.vue +++ b/packages/client/src/ui/visitor/a.vue @@ -125,7 +125,9 @@ export default defineComponent({ }, help() { - window.open('https://misskey-hub.net/docs/keyboard-shortcut.md', '_blank'); + // TODO(thatonecalculator): popup with keybinds + // window.open('https://misskey-hub.net/docs/keyboard-shortcut.md', '_blank'); + console.log('d = dark/light mode, s = search, p = post :3'); }, }, }); From bfa808f70de93c7a9d8ec70b4b918c4b79bfc30d Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 11:41:58 -0800 Subject: [PATCH 20/89] locale: sync panos's greek translation --- locales/el-GR.yml | 408 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 408 insertions(+) create mode 100644 locales/el-GR.yml diff --git a/locales/el-GR.yml b/locales/el-GR.yml new file mode 100644 index 000000000..d32dd9c72 --- /dev/null +++ b/locales/el-GR.yml @@ -0,0 +1,408 @@ +--- +_lang_: "Ελληνικά" +monthAndDay: "{μήνας}/{ημέρα}" +search: "Αναζήτηση" +notifications: "Ειδοποιήσεις" +username: "Όνομα μέλους" +password: "Κωδικός πρόσβασης" +forgotPassword: "Ξέχασα τον κωδικό πρόσβασης" +fetchingAsApObject: "Μαζεύοντας από το Fediverse..." +ok: "Εντάξει" +gotIt: "Τό'πιασα!" +cancel: "Ακύρωση" +enterUsername: "Εισάγετε το όνομα μέλους" +renotedBy: "Κοινοποιήθηκε από {user}" +noNotes: "Δεν υπάρχουν σημειώματα" +noNotifications: "Δεν υπάρχουν ειδοποιήσεις" +settings: "Ρυθμίσεις" +basicSettings: "Βασικές ρυθμίσεις" +otherSettings: "Άλλες ρυθμίσεις" +openInWindow: "Άνοιγμα σε παράθυρο" +profile: "Προφίλ" +timeline: "Χρονολόγιο" +noAccountDescription: "Αυτό το μέλος δεν έχει γράψει βιογραφικό ακόμη." +login: "Σύνδεση" +loggingIn: "Συνδέεστε" +logout: "Αποσύνδεση" +signup: "Δημιουργία λογαριασμού" +uploading: "Ανέβασμα..." +save: "Αποθήκευση" +users: "Μέλη" +addUser: "Προσθήκη μέλους" +favorite: "Προσθήκη στα αγαπημένα" +favorites: "Αγαπημένα" +unfavorite: "Αφαίρεση από αγαπημένα" +favorited: "Προστέθηκε στα αγαπημένα." +alreadyFavorited: "Έχει ήδη προστεθεί στα αγαπημένα." +cantFavorite: "Αδυναμία προσθήκης στα αγαπημένα." +pin: "Καρφίτσωμα στο προφίλ" +unpin: "Ξεκαρφίτσωμα από το προφίλ" +copyContent: "Αντιγραφή περιεχομένων" +copyLink: "Αντιγραφή συνδέσμου" +delete: "Διαγραφή" +deleteAndEdit: "Διαγραφή και επεξεργασία" +deleteAndEditConfirm: "Σίγουρα θέλετε να διαγράψετε αυτό το σημείωμα και να το επεξεργαστείτε; Θα χάσετε όλες τις αντιδράσεις, κοινοποιήσεις και απαντήσεις σε αυτό." +addToList: "Προσθήκη στη λίστα" +sendMessage: "Αποστολή μηνύματος" +copyUsername: "Αντιγραφή ονόματος μέλους" +searchUser: "Αναζήτηση μέλους" +reply: "Απάντηση" +loadMore: "Φόρτωσε περισσότερα" +showMore: "Δείξε περισσότερα" +showLess: "Κλείσιμο" +youGotNewFollower: "σε ακολούθησε" +receiveFollowRequest: "Λάβατε αίτημα ακολούθησης" +followRequestAccepted: "Το αίτημα ακολούθησης έγινε δεκτό" +mention: "Επισήμανση" +mentions: "Επισημάνσεις" +directNotes: "Απευθείας σημειώματα" +importAndExport: "Εισαγωγή / Εξαγωγή" +import: "Εισαγωγή" +export: "Εξαγωγή" +files: "Αρχεία" +download: "Λήψη" +driveFileDeleteConfirm: "Θέλετε σίγουρα να διαγράψετε το αρχείο \"{name}\"; Τα σημειώματα με αυτό το συνημμένο αρχείο επίσης θα διαγραφούν." +unfollowConfirm: "Θέλετε σίγουρα να σταματήσετε να ακολουθείτε το μέλος {name};" +exportRequested: "Ζητήσατε μία εξαγωγή. Αυτό μπορεί να πάρει κάποιον χρόνο. Επίσης θα προστεθεί στον Δίσκο σας μόλις ολοκληρωθεί." +importRequested: "Ζητήσατε μία εισαγωγή. Αυτό μπορεί να πάρει κάποιον χρόνο." +lists: "Λίστες" +noLists: "Δεν έχετε λίστες" +note: "Σημείωμα" +notes: "Σημειώματα" +following: "Ακολουθεί" +followers: "Ακολουθούν" +followsYou: "Σε ακολουθεί" +createList: "Δημιουργία λίστας" +manageLists: "Διαχείριση λιστών" +error: "Σφάλμα" +somethingHappened: "Προέκυψε ένα σφάλμα" +retry: "Προσπάθεια ξανά" +pageLoadError: "Ένα σφάλμα προέκυψε φορτώνοντας τη σελίδα." +pageLoadErrorDescription: "Αυτό κανονικά προκαλείται από σφάλματα δικτύου ή από την προσωρινή μνήμη του προγράμματος περιήγησης. Δοκιμάστε να σβήσετε την προσωρινή μνήμη (cache) και ξαναδοκιμάστε μετά από λίγο." +serverIsDead: "Αυτός ο server δεν αποκρίνεται. Παρακαλώ περιμέντε λίγο και δοκιμάστε ξανά." +youShouldUpgradeClient: "Για να δείτε αυτή τη σελίδα, παρακαλώ επαναφορτώστε για να ενημερωθεί το πρόγραμμα." +enterListName: "Πληκτρολογήστε ένα όνομα για τη λίστα" +privacy: "Ιδιωτικότητα" +makeFollowManuallyApprove: "Τα αιτήματα ακολούθησης χρειάζονται έγκριση" +defaultNoteVisibility: "Προεπιλεγμένη ορατότητα" +follow: "Ακολουθήστε" +followRequest: "Στείλτε αίτημα ακολούθησης" +followRequests: "Αιτήματα ακολούθησης" +unfollow: "Να μην ακολουθώ" +followRequestPending: "Το αίτημα ακολούθησης εκκρεμεί" +enterEmoji: "Εισάγετε ένα emoji" +renote: "Κοινοποίηση σημειώματος" +unrenote: "Ακύρωση κοινοποίησης" +renoted: "Κοινοποιήθηκε." +cantRenote: "Αυτή η δημοσίευση δεν μπορεί να κοινοποιηθεί." +cantReRenote: "Μία κοινοποίηση δεν μπορεί να κοινοποιηθεί." +quote: "Παράθεση" +pinnedNote: "Καρφιτσωμένο σημείωμα" +pinned: "Καρφίτσωμα στο προφίλ" +you: "Εσύ" +clickToShow: "Κάντε κλικ για εμφάνιση" +add: "Προσθέστε" +reaction: "Αντιδράσεις" +reactionSetting: "Αντιδράσεις για εμφάνιση στην επιλογή αντίδρασης" +reactionSettingDescription2: "Σύρετε για να αλλάξετε τη σειρά, κάντε κλικ για να διαγράψετε, πατήστε \"+\" για να προσθέσετε." +rememberNoteVisibility: "Θυμήσου τις ρυθμίσεις ορατότητας σημειώματος" +attachCancel: "Διαγραφή αρχείου" +enterFileName: "Πληκτρολογήστε όνομα αρχείου" +mute: "Σίγαση" +unmute: "Άρση σίγασης" +block: "Μπλοκάρισμα" +unblock: "Άρση μπλοκαρίσματος" +suspend: "Αποβολή" +unsuspend: "Άρση αποβολής" +blockConfirm: "Θέλετε σίγουρα να μπλοκάρετε αυτόν τον λογαριασμό;" +unblockConfirm: "Θέλετε σίγουρα να ξεμπλοκάρετε αυτόν τον λογαριασμό;" +suspendConfirm: "Θέλετε σίγουρα να αποβάλλετε αυτόν τον λογαριασμό;" +unsuspendConfirm: "Θέλετε σίγουρα να άρετε την αποβολή αυτού του λογαριασμού;" +selectList: "Επιλέξτε μία λίστα" +selectAntenna: "Επιλέξτε μία αντένα" +selectWidget: "Επιλέξτε ένα μαραφέτι" +editWidgets: "Επεξεργασία μαραφετίων" +editWidgetsExit: "Ολοκληρώθηκε" +customEmojis: "Επιπλέον emoji" +emojiName: "Όνομα emoji" +addEmoji: "Προσθήκη emoji" +settingGuide: "Συνιστώμενες ρυθμίσεις" +flagAsBot: "Αυτός ο λογαριασμός είναι bot" +flagAsCat: "Αυτός ο λογαριασμός είναι γάτα" +flagShowTimelineReplies: "Εμφάνιση απαντήσεων στο χρονολόγιο" +addAccount: "Προσθήκη λογαριασμού" +general: "Γενικές" +wallpaper: "Ταπετσαρία" +setWallpaper: "Ορισμός ταπετσαρίας" +removeWallpaper: "Διαγραφή ταπετσαρίας" +searchWith: "Αναζήτηση: {q}" +youHaveNoLists: "Δεν έχετε λίστες" +followConfirm: "Θέλετε σίγουρα να ακολουθήσετε τον λογαριασμό {name};" +host: "Φιλοξενεί" +selectUser: "Επιλέξτε ένα μέλος" +recipient: "Αποδέκτης-τρια" +annotation: "Σχόλια" +federation: "Ομοσπονδία" +storageUsage: "Χρήση χώρου" +version: "Έκδοση" +metadata: "Μεταδεδομένα" +network: "Δίκτυο" +disk: "Δίσκος" +instanceInfo: "Πληροφορίες του instance" +statistics: "Στατιστικά" +clearQueue: "Εκκαθάριση ουράς" +clearQueueConfirmTitle: "Θέλετε να διαγράψετε την ουρά;" +clearCachedFiles: "Εκκαθάριση προσωρινής μνήμης" +done: "Ολοκληρώθηκε" +attachFile: "Επισύναψη αρχείων" +more: "Περισσότερα!" +noSuchUser: "Το μέλος δεν βρέθηκε" +announcements: "Ανακοινώσεις" +imageUrl: "URL εικόνας" +remove: "Διαγραφή" +removed: "Η διαγραφή ολοκληρώθηκε επιτυχώς" +saved: "Αποθηκεύτηκε" +messaging: "Συνομιλία" +upload: "Ανεβάστε" +fromDrive: "Από τον Αποθηκευτικό Χώρο" +fromUrl: "Από URL" +uploadFromUrl: "Ανεβάστε από URL" +explore: "Εξερευνήστε" +messageRead: "Διαβάστηκε" +startMessaging: "Ξεκινήστε μία συνομιλία" +nUsersRead: "διαβάστηκε από {n}" +tos: "Όροι χρήσης" +start: "Ας αρχίσουμε" +home: "Κεντρικό" +activity: "Δραστηριότητα" +images: "Εικόνες" +birthday: "Γενέθλια" +registeredDate: "Έγινε μέλος στις" +location: "Τοποθεσία" +theme: "Θέματα" +light: "Ανοιχτόχρωμο" +dark: "Σκούρο" +drive: "Αποθηκευτικός Χώρος" +fileName: "Όνομα αρχείου" +selectFile: "Επιλέξτε ένα αρχείο" +selectFiles: "Επιλέξτε αρχεία" +selectFolder: "Επιλέξτε φάκελο" +selectFolders: "Επιλέξτε φακέλους" +renameFile: "Μετονομασία αρχείου" +addFile: "Προσθήκη αρχείου" +emptyDrive: "Ο Αποθηκευτικός Χώρος σας είναι άδειος" +copyUrl: "Αντιγραφή URL" +rename: "Αλλαγή ονόματος" +avatar: "Εικονίδιο" +banner: "Πανό" +reload: "Ανανέωση" +doNothing: "Αγνόηση" +watch: "Παρακολούθηση" +unwatch: "Τέλος παρακολούθησης" +accept: "Αποδοχή" +reject: "Απόρριψη" +normal: "Κανονικό" +instanceName: "Όνομα instance" +thisYear: "Έτος" +thisMonth: "Μήνας" +today: "Σήμερα" +dayX: "{day}" +pages: "Σελίδες" +connectService: "Σύνδεση" +disconnectService: "Αποσύνδεση" +registration: "Εγγραφή" +pinnedPages: "Καρφιτσωμένες Σελίδες" +pinnedNotes: "Καρφιτσωμένα σημειώματα" +antennas: "Αντένες" +manageAntennas: "Διαχείριση αντενών" +name: "Όνομα" +antennaSource: "Πηγή αντένας" +antennaKeywords: "Λέξεις-κλειδιά για παρακολούθηση" +antennaExcludeKeywords: "Λέξεις-κλειδιά για αποκλεισμό" +notifyAntenna: "Ειδοποίηση για νέα σημειώματα" +withFileAntenna: "Μόνο σημειώματα με αρχεία" +caseSensitive: "Διάκριση Πεζών-Κεφαλαίων" +popularTags: "Δημοφιλείς ετικέτες" +userList: "Λίστες" +about: "Πληροφορίες" +moderator: "Συντονιστής" +moderation: "Συντονισμός" +cacheClear: "Εκκαθάριση προσωρινής μνήμης" +markAsReadAllNotifications: "Όλες οι ειδοποιήσεις διαβάστηκαν" +group: "Ομάδα" +groups: "Ομάδες" +createGroup: "Δημιουργία ομάδας" +ownedGroups: "Οι ομάδες σας" +groupName: "Όνομα ομάδας" +members: "Μέλη" +transfer: "Μεταφορά" +messagingWithUser: "Ιδιωτική συνομιλία" +messagingWithGroup: "Ομαδική συνομιλία" +title: "Τίτλος" +text: "Κείμενο" +enable: "Ενεργοποίηση" +next: "Επόμενο" +noteOf: "Σημείωμα από {user}" +inviteToGroup: "Πρόσκληση στην ομάδα" +quoteAttached: "Παράθεση" +signinRequired: "Παρακαλούμε δημιουργήστε λογαριασμό ή συνδεθείτε πριν συνεχίσετε" +category: "Κατηγορία" +tags: "Ετικέτες" +createAccount: "Δημιουργία λογαριασμού" +local: "Τοπικό" +remote: "Απομακρυσμένo" +total: "Σύνολο" +appearance: "Εμφάνιση" +accountSettings: "Ρυθμίσεις λογαριασμού" +sounds: "Ήχοι" +sound: "Ήχοι" +listen: "Ακρόαση" +showInPage: "Εμφάνιση στη σελίδα" +volume: "Ένταση" +masterVolume: "Κύρια ένταση" +details: "Λεπτομέρειες" +install: "Εγκατάσταση" +uninstall: "Κατάργηση εγκατάστασης" +manage: "Διαχείριση" +smtpHost: "Φιλοξενεί" +smtpUser: "Όνομα μέλους" +smtpPass: "Κωδικός πρόσβασης" +notificationSetting: "Ρυθμίσεις ειδοποιήσεων" +notificationSettingDesc: "Επιλέξτε τους τύπους ειδοποιήσεων που εμφανίζονται" +switchUi: "Αλλαγή UI" +clip: "Κλιπ" +driveFilesCount: "Αριθμός αρχείων Αποθηκευτικού Χώρου" +driveUsage: "Χρήση Αποθηκευτικού Χώρου" +noteFavoritesCount: "Αριθμός αγαπημένων σημειωμάτων" +clips: "Κλιπ" +clearCache: "Εκκαθάριση προσωρινής μνήμης" +emailNotification: "Ειδοποιήσεις μέσω mail" +inChannelSearch: "Αναζήτηση στο κανάλι" +info: "Πληροφορίες" +notRecommended: "Δεν προτείνεται" +switchAccount: "Αλλαγή λογαριασμού" +user: "Μέλη" +administration: "Διαχείριση" +switch: "Εναλλαγή" +gallery: "Γκαλερί" +global: "Παγκόσμιο" +searchResult: "Αποτελέσματα αναζήτησης" +learnMore: "Μάθετε περισσότερα" +controlPanel: "Πίνακας ελέγχου" +manageAccounts: "Διαχείριση Λογαριασμών" +searchByGoogle: "Αναζήτηση" +file: "Αρχεία" +recommended: "Προτεινόμενα" +cannotUploadBecauseNoFreeSpace: "Το ανέβασμα απέτυχε λόγω ανεπαρκούς Αποθηκευτικού Χώρου" +_email: + _follow: + title: "Έχετε ένα νέο ακόλουθο" +_mfm: + mention: "Επισήμανση" + quote: "Παράθεση" + emoji: "Επιπλέον emoji" + search: "Αναζήτηση" +_channel: + featured: "Δημοφιλή" +_theme: + keys: + panel: "Πίνακας" + mention: "Επισήμανση" + renote: "Κοινοποίηση σημειώματος" +_sfx: + note: "Σημειώματα" + notification: "Ειδοποιήσεις" + chat: "Συνομιλία" + chatBg: "Συνομιλία (Παρασκήνιο)" + antenna: "Αντένες" + channel: "Ειδοποιήσεις καναλιών" +_ago: + future: "Μελλοντικό" + justNow: "Μόλις τώρα" + secondsAgo: "{n} δευτερόλεπτο(α) πριν" + minutesAgo: "{n} λεπτό(ά) πριν" + hoursAgo: "{n} ώρα(ες) πριν" + daysAgo: "{n} μέρα(ες) πριν" + weeksAgo: "{n} εβδομάδα(ες) πριν" + monthsAgo: "{n} μήνα(ες) πριν" + yearsAgo: "{n} έτος(η) πριν" +_permissions: + "write:drive": "Επεξεργαστείτε ή διαγράψτε τα αρχεία και τους φακέλους του Αποθηκευτικού Χώρου σας" + "read:favorites": "Δείτε τη λίστα των αγαπημένων σας" + "write:favorites": "Επεξεργαστείτε τη λίστα των αγαπημένων σας" + "read:messaging": "Δείτε τις συνομιλίες σας" + "write:messaging": "Γράψτε ή διαγράψτε μηνύματα συνομιλίας" + "read:notifications": "Δείτε τις ειδοποιήσεις σας" + "write:notifications": "Διαχειριστείτε τις ειδοποιήσεις σας" + "read:pages": "Δείτε τις Σελίδες σας" + "write:pages": "Επεξεργαστείτε ή διαγράψτε τις σελίδες σας" +_antennaSources: + all: "Όλα τα σημειώματα" + homeTimeline: "Σημειώματα από μέλη που ακολουθείτε" + users: "Σημειώματα από συγκεκριμένα μέλη" + userList: "Σημειώματα από καθορισμένη λίστα μελών" + userGroup: "Σημειώματα από μέλη καθορισμένης ομάδας" +_widgets: + profile: "Προφίλ" + instanceInfo: "Πληροφορίες του instance" + notifications: "Ειδοποιήσεις" + timeline: "Χρονολόγιο" + calendar: "Ημερολόγιο" + trends: "Δημοφιλή" + clock: "Ρολόι" + activity: "Δραστηριότητα" + photos: "Φωτογραφίες" + digitalClock: "Ψηφιακό ρολόι" + federation: "Ομοσπονδία" + postForm: "Φόρμα δημοσίευσης" + button: "Κουμπί" + onlineUsers: "Συνδεδεμένα μέλη" + _userList: + chooseList: "Επιλέξτε μία λίστα" +_cw: + show: "Δείτε περισσότερα" +_visibility: + home: "Κεντρικό" + homeDescription: "Δημοσίευση στο κεντρικό χρονολόγιο μόνο" + followers: "Ακολουθούν" +_profile: + name: "Όνομα" + username: "Όνομα μέλους" +_exportOrImport: + allNotes: "Όλα τα σημειώματα" + followingList: "Ακολουθεί" + muteList: "Μέλη σε σίγαση" + blockingList: "Μπλοκαρισμένα μέλη" + userLists: "Λίστες" +_charts: + federation: "Ομοσπονδία" +_timelines: + home: "Κεντρικό" + local: "Τοπικό" + social: "Κοινωνικό" + global: "Παγκόσμιο" +_pages: + viewPage: "Δείτε τις Σελίδες σας" + blocks: + image: "Εικόνες" +_notification: + youGotMessagingMessageFromUser: "{name} σάς έστειλε ένα μήνυμα συνομιλίας" + youWereFollowed: "σε ακολούθησε" + _types: + follow: "Νέοι ακόλουθοι" + mention: "Επισήμανση" + renote: "Κοινοποίηση σημειώματος" + quote: "Παράθεση" + reaction: "Αντιδράσεις" + _actions: + reply: "Απάντηση" + renote: "Κοινοποίηση σημειώματος" +_deck: + widgetsIntroduction: "Παρακαλούμε επιλέξτε \"Επεξεργασία μαραφετίων\" στο μενού και προσθέστε μαραφέτι." + _columns: + widgets: "Μαραφέτια" + notifications: "Ειδοποιήσεις" + tl: "Χρονολόγιο" + antenna: "Αντένες" + list: "Λίστα" + mentions: "Επισημάνσεις" From d892cd57a95a81328630ce1575f489eb8f702f95 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 14:03:39 -0800 Subject: [PATCH 21/89] revert: index.ts to test share embed fix --- packages/backend/src/server/web/index.ts | 107 +++++++---------------- 1 file changed, 34 insertions(+), 73 deletions(-) diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 446df1554..ee0359e19 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -22,11 +22,11 @@ import { Users, Notes, UserProfiles, Pages, Channels, Clips, GalleryPosts } from import * as Acct from '@/misc/acct.js'; import { getNoteSummary } from '@/misc/get-note-summary.js'; import { queues } from '@/queue/queues.js'; +import { MINUTE, DAY } from '@/const.js'; import { genOpenapiSpec } from '../api/openapi/gen-spec.js'; import { urlPreviewHandler } from './url-preview.js'; import { manifestHandler } from './manifest.js'; import packFeed from './feed.js'; -import { MINUTE, DAY } from '@/const.js'; const _filename = fileURLToPath(import.meta.url); const _dirname = dirname(_filename); @@ -185,8 +185,8 @@ router.get('/twemoji-badge/(.*)', async ctx => { }); // ServiceWorker -router.get(`/sw.js`, async ctx => { - await send(ctx as any, `/sw.js`, { +router.get('/sw.js', async ctx => { + await send(ctx as any, '/sw.js', { root: swAssets, maxage: 10 * MINUTE, }); @@ -232,43 +232,8 @@ const getFeed = async (acct: string) => { return user && await packFeed(user); }; -// As the /@user[.json|.rss|.atom]/sub endpoint is complicated, we will use a regex to switch between them. -const reUser = new RegExp(`^/@(?[^/]+?)(?:\.(?json|rss|atom))?(?:/(?[^/]+))?$`); -router.get(reUser, async (ctx, next) => { - const groups = reUser.exec(ctx.originalUrl)?.groups; - if (!groups) { - await next(); - return; - } - - ctx.params = groups; - - console.log(ctx, ctx.params) - if (groups.feed) { - if (groups.sub) { - await next(); - return; - } - - switch (groups.feed) { - case 'json': - await jsonFeed(ctx, next); - break; - case 'rss': - await rssFeed(ctx, next); - break; - case 'atom': - await atomFeed(ctx, next); - break; - } - return; - } - - await userPage(ctx, next); -}); - // Atom -const atomFeed: Router.Middleware = async ctx => { +router.get('/@:user.atom', async ctx => { const feed = await getFeed(ctx.params.user); if (feed) { @@ -277,10 +242,10 @@ const atomFeed: Router.Middleware = async ctx => { } else { ctx.status = 404; } -}; +}); // RSS -const rssFeed: Router.Middleware = async ctx => { +router.get('/@:user.rss', async ctx => { const feed = await getFeed(ctx.params.user); if (feed) { @@ -289,10 +254,10 @@ const rssFeed: Router.Middleware = async ctx => { } else { ctx.status = 404; } -}; +}); // JSON -const jsonFeed: Router.Middleware = async ctx => { +router.get('/@:user.json', async ctx => { const feed = await getFeed(ctx.params.user); if (feed) { @@ -301,47 +266,43 @@ const jsonFeed: Router.Middleware = async ctx => { } else { ctx.status = 404; } -}; +}); //#region SSR (for crawlers) // User -const userPage: Router.Middleware = async (ctx, next) => { - const userParam = ctx.params.user; - const subParam = ctx.params.sub; - const { username, host } = Acct.parse(userParam); - +router.get(['/@:user', '/@:user/:sub'], async (ctx, next) => { + const { username, host } = Acct.parse(ctx.params.user); const user = await Users.findOneBy({ usernameLower: username.toLowerCase(), host: host ?? IsNull(), isSuspended: false, }); - if (user === null) { + if (user != null) { + const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); + const meta = await fetchMeta(); + const me = profile.fields + ? profile.fields + .filter(filed => filed.value != null && filed.value.match(/^https?:/)) + .map(field => field.value) + : []; + + await ctx.render('user', { + user, profile, me, + avatarUrl: await Users.getAvatarUrl(user), + sub: ctx.params.sub, + instanceName: meta.name || 'Calckey', + icon: meta.iconUrl, + themeColor: meta.themeColor, + privateMode: meta.privateMode, + }); + ctx.set('Cache-Control', 'public, max-age=15'); + } else { + // リモートユーザーなので + // モデレータがAPI経由で参照可能にするために404にはしない await next(); - return; } - - const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); - const meta = await fetchMeta(); - const me = profile.fields - ? profile.fields - .filter(filed => filed.value != null && filed.value.match(/^https?:/)) - .map(field => field.value) - : []; - - const userDetail = { - user, profile, me, - avatarUrl: await Users.getAvatarUrl(user), - sub: subParam, - instanceName: meta.name || 'Calckey', - icon: meta.iconUrl, - themeColor: meta.themeColor, - privateMode: meta.privateMode, - }; - - await ctx.render('user', userDetail); - ctx.set('Cache-Control', 'public, max-age=15'); -}; +}); router.get('/users/:user', async ctx => { const user = await Users.findOneBy({ From 8ab30f125c6071b0c2551ee42ef35fc835f8a198 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 14:14:40 -0800 Subject: [PATCH 22/89] revert: koa/router --- packages/backend/package.json | 2 +- packages/backend/src/server/web/views/base.pug | 8 ++++---- yarn.lock | 11 ++++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index cb7314de9..ba6a8ca8c 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -29,7 +29,7 @@ "@elastic/elasticsearch": "7.17.0", "@koa/cors": "3.4.3", "@koa/multer": "3.0.0", - "@koa/router": "9.4.0", + "@koa/router": "9.0.1", "@peertube/http-signature": "1.7.0", "@sinonjs/fake-timers": "9.1.2", "@syuilo/aiscript": "0.11.1", diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 25c2cb38e..709729589 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -50,16 +50,16 @@ html = title || 'Calckey' block desc - meta(name='description' content= desc || '✨🌎✨ A interplanetary communication platform ✨🚀✨') + meta(name='description' content=desc || 'An open source, decentralized social media platform that\'s free forever! 🚀') block meta if privateMode meta(name='robots' content='noindex') block og - meta(property='og:title' content= title || 'Calckey') - meta(property='og:description' content= desc || '✨🌎 A interplanetary communication platform 🚀✨') - meta(property='og:image' content= img) + meta(property='og:title' content=title || 'Calckey') + meta(property='og:description' content=desc || 'An open source, decentralized social media platform that\'s free forever! 🚀') + meta(property='og:image' content=img) style include ../style.css diff --git a/yarn.lock b/yarn.lock index 2e67561e5..fd95f4258 100644 --- a/yarn.lock +++ b/yarn.lock @@ -705,16 +705,16 @@ __metadata: languageName: node linkType: hard -"@koa/router@npm:9.4.0": - version: 9.4.0 - resolution: "@koa/router@npm:9.4.0" +"@koa/router@npm:9.0.1": + version: 9.0.1 + resolution: "@koa/router@npm:9.0.1" dependencies: debug: ^4.1.1 http-errors: ^1.7.3 koa-compose: ^4.1.0 methods: ^1.1.2 path-to-regexp: ^6.1.0 - checksum: 80712e72e466f71ea118ab206ad54f4b341797728c04e556f00af939303d5da4459375440500bc360de77995794401459a23ec3a3f9c321386ef7c184643e39b + checksum: 0013bfd26c1acd44c772a08adae5edac8168c662fd2a06c7e174e2a899806908e73e077234c26888fad3ddc54478b27e5b8c7f5db41cd2e27f3b837c54b2f9b8 languageName: node linkType: hard @@ -3185,7 +3185,7 @@ __metadata: "@elastic/elasticsearch": 7.17.0 "@koa/cors": 3.4.3 "@koa/multer": 3.0.0 - "@koa/router": 9.4.0 + "@koa/router": 9.0.1 "@peertube/http-signature": 1.7.0 "@redocly/openapi-core": 1.0.0-beta.119 "@sinonjs/fake-timers": 9.1.2 @@ -3831,6 +3831,7 @@ __metadata: dependencies: "@bull-board/api": ^4.6.4 "@bull-board/ui": ^4.6.4 + "@koa/router": 9.0.1 "@tensorflow/tfjs": ^3.21.0 "@types/gulp": 4.0.10 "@types/gulp-rename": 2.0.1 From 62036b0aec05fdf2e7cce833d8d1b424425cd2fc Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 14:18:15 -0800 Subject: [PATCH 23/89] Revert "revert: index.ts to test share embed fix" This reverts commit ac4ef7eace105059eea563670f1bc6df6de3fe4f. --- packages/backend/src/server/web/index.ts | 107 ++++++++++++++++------- 1 file changed, 73 insertions(+), 34 deletions(-) diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index ee0359e19..446df1554 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -22,11 +22,11 @@ import { Users, Notes, UserProfiles, Pages, Channels, Clips, GalleryPosts } from import * as Acct from '@/misc/acct.js'; import { getNoteSummary } from '@/misc/get-note-summary.js'; import { queues } from '@/queue/queues.js'; -import { MINUTE, DAY } from '@/const.js'; import { genOpenapiSpec } from '../api/openapi/gen-spec.js'; import { urlPreviewHandler } from './url-preview.js'; import { manifestHandler } from './manifest.js'; import packFeed from './feed.js'; +import { MINUTE, DAY } from '@/const.js'; const _filename = fileURLToPath(import.meta.url); const _dirname = dirname(_filename); @@ -185,8 +185,8 @@ router.get('/twemoji-badge/(.*)', async ctx => { }); // ServiceWorker -router.get('/sw.js', async ctx => { - await send(ctx as any, '/sw.js', { +router.get(`/sw.js`, async ctx => { + await send(ctx as any, `/sw.js`, { root: swAssets, maxage: 10 * MINUTE, }); @@ -232,8 +232,43 @@ const getFeed = async (acct: string) => { return user && await packFeed(user); }; +// As the /@user[.json|.rss|.atom]/sub endpoint is complicated, we will use a regex to switch between them. +const reUser = new RegExp(`^/@(?[^/]+?)(?:\.(?json|rss|atom))?(?:/(?[^/]+))?$`); +router.get(reUser, async (ctx, next) => { + const groups = reUser.exec(ctx.originalUrl)?.groups; + if (!groups) { + await next(); + return; + } + + ctx.params = groups; + + console.log(ctx, ctx.params) + if (groups.feed) { + if (groups.sub) { + await next(); + return; + } + + switch (groups.feed) { + case 'json': + await jsonFeed(ctx, next); + break; + case 'rss': + await rssFeed(ctx, next); + break; + case 'atom': + await atomFeed(ctx, next); + break; + } + return; + } + + await userPage(ctx, next); +}); + // Atom -router.get('/@:user.atom', async ctx => { +const atomFeed: Router.Middleware = async ctx => { const feed = await getFeed(ctx.params.user); if (feed) { @@ -242,10 +277,10 @@ router.get('/@:user.atom', async ctx => { } else { ctx.status = 404; } -}); +}; // RSS -router.get('/@:user.rss', async ctx => { +const rssFeed: Router.Middleware = async ctx => { const feed = await getFeed(ctx.params.user); if (feed) { @@ -254,10 +289,10 @@ router.get('/@:user.rss', async ctx => { } else { ctx.status = 404; } -}); +}; // JSON -router.get('/@:user.json', async ctx => { +const jsonFeed: Router.Middleware = async ctx => { const feed = await getFeed(ctx.params.user); if (feed) { @@ -266,43 +301,47 @@ router.get('/@:user.json', async ctx => { } else { ctx.status = 404; } -}); +}; //#region SSR (for crawlers) // User -router.get(['/@:user', '/@:user/:sub'], async (ctx, next) => { - const { username, host } = Acct.parse(ctx.params.user); +const userPage: Router.Middleware = async (ctx, next) => { + const userParam = ctx.params.user; + const subParam = ctx.params.sub; + const { username, host } = Acct.parse(userParam); + const user = await Users.findOneBy({ usernameLower: username.toLowerCase(), host: host ?? IsNull(), isSuspended: false, }); - if (user != null) { - const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); - const meta = await fetchMeta(); - const me = profile.fields - ? profile.fields - .filter(filed => filed.value != null && filed.value.match(/^https?:/)) - .map(field => field.value) - : []; - - await ctx.render('user', { - user, profile, me, - avatarUrl: await Users.getAvatarUrl(user), - sub: ctx.params.sub, - instanceName: meta.name || 'Calckey', - icon: meta.iconUrl, - themeColor: meta.themeColor, - privateMode: meta.privateMode, - }); - ctx.set('Cache-Control', 'public, max-age=15'); - } else { - // リモートユーザーなので - // モデレータがAPI経由で参照可能にするために404にはしない + if (user === null) { await next(); + return; } -}); + + const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); + const meta = await fetchMeta(); + const me = profile.fields + ? profile.fields + .filter(filed => filed.value != null && filed.value.match(/^https?:/)) + .map(field => field.value) + : []; + + const userDetail = { + user, profile, me, + avatarUrl: await Users.getAvatarUrl(user), + sub: subParam, + instanceName: meta.name || 'Calckey', + icon: meta.iconUrl, + themeColor: meta.themeColor, + privateMode: meta.privateMode, + }; + + await ctx.render('user', userDetail); + ctx.set('Cache-Control', 'public, max-age=15'); +}; router.get('/users/:user', async ctx => { const user = await Users.findOneBy({ From 0720ee3f7382bceeff58e7060993d4c34497c468 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 16:48:49 -0800 Subject: [PATCH 24/89] perf: :construction_worker: build backend with swc Co-authored-by: pikokr <@paring@pikokr.dev> --- packages/backend/.swcrc | 25 + packages/backend/package.json | 11 +- .../backend/src/server/web/views/base.pug | 1 + packages/backend/watch.mjs | 23 - packages/client/package.json | 2 +- yarn.lock | 1031 ++++++++++++++++- 6 files changed, 1033 insertions(+), 60 deletions(-) create mode 100644 packages/backend/.swcrc delete mode 100644 packages/backend/watch.mjs diff --git a/packages/backend/.swcrc b/packages/backend/.swcrc new file mode 100644 index 000000000..39e112ff7 --- /dev/null +++ b/packages/backend/.swcrc @@ -0,0 +1,25 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript", + "dynamicImport": true, + "decorators": true + }, + "transform": { + "legacyDecorator": true, + "decoratorMetadata": true + }, + "experimental": { + "keepImportAssertions": true + }, + "baseUrl": ".", + "paths": { + "@/*": [ + "./src/*" + ] + }, + "target": "es2022" + }, + "minify": false +} diff --git a/packages/backend/package.json b/packages/backend/package.json index ba6a8ca8c..a677f6f39 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -8,8 +8,8 @@ "start:test": "NODE_ENV=test yarn node ./built/index.js", "migrate": "typeorm migration:run -d ormconfig.js", "revertmigration": "typeorm migration:revert -d ormconfig.js", - "build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json", - "watch": "yarn node watch.mjs", + "build": "swc src -d built -D", + "watch": "swc src -d built -D -w", "lint": "eslint --quiet \"src/**/*.ts\"", "mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", "test": "yarn run mocha" @@ -77,7 +77,7 @@ "koa-send": "5.0.1", "koa-slow": "2.1.0", "koa-views": "7.0.2", - "mfm-js": "0.23.0", + "mfm-js": "0.23.2", "mime-types": "2.1.35", "mocha": "10.2.0", "multer": "1.4.4-lts.1", @@ -119,7 +119,6 @@ "tmp": "0.2.1", "ts-loader": "9.4.2", "ts-node": "10.9.1", - "tsc-alias": "1.8.2", "tsconfig-paths": "4.1.2", "twemoji-parser": "14.0.0", "typeorm": "0.3.11", @@ -132,7 +131,9 @@ "xev": "3.0.2" }, "devDependencies": { - "@redocly/openapi-core": "1.0.0-beta.119", + "@redocly/openapi-core": "1.0.0-beta.120", + "@swc/cli": "^0.1.59", + "@swc/core": "^1.3.25", "@types/bcryptjs": "2.4.2", "@types/bull": "3.15.9", "@types/cbor": "6.0.0", diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 709729589..b5841883b 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -60,6 +60,7 @@ html meta(property='og:title' content=title || 'Calckey') meta(property='og:description' content=desc || 'An open source, decentralized social media platform that\'s free forever! 🚀') meta(property='og:image' content=img) + meta(property='og:image:alt' content=alt || 'Pfp') style include ../style.css diff --git a/packages/backend/watch.mjs b/packages/backend/watch.mjs deleted file mode 100644 index 9c9d2dbd8..000000000 --- a/packages/backend/watch.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import { execa } from 'execa'; - -(async () => { - // なぜかchokidarが動かない影響で、watchされない - /* - execa('tsc-alias', ['-w', '-p', 'tsconfig.json'], { - stdout: process.stdout, - stderr: process.stderr, - }); - */ - - setInterval(() => { - execa('tsc-alias', ['-p', 'tsconfig.json'], { - stdout: process.stdout, - stderr: process.stderr, - }); - }, 3000); - - execa('tsc', ['-w', '-p', 'tsconfig.json'], { - stdout: process.stdout, - stderr: process.stderr, - }); -})(); diff --git a/packages/client/package.json b/packages/client/package.json index c9e186625..d1ac4780c 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -34,7 +34,7 @@ "json5": "2.2.3", "katex": "0.16.4", "matter-js": "0.18.0", - "mfm-js": "0.23.0", + "mfm-js": "0.23.2", "photoswipe": "5.3.4", "prismjs": "1.29.0", "punycode": "2.1.1", diff --git a/yarn.lock b/yarn.lock index fd95f4258..47698dc88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -936,9 +936,9 @@ __metadata: languageName: node linkType: hard -"@redocly/openapi-core@npm:1.0.0-beta.119": - version: 1.0.0-beta.119 - resolution: "@redocly/openapi-core@npm:1.0.0-beta.119" +"@redocly/openapi-core@npm:1.0.0-beta.120": + version: 1.0.0-beta.120 + resolution: "@redocly/openapi-core@npm:1.0.0-beta.120" dependencies: "@redocly/ajv": ^8.11.0 "@types/node": ^14.11.8 @@ -950,7 +950,7 @@ __metadata: node-fetch: ^2.6.1 pluralize: ^8.0.0 yaml-ast-parser: 0.0.43 - checksum: a5af4552b7d1469370195a409c6b88a8f1049bdec9b6be3d787d73736396646e0401a18350802bde797169a92ed4be7517cd69675c0da3080869782e543cb8c0 + checksum: 32673c8f47f77c5ebdb8dce29e6f4326123afa22c9c62417a246497dde5efb3c0d46d551d234e6e7081f5a978fad573708101483fc6399b2515d50537bfe8243 languageName: node linkType: hard @@ -1022,6 +1022,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/is@npm:^0.7.0": + version: 0.7.0 + resolution: "@sindresorhus/is@npm:0.7.0" + checksum: decc50f6fe80b75c981bcff0a585c05259f5e04424a46a653ac9a7e065194145c463ca81001e3a229bd203f59474afadb5b1fa0af5507723f87f2dd45bd3897c + languageName: node + linkType: hard + "@sindresorhus/is@npm:^4.0.0": version: 4.6.0 resolution: "@sindresorhus/is@npm:4.6.0" @@ -1061,6 +1068,139 @@ __metadata: languageName: node linkType: hard +"@swc/cli@npm:^0.1.59": + version: 0.1.59 + resolution: "@swc/cli@npm:0.1.59" + dependencies: + bin-wrapper: ^4.1.0 + commander: ^7.1.0 + fast-glob: ^3.2.5 + semver: ^7.3.8 + slash: 3.0.0 + source-map: ^0.7.3 + peerDependencies: + "@swc/core": ^1.2.66 + chokidar: ^3.5.1 + peerDependenciesMeta: + chokidar: + optional: true + bin: + spack: bin/spack.js + swc: bin/swc.js + swcx: bin/swcx.js + checksum: d9fe4bf1330573c34204bf4459adb9ccdc1eaa516ac5bf7b572b3ee170163e40e0ef6e5f9b049a00805c0309064e28e215a7e60ba08ddad18d039e72ce56a001 + languageName: node + linkType: hard + +"@swc/core-darwin-arm64@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-darwin-arm64@npm:1.3.25" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-darwin-x64@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-darwin-x64@npm:1.3.25" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@swc/core-linux-arm-gnueabihf@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.25" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@swc/core-linux-arm64-gnu@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-linux-arm64-gnu@npm:1.3.25" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-arm64-musl@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-linux-arm64-musl@npm:1.3.25" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-linux-x64-gnu@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-linux-x64-gnu@npm:1.3.25" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-x64-musl@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-linux-x64-musl@npm:1.3.25" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-win32-arm64-msvc@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-win32-arm64-msvc@npm:1.3.25" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-win32-ia32-msvc@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-win32-ia32-msvc@npm:1.3.25" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@swc/core-win32-x64-msvc@npm:1.3.25": + version: 1.3.25 + resolution: "@swc/core-win32-x64-msvc@npm:1.3.25" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@swc/core@npm:^1.3.25": + version: 1.3.25 + resolution: "@swc/core@npm:1.3.25" + dependencies: + "@swc/core-darwin-arm64": 1.3.25 + "@swc/core-darwin-x64": 1.3.25 + "@swc/core-linux-arm-gnueabihf": 1.3.25 + "@swc/core-linux-arm64-gnu": 1.3.25 + "@swc/core-linux-arm64-musl": 1.3.25 + "@swc/core-linux-x64-gnu": 1.3.25 + "@swc/core-linux-x64-musl": 1.3.25 + "@swc/core-win32-arm64-msvc": 1.3.25 + "@swc/core-win32-ia32-msvc": 1.3.25 + "@swc/core-win32-x64-msvc": 1.3.25 + dependenciesMeta: + "@swc/core-darwin-arm64": + optional: true + "@swc/core-darwin-x64": + optional: true + "@swc/core-linux-arm-gnueabihf": + optional: true + "@swc/core-linux-arm64-gnu": + optional: true + "@swc/core-linux-arm64-musl": + optional: true + "@swc/core-linux-x64-gnu": + optional: true + "@swc/core-linux-x64-musl": + optional: true + "@swc/core-win32-arm64-msvc": + optional: true + "@swc/core-win32-ia32-msvc": + optional: true + "@swc/core-win32-x64-msvc": + optional: true + checksum: de45a7dd871cc9497ad998d6a320d3c95cb9c74fdcb70590ff1f631e75001820d021bbfd5c463e9172afcb5ee47bffaa8fb893230e1329538c9f7afbd5ed45cf + languageName: node + linkType: hard + "@syuilo/aiscript@npm:0.11.1": version: 0.11.1 resolution: "@syuilo/aiscript@npm:0.11.1" @@ -1619,7 +1759,7 @@ __metadata: languageName: node linkType: hard -"@types/keyv@npm:^3.1.4": +"@types/keyv@npm:^3.1.1, @types/keyv@npm:^3.1.4": version: 3.1.4 resolution: "@types/keyv@npm:3.1.4" dependencies: @@ -2712,13 +2852,22 @@ __metadata: languageName: node linkType: hard -"arch@npm:^2.2.0": +"arch@npm:^2.1.0, arch@npm:^2.2.0": version: 2.2.0 resolution: "arch@npm:2.2.0" checksum: e21b7635029fe8e9cdd5a026f9a6c659103e63fff423834323cdf836a1bb240a72d0c39ca8c470f84643385cf581bd8eda2cad8bf493e27e54bd9783abe9101f languageName: node linkType: hard +"archive-type@npm:^4.0.0": + version: 4.0.0 + resolution: "archive-type@npm:4.0.0" + dependencies: + file-type: ^4.2.0 + checksum: 271f0d118294dd0305831f0700b635e8a9475f97693212d548eee48017f917e14349a25ad578f8e13486ba4b7cde1972d53e613d980e8738cfccea5fc626c76f + languageName: node + linkType: hard + "archiver-utils@npm:^2.1.0": version: 2.1.0 resolution: "archiver-utils@npm:2.1.0" @@ -3187,8 +3336,10 @@ __metadata: "@koa/multer": 3.0.0 "@koa/router": 9.0.1 "@peertube/http-signature": 1.7.0 - "@redocly/openapi-core": 1.0.0-beta.119 + "@redocly/openapi-core": 1.0.0-beta.120 "@sinonjs/fake-timers": 9.1.2 + "@swc/cli": ^0.1.59 + "@swc/core": ^1.3.25 "@syuilo/aiscript": 0.11.1 "@tensorflow/tfjs": ^4.2.0 "@tensorflow/tfjs-node": 3.21.1 @@ -3284,7 +3435,7 @@ __metadata: koa-send: 5.0.1 koa-slow: 2.1.0 koa-views: 7.0.2 - mfm-js: 0.23.0 + mfm-js: 0.23.2 mime-types: 2.1.35 mocha: 10.2.0 multer: 1.4.4-lts.1 @@ -3326,7 +3477,6 @@ __metadata: tmp: 0.2.1 ts-loader: 9.4.2 ts-node: 10.9.1 - tsc-alias: 1.8.2 tsconfig-paths: 4.1.2 twemoji-parser: 14.0.0 typeorm: 0.3.11 @@ -3417,6 +3567,51 @@ __metadata: languageName: node linkType: hard +"bin-check@npm:^4.1.0": + version: 4.1.0 + resolution: "bin-check@npm:4.1.0" + dependencies: + execa: ^0.7.0 + executable: ^4.1.0 + checksum: 16f6d5d86df9365dab682c7dd238f93678b773a908b3bccea4b1acb82b9b4e49fcfa24c99b99180a8e4cdd89a8f15f03700b09908ed5ae651f52fd82488a3507 + languageName: node + linkType: hard + +"bin-version-check@npm:^4.0.0": + version: 4.0.0 + resolution: "bin-version-check@npm:4.0.0" + dependencies: + bin-version: ^3.0.0 + semver: ^5.6.0 + semver-truncate: ^1.1.2 + checksum: fab468416e27df2f5440ee143065399457bec885b5c1ec01ecf2185ea6f071ff087ef1e3f84cca7314f43145e9bca3127cb1b6f783e35f3242ff7e7edb033b0a + languageName: node + linkType: hard + +"bin-version@npm:^3.0.0": + version: 3.1.0 + resolution: "bin-version@npm:3.1.0" + dependencies: + execa: ^1.0.0 + find-versions: ^3.0.0 + checksum: 59ef7194420fc30f3a4ea8ce569ad11f7eb736019ca765778739f14702faf2b23b3bcf757e0d29b3839c14bcca9dc38c10c083d3d601363ef06436424204579d + languageName: node + linkType: hard + +"bin-wrapper@npm:^4.1.0": + version: 4.1.0 + resolution: "bin-wrapper@npm:4.1.0" + dependencies: + bin-check: ^4.1.0 + bin-version-check: ^4.0.0 + download: ^7.1.0 + import-lazy: ^3.1.0 + os-filter-obj: ^2.0.0 + pify: ^4.0.1 + checksum: eed64a0738aef196a15af87ad28f71d5bb28070d6df8e25544c26ba7a5c7a774987d502760050e774c1fa6d32c8c9318217053b61bdeb7f361883ad2cc75b9a7 + languageName: node + linkType: hard + "binary-extensions@npm:^2.0.0": version: 2.2.0 resolution: "binary-extensions@npm:2.2.0" @@ -3441,6 +3636,16 @@ __metadata: languageName: node linkType: hard +"bl@npm:^1.0.0": + version: 1.2.3 + resolution: "bl@npm:1.2.3" + dependencies: + readable-stream: ^2.3.5 + safe-buffer: ^5.1.1 + checksum: 123f097989ce2fa9087ce761cd41176aaaec864e28f7dfe5c7dab8ae16d66d9844f849c3ad688eb357e3c5e4f49b573e3c0780bb8bc937206735a3b6f8569a5f + languageName: node + linkType: hard + "bl@npm:^4.0.3": version: 4.1.0 resolution: "bl@npm:4.1.0" @@ -3586,6 +3791,23 @@ __metadata: languageName: node linkType: hard +"buffer-alloc-unsafe@npm:^1.1.0": + version: 1.1.0 + resolution: "buffer-alloc-unsafe@npm:1.1.0" + checksum: c5e18bf51f67754ec843c9af3d4c005051aac5008a3992938dda1344e5cfec77c4b02b4ca303644d1e9a6e281765155ce6356d85c6f5ccc5cd21afc868def396 + languageName: node + linkType: hard + +"buffer-alloc@npm:^1.2.0": + version: 1.2.0 + resolution: "buffer-alloc@npm:1.2.0" + dependencies: + buffer-alloc-unsafe: ^1.1.0 + buffer-fill: ^1.0.0 + checksum: 560cd27f3cbe73c614867da373407d4506309c62fe18de45a1ce191f3785ec6ca2488d802ff82065798542422980ca25f903db078c57822218182c37c3576df5 + languageName: node + linkType: hard + "buffer-crc32@npm:^0.2.1, buffer-crc32@npm:^0.2.13, buffer-crc32@npm:~0.2.3": version: 0.2.13 resolution: "buffer-crc32@npm:0.2.13" @@ -3607,6 +3829,13 @@ __metadata: languageName: node linkType: hard +"buffer-fill@npm:^1.0.0": + version: 1.0.0 + resolution: "buffer-fill@npm:1.0.0" + checksum: c29b4723ddeab01e74b5d3b982a0c6828f2ded49cef049ddca3dac661c874ecdbcecb5dd8380cf0f4adbeb8cff90a7de724126750a1f1e5ebd4eb6c59a1315b1 + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -3639,7 +3868,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -3791,6 +4020,21 @@ __metadata: languageName: node linkType: hard +"cacheable-request@npm:^2.1.1": + version: 2.1.4 + resolution: "cacheable-request@npm:2.1.4" + dependencies: + clone-response: 1.0.2 + get-stream: 3.0.0 + http-cache-semantics: 3.8.1 + keyv: 3.0.0 + lowercase-keys: 1.0.0 + normalize-url: 2.0.1 + responselike: 1.0.2 + checksum: 69c684cb3645f75af094e3ef6e7959ca5edff33d70737498de1a068d2f719a12786efdd82fe1e2254a1f332bb88cce088273bd78fad3e57cdef5034f3ded9432 + languageName: node + linkType: hard + "cacheable-request@npm:^7.0.2": version: 7.0.2 resolution: "cacheable-request@npm:7.0.2" @@ -3831,7 +4075,6 @@ __metadata: dependencies: "@bull-board/api": ^4.6.4 "@bull-board/ui": ^4.6.4 - "@koa/router": 9.0.1 "@tensorflow/tfjs": ^3.21.0 "@types/gulp": 4.0.10 "@types/gulp-rename": 2.0.1 @@ -3930,6 +4173,18 @@ __metadata: languageName: node linkType: hard +"caw@npm:^2.0.1": + version: 2.0.1 + resolution: "caw@npm:2.0.1" + dependencies: + get-proxy: ^2.0.0 + isurl: ^1.0.0-alpha5 + tunnel-agent: ^0.6.0 + url-to-options: ^1.0.1 + checksum: 8be9811b9b21289f49062905771e664c05221fa406b57a1b5debc41e90fc4318b73dc42fc3f3719c7fce882d9cd76a22e8183d0632a6f1772777e01caea62107 + languageName: node + linkType: hard + "cbor@npm:*, cbor@npm:8.1.0": version: 8.1.0 resolution: "cbor@npm:8.1.0" @@ -4274,7 +4529,7 @@ __metadata: json5: 2.2.3 katex: 0.16.4 matter-js: 0.18.0 - mfm-js: 0.23.0 + mfm-js: 0.23.2 photoswipe: 5.3.4 prismjs: 1.29.0 punycode: 2.1.1 @@ -4359,6 +4614,15 @@ __metadata: languageName: node linkType: hard +"clone-response@npm:1.0.2": + version: 1.0.2 + resolution: "clone-response@npm:1.0.2" + dependencies: + mimic-response: ^1.0.0 + checksum: 2d0e61547fc66276e0903be9654ada422515f5a15741691352000d47e8c00c226061221074ce2c0064d12e975e84a8687cfd35d8b405750cb4e772f87b256eda + languageName: node + linkType: hard + "clone-response@npm:^1.0.2": version: 1.0.3 resolution: "clone-response@npm:1.0.3" @@ -4604,7 +4868,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^2.19.0, commander@npm:^2.20.0": +"commander@npm:^2.19.0, commander@npm:^2.20.0, commander@npm:^2.8.1": version: 2.20.3 resolution: "commander@npm:2.20.3" checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e @@ -4618,6 +4882,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^7.1.0": + version: 7.2.0 + resolution: "commander@npm:7.2.0" + checksum: 53501cbeee61d5157546c0bef0fedb6cdfc763a882136284bed9a07225f09a14b82d2a84e7637edfd1a679fb35ed9502fd58ef1d091e6287f60d790147f68ddc + languageName: node + linkType: hard + "commander@npm:^8.0.0": version: 8.3.0 resolution: "commander@npm:8.3.0" @@ -4695,7 +4966,7 @@ __metadata: languageName: node linkType: hard -"config-chain@npm:^1.1.13": +"config-chain@npm:^1.1.11, config-chain@npm:^1.1.13": version: 1.1.13 resolution: "config-chain@npm:1.1.13" dependencies: @@ -4731,7 +5002,7 @@ __metadata: languageName: node linkType: hard -"content-disposition@npm:0.5.4, content-disposition@npm:~0.5.2": +"content-disposition@npm:0.5.4, content-disposition@npm:^0.5.2, content-disposition@npm:~0.5.2": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" dependencies: @@ -4866,6 +5137,30 @@ __metadata: languageName: node linkType: hard +"cross-spawn@npm:^5.0.1": + version: 5.1.0 + resolution: "cross-spawn@npm:5.1.0" + dependencies: + lru-cache: ^4.0.1 + shebang-command: ^1.2.0 + which: ^1.2.9 + checksum: 726939c9954fc70c20e538923feaaa33bebc253247d13021737c3c7f68cdc3e0a57f720c0fe75057c0387995349f3f12e20e9bfdbf12274db28019c7ea4ec166 + languageName: node + linkType: hard + +"cross-spawn@npm:^6.0.0": + version: 6.0.5 + resolution: "cross-spawn@npm:6.0.5" + dependencies: + nice-try: ^1.0.4 + path-key: ^2.0.1 + semver: ^5.5.0 + shebang-command: ^1.2.0 + which: ^1.2.9 + checksum: f893bb0d96cd3d5751d04e67145bdddf25f99449531a72e82dcbbd42796bbc8268c1076c6b3ea51d4d455839902804b94bc45dfb37ecbb32ea8e54a6741c3ab9 + languageName: node + linkType: hard + "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -5211,6 +5506,15 @@ __metadata: languageName: node linkType: hard +"decompress-response@npm:^3.3.0": + version: 3.3.0 + resolution: "decompress-response@npm:3.3.0" + dependencies: + mimic-response: ^1.0.0 + checksum: 952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 + languageName: node + linkType: hard + "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -5220,6 +5524,69 @@ __metadata: languageName: node linkType: hard +"decompress-tar@npm:^4.0.0, decompress-tar@npm:^4.1.0, decompress-tar@npm:^4.1.1": + version: 4.1.1 + resolution: "decompress-tar@npm:4.1.1" + dependencies: + file-type: ^5.2.0 + is-stream: ^1.1.0 + tar-stream: ^1.5.2 + checksum: 42d5360b558a28dd884e1bf809e3fea92b9910fda5151add004d4a64cc76ac124e8b3e9117e805f2349af9e49c331d873e6fc5ad86a00e575703fee632b0a225 + languageName: node + linkType: hard + +"decompress-tarbz2@npm:^4.0.0": + version: 4.1.1 + resolution: "decompress-tarbz2@npm:4.1.1" + dependencies: + decompress-tar: ^4.1.0 + file-type: ^6.1.0 + is-stream: ^1.1.0 + seek-bzip: ^1.0.5 + unbzip2-stream: ^1.0.9 + checksum: 519c81337730159a1f2d7072a6ee8523ffd76df48d34f14c27cb0a27f89b4e2acf75dad2f761838e5bc63230cea1ac154b092ecb7504be4e93f7d0e32ddd6aff + languageName: node + linkType: hard + +"decompress-targz@npm:^4.0.0": + version: 4.1.1 + resolution: "decompress-targz@npm:4.1.1" + dependencies: + decompress-tar: ^4.1.1 + file-type: ^5.2.0 + is-stream: ^1.1.0 + checksum: 22738f58eb034568dc50d370c03b346c428bfe8292fe56165847376b5af17d3c028fefca82db642d79cb094df4c0a599d40a8f294b02aad1d3ddec82f3fd45d4 + languageName: node + linkType: hard + +"decompress-unzip@npm:^4.0.1": + version: 4.0.1 + resolution: "decompress-unzip@npm:4.0.1" + dependencies: + file-type: ^3.8.0 + get-stream: ^2.2.0 + pify: ^2.3.0 + yauzl: ^2.4.2 + checksum: ba9f3204ab2415bedb18d796244928a18148ef40dbb15174d0d01e5991b39536b03d02800a8a389515a1523f8fb13efc7cd44697df758cd06c674879caefd62b + languageName: node + linkType: hard + +"decompress@npm:^4.2.0": + version: 4.2.1 + resolution: "decompress@npm:4.2.1" + dependencies: + decompress-tar: ^4.0.0 + decompress-tarbz2: ^4.0.0 + decompress-targz: ^4.0.0 + decompress-unzip: ^4.0.1 + graceful-fs: ^4.1.10 + make-dir: ^1.0.0 + pify: ^2.3.0 + strip-dirs: ^2.0.0 + checksum: 8247a31c6db7178413715fdfb35a482f019c81dfcd6e8e623d9f0382c9889ce797ce0144de016b256ed03298907a620ce81387cca0e69067a933470081436cb8 + languageName: node + linkType: hard + "deep-email-validator@npm:0.1.21": version: 0.1.21 resolution: "deep-email-validator@npm:0.1.21" @@ -5572,6 +5939,26 @@ __metadata: languageName: node linkType: hard +"download@npm:^7.1.0": + version: 7.1.0 + resolution: "download@npm:7.1.0" + dependencies: + archive-type: ^4.0.0 + caw: ^2.0.1 + content-disposition: ^0.5.2 + decompress: ^4.2.0 + ext-name: ^5.0.0 + file-type: ^8.1.0 + filenamify: ^2.0.0 + get-stream: ^3.0.0 + got: ^8.3.1 + make-dir: ^1.2.0 + p-event: ^2.1.0 + pify: ^3.0.0 + checksum: 158feb3dab42f3429f4242a7bd6610e6890ab72e6da9bd5a7bee3d0f56b7df2786eefccd4c0d3cfb7f03e77997950e41ca0a2dcdbb76098cedaeb6c594aa0f3f + languageName: node + linkType: hard + "duplexer2@npm:~0.1.4": version: 0.1.4 resolution: "duplexer2@npm:0.1.4" @@ -5581,6 +5968,13 @@ __metadata: languageName: node linkType: hard +"duplexer3@npm:^0.1.4": + version: 0.1.5 + resolution: "duplexer3@npm:0.1.5" + checksum: e677cb4c48f031ca728601d6a20bf6aed4c629d69ef9643cb89c67583d673c4ec9317cc6427501f38bd8c368d3a18f173987cc02bd99d8cf8fe3d94259a22a20 + languageName: node + linkType: hard + "duplexer@npm:~0.1.1": version: 0.1.2 resolution: "duplexer@npm:0.1.2" @@ -6579,7 +6973,37 @@ __metadata: languageName: node linkType: hard -"executable@npm:^4.1.1": +"execa@npm:^0.7.0": + version: 0.7.0 + resolution: "execa@npm:0.7.0" + dependencies: + cross-spawn: ^5.0.1 + get-stream: ^3.0.0 + is-stream: ^1.1.0 + npm-run-path: ^2.0.0 + p-finally: ^1.0.0 + signal-exit: ^3.0.0 + strip-eof: ^1.0.0 + checksum: dd70206d74b7217bf678ec9f04dddedc82f425df4c1d70e34c9f429d630ec407819e4bd42e3af2618981a4a3a1be000c9b651c0637be486cdab985160c20337c + languageName: node + linkType: hard + +"execa@npm:^1.0.0": + version: 1.0.0 + resolution: "execa@npm:1.0.0" + dependencies: + cross-spawn: ^6.0.0 + get-stream: ^4.0.0 + is-stream: ^1.1.0 + npm-run-path: ^2.0.0 + p-finally: ^1.0.0 + signal-exit: ^3.0.0 + strip-eof: ^1.0.0 + checksum: ddf1342c1c7d02dd93b41364cd847640f6163350d9439071abf70bf4ceb1b9b2b2e37f54babb1d8dc1df8e0d8def32d0e81e74a2e62c3e1d70c303eb4c306bc4 + languageName: node + linkType: hard + +"executable@npm:^4.1.0, executable@npm:^4.1.1": version: 4.1.1 resolution: "executable@npm:4.1.1" dependencies: @@ -6628,6 +7052,25 @@ __metadata: languageName: node linkType: hard +"ext-list@npm:^2.0.0": + version: 2.2.2 + resolution: "ext-list@npm:2.2.2" + dependencies: + mime-db: ^1.28.0 + checksum: 9b2426bea312e674eeced62c5f18407ab9a8653bbdfbde36492331c7973dab7fbf9e11d6c38605786168b42da333910314988097ca06eee61f1b9b57efae3f18 + languageName: node + linkType: hard + +"ext-name@npm:^5.0.0": + version: 5.0.0 + resolution: "ext-name@npm:5.0.0" + dependencies: + ext-list: ^2.0.0 + sort-keys-length: ^1.0.0 + checksum: f598269bd5de4295540ea7d6f8f6a01d82a7508f148b7700a05628ef6121648d26e6e5e942049e953b3051863df6b54bd8fe951e7877f185e34ace5d44370b33 + languageName: node + linkType: hard + "ext@npm:^1.1.2": version: 1.7.0 resolution: "ext@npm:1.7.0" @@ -6729,7 +7172,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.9": version: 3.2.12 resolution: "fast-glob@npm:3.2.12" dependencies: @@ -6847,6 +7290,41 @@ __metadata: languageName: node linkType: hard +"file-type@npm:^3.8.0": + version: 3.9.0 + resolution: "file-type@npm:3.9.0" + checksum: 1db70b2485ac77c4edb4b8753c1874ee6194123533f43c2651820f96b518f505fa570b093fedd6672eb105ba9fb89c62f84b6492e46788e39c3447aed37afa2d + languageName: node + linkType: hard + +"file-type@npm:^4.2.0": + version: 4.4.0 + resolution: "file-type@npm:4.4.0" + checksum: f3e0b38bef643a330b3d98e3aa9d6f0f32d2d80cb9341f5612187bd53ac84489a4dc66b354bd0cff6b60bff053c7ef21eb8923d62e9f1196ac627b63bd7875ef + languageName: node + linkType: hard + +"file-type@npm:^5.2.0": + version: 5.2.0 + resolution: "file-type@npm:5.2.0" + checksum: b2b21c7fc3cfb3c6a3a18b0d5d7233b74d8c17d82757655766573951daf42962a5c809e5fc3637675b237c558ebc67e4958fb2cc5a4ad407bc545aaa40001c74 + languageName: node + linkType: hard + +"file-type@npm:^6.1.0": + version: 6.2.0 + resolution: "file-type@npm:6.2.0" + checksum: 749540cefcd4959121eb83e373ed84e49b2e5a510aa5d598b725bd772dd306ae41fd00d3162ae3f6563b4db5cfafbbd0df321de3f20c17e20a8c56431ae55e58 + languageName: node + linkType: hard + +"file-type@npm:^8.1.0": + version: 8.1.0 + resolution: "file-type@npm:8.1.0" + checksum: ad55170f69709061bfc5980d666f8441cc805b3c2a0c8bd7efb4a11ff6dbb49f91739354510129928813cce93bb91274fa8a100a5730e30606e8db254dffca92 + languageName: node + linkType: hard + "filelist@npm:^1.0.1": version: 1.0.4 resolution: "filelist@npm:1.0.4" @@ -6856,6 +7334,24 @@ __metadata: languageName: node linkType: hard +"filename-reserved-regex@npm:^2.0.0": + version: 2.0.0 + resolution: "filename-reserved-regex@npm:2.0.0" + checksum: 323a0020fd7f243238ffccab9d728cbc5f3a13c84b2c10e01efb09b8324561d7a51776be76f36603c734d4f69145c39a5d12492bf6142a28b50d7f90bd6190bc + languageName: node + linkType: hard + +"filenamify@npm:^2.0.0": + version: 2.1.0 + resolution: "filenamify@npm:2.1.0" + dependencies: + filename-reserved-regex: ^2.0.0 + strip-outer: ^1.0.0 + trim-repeated: ^1.0.0 + checksum: dd7f6ce050b642dac75fd4a88dc88fb5c4c40d72e7b8b1da5c2799a0c13332b7d631947e0e549906895864207c81a74a3656fc9684ba265e3b17ef8b1421bdcf + languageName: node + linkType: hard + "fill-range@npm:^4.0.0": version: 4.0.0 resolution: "fill-range@npm:4.0.0" @@ -6907,6 +7403,15 @@ __metadata: languageName: node linkType: hard +"find-versions@npm:^3.0.0": + version: 3.2.0 + resolution: "find-versions@npm:3.2.0" + dependencies: + semver-regex: ^2.0.0 + checksum: f010e00f9dedd5b83206762d668b4b3b86bbb81f3c2d957e2559969b9eadb6124297c4a2a1d51c5efea3d79557b19660a2758c77bb6a5ba5ce7750fba9847082 + languageName: node + linkType: hard + "findup-sync@npm:^2.0.0": version: 2.0.0 resolution: "findup-sync@npm:2.0.0" @@ -7111,6 +7616,16 @@ __metadata: languageName: node linkType: hard +"from2@npm:^2.1.1": + version: 2.3.0 + resolution: "from2@npm:2.3.0" + dependencies: + inherits: ^2.0.1 + readable-stream: ^2.0.0 + checksum: 6080eba0793dce32f475141fb3d54cc15f84ee52e420ee22ac3ab0ad639dc95a1875bc6eb9c0e1140e94972a36a89dc5542491b85f1ab8df0c126241e0f1a61b + languageName: node + linkType: hard + "from@npm:~0": version: 0.1.7 resolution: "from@npm:0.1.7" @@ -7347,6 +7862,41 @@ __metadata: languageName: node linkType: hard +"get-proxy@npm:^2.0.0": + version: 2.1.0 + resolution: "get-proxy@npm:2.1.0" + dependencies: + npm-conf: ^1.1.0 + checksum: d9574a70425c280f60247ab1917b9b159eb0d32da2013f975f632bbc21f171f3769f226fbdacffc71bb406786693bbeb5b271c134b0f3d7dc052e92a1f285266 + languageName: node + linkType: hard + +"get-stream@npm:3.0.0, get-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "get-stream@npm:3.0.0" + checksum: 36142f46005ed74ce3a45c55545ec4e7da8e243554179e345a786baf144e5c4a35fb7bdc49fadfa9f18bd08000589b6fe364abdadfc4e1eb0e1b9914a6bb9c56 + languageName: node + linkType: hard + +"get-stream@npm:^2.2.0": + version: 2.3.1 + resolution: "get-stream@npm:2.3.1" + dependencies: + object-assign: ^4.0.1 + pinkie-promise: ^2.0.0 + checksum: d82c86556e131ba7bef00233aa0aa7a51230e6deac11a971ce0f47cd43e2a5e968a3e3914cd082f07cd0d69425653b2f96735b0a7d5c5c03fef3ab857a531367 + languageName: node + linkType: hard + +"get-stream@npm:^4.0.0": + version: 4.1.0 + resolution: "get-stream@npm:4.1.0" + dependencies: + pump: ^3.0.0 + checksum: 443e1914170c15bd52ff8ea6eff6dfc6d712b031303e36302d2778e3de2506af9ee964d6124010f7818736dcfde05c04ba7ca6cc26883106e084357a17ae7d73 + languageName: node + linkType: hard + "get-stream@npm:^5.0.0, get-stream@npm:^5.1.0": version: 5.2.0 resolution: "get-stream@npm:5.2.0" @@ -7642,7 +8192,32 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.0.0, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.2, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": +"got@npm:^8.3.1": + version: 8.3.2 + resolution: "got@npm:8.3.2" + dependencies: + "@sindresorhus/is": ^0.7.0 + cacheable-request: ^2.1.1 + decompress-response: ^3.3.0 + duplexer3: ^0.1.4 + get-stream: ^3.0.0 + into-stream: ^3.1.0 + is-retry-allowed: ^1.1.0 + isurl: ^1.0.0-alpha5 + lowercase-keys: ^1.0.0 + mimic-response: ^1.0.0 + p-cancelable: ^0.4.0 + p-timeout: ^2.0.1 + pify: ^3.0.0 + safe-buffer: ^5.1.1 + timed-out: ^4.0.1 + url-parse-lax: ^3.0.0 + url-to-options: ^1.0.1 + checksum: ab05bfcb6de86dc0c3fba8d25cc51cb2b09851ff3f6f899c86cde8c63b30269f8823d69dbbc6d03f7c58bb069f55a3c5f60aba74aad6721938652d8f35fd3165 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.0.0, graceful-fs@npm:^4.1.10, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.2, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da @@ -7822,6 +8397,13 @@ __metadata: languageName: node linkType: hard +"has-symbol-support-x@npm:^1.4.1": + version: 1.4.2 + resolution: "has-symbol-support-x@npm:1.4.2" + checksum: ff06631d556d897424c00e8e79c10093ad34c93e88bb0563932d7837f148a4c90a4377abc5d8da000cb6637c0ecdb4acc9ae836c7cfd0ffc919986db32097609 + languageName: node + linkType: hard + "has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" @@ -7829,6 +8411,15 @@ __metadata: languageName: node linkType: hard +"has-to-string-tag-x@npm:^1.2.0": + version: 1.4.1 + resolution: "has-to-string-tag-x@npm:1.4.1" + dependencies: + has-symbol-support-x: ^1.4.1 + checksum: 804c4505727be7770f8b2f5e727ce31c9affc5b83df4ce12344f44b68d557fefb31f77751dbd739de900653126bcd71f8842fac06f97a3fae5422685ab0ce6f0 + languageName: node + linkType: hard + "has-tostringtag@npm:^1.0.0": version: 1.0.0 resolution: "has-tostringtag@npm:1.0.0" @@ -7991,6 +8582,13 @@ __metadata: languageName: node linkType: hard +"http-cache-semantics@npm:3.8.1": + version: 3.8.1 + resolution: "http-cache-semantics@npm:3.8.1" + checksum: b1108d37be478fa9b03890d4185217aac2256e9d2247ce6c6bd90bc5432687d68dc7710ba908cea6166fb983a849d902195241626cf175a3c62817a494c0f7f6 + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0": version: 4.1.0 resolution: "http-cache-semantics@npm:4.1.0" @@ -8227,6 +8825,13 @@ __metadata: languageName: node linkType: hard +"import-lazy@npm:^3.1.0": + version: 3.1.0 + resolution: "import-lazy@npm:3.1.0" + checksum: 50250b9591f4c062ca031365e650bc380b195fffce9f328a755b7a3496aa960f1012037cfe4ad96491410b3a2994016a72436462a580dafa6cfb1cb5631a0c00 + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -8344,6 +8949,16 @@ __metadata: languageName: node linkType: hard +"into-stream@npm:^3.1.0": + version: 3.1.0 + resolution: "into-stream@npm:3.1.0" + dependencies: + from2: ^2.1.1 + p-is-promise: ^1.1.0 + checksum: e6e1a202227b20c446c251ef95348b3e8503cdc75aa2a09076f8821fc42c1b7fd43fabaeb8ed3cf9eb875942cfa4510b66949c5317997aa640921cc9bbadcd17 + languageName: node + linkType: hard + "invert-kv@npm:^1.0.0": version: 1.0.0 resolution: "invert-kv@npm:1.0.0" @@ -8714,6 +9329,13 @@ __metadata: languageName: node linkType: hard +"is-natural-number@npm:^4.0.1": + version: 4.0.1 + resolution: "is-natural-number@npm:4.0.1" + checksum: 3e5e3d52e0dfa4fea923b5d2b8a5cdbd9bf110c4598d30304b98528b02f40c9058a2abf1bae10bcbaf2bac18ace41cff7bc9673aff339f8c8297fae74ae0e75d + languageName: node + linkType: hard + "is-negated-glob@npm:^1.0.0": version: 1.0.0 resolution: "is-negated-glob@npm:1.0.0" @@ -8760,6 +9382,13 @@ __metadata: languageName: node linkType: hard +"is-object@npm:^1.0.1": + version: 1.0.2 + resolution: "is-object@npm:1.0.2" + checksum: 971219c4b1985b9751f65e4c8296d3104f0457b0e8a70849e848a4a2208bc47317d73b3b85d4a369619cb2df8284dc22584cb2695a7d99aca5e8d0aa64fc075a + languageName: node + linkType: hard + "is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" @@ -8830,6 +9459,13 @@ __metadata: languageName: node linkType: hard +"is-retry-allowed@npm:^1.1.0": + version: 1.2.0 + resolution: "is-retry-allowed@npm:1.2.0" + checksum: 50d700a89ae31926b1c91b3eb0104dbceeac8790d8b80d02f5c76d9a75c2056f1bb24b5268a8a018dead606bddf116b2262e5ac07401eb8b8783b266ed22558d + languageName: node + linkType: hard + "is-shared-array-buffer@npm:^1.0.2": version: 1.0.2 resolution: "is-shared-array-buffer@npm:1.0.2" @@ -8839,6 +9475,13 @@ __metadata: languageName: node linkType: hard +"is-stream@npm:^1.1.0": + version: 1.1.0 + resolution: "is-stream@npm:1.1.0" + checksum: 063c6bec9d5647aa6d42108d4c59723d2bd4ae42135a2d4db6eadbd49b7ea05b750fd69d279e5c7c45cf9da753ad2c00d8978be354d65aa9f6bb434969c6a2ae + languageName: node + linkType: hard + "is-stream@npm:^2.0.0": version: 2.0.1 resolution: "is-stream@npm:2.0.1" @@ -9023,6 +9666,16 @@ __metadata: languageName: node linkType: hard +"isurl@npm:^1.0.0-alpha5": + version: 1.0.0 + resolution: "isurl@npm:1.0.0" + dependencies: + has-to-string-tag-x: ^1.2.0 + is-object: ^1.0.1 + checksum: 28a96e019269d57015fa5869f19dda5a3ed1f7b21e3e0c4ff695419bd0541547db352aa32ee4a3659e811a177b0e37a5bc1a036731e71939dd16b59808ab92bd + languageName: node + linkType: hard + "jake@npm:^10.8.5": version: 10.8.5 resolution: "jake@npm:10.8.5" @@ -9214,6 +9867,13 @@ __metadata: languageName: node linkType: hard +"json-buffer@npm:3.0.0": + version: 3.0.0 + resolution: "json-buffer@npm:3.0.0" + checksum: 0cecacb8025370686a916069a2ff81f7d55167421b6aa7270ee74e244012650dd6bce22b0852202ea7ff8624fce50ff0ec1bdf95914ccb4553426e290d5a63fa + languageName: node + linkType: hard + "json-buffer@npm:3.0.1": version: 3.0.1 resolution: "json-buffer@npm:3.0.1" @@ -9437,6 +10097,15 @@ __metadata: languageName: node linkType: hard +"keyv@npm:3.0.0": + version: 3.0.0 + resolution: "keyv@npm:3.0.0" + dependencies: + json-buffer: 3.0.0 + checksum: 5182775e546cdbb88dc583825bc0e990164709f31904a219e3321b3bf564a301ac4e5255ba95f7fba466548eba793b356a04a0242110173b199a37192b3b565f + languageName: node + linkType: hard + "keyv@npm:^4.0.0, keyv@npm:^4.5.2": version: 4.5.2 resolution: "keyv@npm:4.5.2" @@ -10061,6 +10730,20 @@ __metadata: languageName: node linkType: hard +"lowercase-keys@npm:1.0.0": + version: 1.0.0 + resolution: "lowercase-keys@npm:1.0.0" + checksum: 2370110c149967038fd5eb278f9b2d889eb427487c0e7fb417ab2ef4d93bacba1c8f226cf2ef1c2848b3191f37d84167d4342fbee72a1a122086680adecf362b + languageName: node + linkType: hard + +"lowercase-keys@npm:^1.0.0": + version: 1.0.1 + resolution: "lowercase-keys@npm:1.0.1" + checksum: 4d045026595936e09953e3867722e309415ff2c80d7701d067546d75ef698dac218a4f53c6d1d0e7368b47e45fd7529df47e6cb56fbb90523ba599f898b3d147 + languageName: node + linkType: hard + "lowercase-keys@npm:^2.0.0": version: 2.0.0 resolution: "lowercase-keys@npm:2.0.0" @@ -10075,7 +10758,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^4.1.5": +"lru-cache@npm:^4.0.1, lru-cache@npm:^4.1.5": version: 4.1.5 resolution: "lru-cache@npm:4.1.5" dependencies: @@ -10124,6 +10807,15 @@ __metadata: languageName: node linkType: hard +"make-dir@npm:^1.0.0, make-dir@npm:^1.2.0": + version: 1.3.0 + resolution: "make-dir@npm:1.3.0" + dependencies: + pify: ^3.0.0 + checksum: c564f6e7bb5ace1c02ad56b3a5f5e07d074af0c0b693c55c7b2c2b148882827c8c2afc7b57e43338a9f90c125b58d604e8cf3e6990a48bf949dfea8c79668c0b + languageName: node + linkType: hard + "make-dir@npm:^3.1.0": version: 3.1.0 resolution: "make-dir@npm:3.1.0" @@ -10250,12 +10942,12 @@ __metadata: languageName: node linkType: hard -"mfm-js@npm:0.23.0": - version: 0.23.0 - resolution: "mfm-js@npm:0.23.0" +"mfm-js@npm:0.23.2": + version: 0.23.2 + resolution: "mfm-js@npm:0.23.2" dependencies: twemoji-parser: 14.0.0 - checksum: 0351c22be1074c83fa02fae5f34e481c7f509fe012022f767ea505fb9b633e50e9717cb47683b62dc2130993fd470110f48ebddd9b33f39416fd4151220dfe3e + checksum: 5812ff073104f019bba6c2f2c7c97ff541f57b281644d008a70d3e79dfc42bb3151fb0ec08ddf214ffe9fd6fe223bb70e5c4e5a4a3962a48cb99dd624d3c0d0e languageName: node linkType: hard @@ -10290,7 +10982,7 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0": +"mime-db@npm:1.52.0, mime-db@npm:^1.28.0": version: 1.52.0 resolution: "mime-db@npm:1.52.0" checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f @@ -10823,6 +11515,13 @@ __metadata: languageName: node linkType: hard +"nice-try@npm:^1.0.4": + version: 1.0.5 + resolution: "nice-try@npm:1.0.5" + checksum: 0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff + languageName: node + linkType: hard + "node-abi@npm:^3.3.0": version: 3.30.0 resolution: "node-abi@npm:3.30.0" @@ -11013,6 +11712,17 @@ __metadata: languageName: node linkType: hard +"normalize-url@npm:2.0.1": + version: 2.0.1 + resolution: "normalize-url@npm:2.0.1" + dependencies: + prepend-http: ^2.0.0 + query-string: ^5.0.1 + sort-keys: ^2.0.0 + checksum: 30e337ee03fc7f360c7d2b966438657fabd2628925cc58bffc893982fe4d2c59b397ae664fa2c319cd83565af73eee88906e80bc5eec91bc32b601920e770d75 + languageName: node + linkType: hard + "normalize-url@npm:^1.4.0": version: 1.9.1 resolution: "normalize-url@npm:1.9.1" @@ -11048,6 +11758,25 @@ __metadata: languageName: node linkType: hard +"npm-conf@npm:^1.1.0": + version: 1.1.3 + resolution: "npm-conf@npm:1.1.3" + dependencies: + config-chain: ^1.1.11 + pify: ^3.0.0 + checksum: 2d4e933b657623d98183ec408d17318547296b1cd17c4d3587e2920c554675f24f829d8f5f7f84db3a020516678fdcd01952ebaaf0e7fa8a17f6c39be4154bef + languageName: node + linkType: hard + +"npm-run-path@npm:^2.0.0": + version: 2.0.2 + resolution: "npm-run-path@npm:2.0.2" + dependencies: + path-key: ^2.0.0 + checksum: acd5ad81648ba4588ba5a8effb1d98d2b339d31be16826a118d50f182a134ac523172101b82eab1d01cb4c2ba358e857d54cfafd8163a1ffe7bd52100b741125 + languageName: node + linkType: hard + "npm-run-path@npm:^4.0.0, npm-run-path@npm:^4.0.1": version: 4.0.1 resolution: "npm-run-path@npm:4.0.1" @@ -11378,6 +12107,15 @@ __metadata: languageName: node linkType: hard +"os-filter-obj@npm:^2.0.0": + version: 2.0.0 + resolution: "os-filter-obj@npm:2.0.0" + dependencies: + arch: ^2.1.0 + checksum: 08808a109b2dba9be8686cc006e082a0f6595e6d87e2a30e4147cb1d22b62a30a6e5f4fd78226aee76d9158c84db3cea292adec02e6591452e93cb33bf5da877 + languageName: node + linkType: hard + "os-locale@npm:^1.4.0": version: 1.4.0 resolution: "os-locale@npm:1.4.0" @@ -11401,6 +12139,13 @@ __metadata: languageName: node linkType: hard +"p-cancelable@npm:^0.4.0": + version: 0.4.1 + resolution: "p-cancelable@npm:0.4.1" + checksum: d11144d72ee3a99f62fe595cb0e13b8585ea73c3807b4a9671744f1bf5d3ccddb049247a4ec3ceff05ca4adba9d0bb0f1862829daf20795bf528c86fa088509c + languageName: node + linkType: hard + "p-cancelable@npm:^2.0.0": version: 2.1.1 resolution: "p-cancelable@npm:2.1.1" @@ -11415,6 +12160,15 @@ __metadata: languageName: node linkType: hard +"p-event@npm:^2.1.0": + version: 2.3.1 + resolution: "p-event@npm:2.3.1" + dependencies: + p-timeout: ^2.0.1 + checksum: 7f973c4c001045bcd561202fc1b2bdf9e148182bb28a7bafa8e7b2ebfaf71a4f9ba91554222040d364290e707e3ebbb049122b8eda9d2aac413b4cf8de0b79ff + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -11422,6 +12176,13 @@ __metadata: languageName: node linkType: hard +"p-is-promise@npm:^1.1.0": + version: 1.1.0 + resolution: "p-is-promise@npm:1.1.0" + checksum: 64d7c6cda18af2c91c04209e5856c54d1a9818662d2320b34153d446645f431307e04406969a1be00cad680288e86dcf97b9eb39edd5dc4d0b1bd714ee85e13b + languageName: node + linkType: hard + "p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" @@ -11484,6 +12245,15 @@ __metadata: languageName: node linkType: hard +"p-timeout@npm:^2.0.1": + version: 2.0.1 + resolution: "p-timeout@npm:2.0.1" + dependencies: + p-finally: ^1.0.0 + checksum: 9205a661173f03adbeabda8e02826de876376b09c99768bdc33e5b25ae73230e3ac00e520acedbe3cf05fbd3352fb02efbd3811a9a021b148fb15eb07e7accac + languageName: node + linkType: hard + "p-timeout@npm:^3.2.0": version: 3.2.0 resolution: "p-timeout@npm:3.2.0" @@ -11649,6 +12419,13 @@ __metadata: languageName: node linkType: hard +"path-key@npm:^2.0.0, path-key@npm:^2.0.1": + version: 2.0.1 + resolution: "path-key@npm:2.0.1" + checksum: f7ab0ad42fe3fb8c7f11d0c4f849871e28fbd8e1add65c370e422512fc5887097b9cf34d09c1747d45c942a8c1e26468d6356e2df3f740bf177ab8ca7301ebfd + languageName: node + linkType: hard + "path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -11841,13 +12618,20 @@ __metadata: languageName: node linkType: hard -"pify@npm:^2.0.0, pify@npm:^2.2.0": +"pify@npm:^2.0.0, pify@npm:^2.2.0, pify@npm:^2.3.0": version: 2.3.0 resolution: "pify@npm:2.3.0" checksum: 9503aaeaf4577acc58642ad1d25c45c6d90288596238fb68f82811c08104c800e5a7870398e9f015d82b44ecbcbef3dc3d4251a1cbb582f6e5959fe09884b2ba languageName: node linkType: hard +"pify@npm:^3.0.0": + version: 3.0.0 + resolution: "pify@npm:3.0.0" + checksum: 6cdcbc3567d5c412450c53261a3f10991665d660961e06605decf4544a61a97a54fefe70a68d5c37080ff9d6f4cf51444c90198d1ba9f9309a6c0d6e9f5c4fde + languageName: node + linkType: hard + "pify@npm:^4.0.1": version: 4.0.1 resolution: "pify@npm:4.0.1" @@ -12331,6 +13115,13 @@ __metadata: languageName: node linkType: hard +"prepend-http@npm:^2.0.0": + version: 2.0.0 + resolution: "prepend-http@npm:2.0.0" + checksum: 7694a9525405447662c1ffd352fcb41b6410c705b739b6f4e3a3e21cf5fdede8377890088e8934436b8b17ba55365a615f153960f30877bf0d0392f9e93503ea + languageName: node + linkType: hard + "pretty-bytes@npm:^5.6.0": version: 5.6.0 resolution: "pretty-bytes@npm:5.6.0" @@ -12721,6 +13512,17 @@ __metadata: languageName: node linkType: hard +"query-string@npm:^5.0.1": + version: 5.1.1 + resolution: "query-string@npm:5.1.1" + dependencies: + decode-uri-component: ^0.2.0 + object-assign: ^4.1.0 + strict-uri-encode: ^1.0.0 + checksum: 4ac760d9778d413ef5f94f030ed14b1a07a1708dd13fd3bc54f8b9ef7b425942c7577f30de0bf5a7d227ee65a9a0350dfa3a43d1d266880882fb7ce4c434a4dd + languageName: node + linkType: hard + "querystring@npm:0.2.0": version: 0.2.0 resolution: "querystring@npm:0.2.0" @@ -12880,7 +13682,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.1, readable-stream@npm:^2.0.2, readable-stream@npm:^2.0.5, readable-stream@npm:^2.1.5, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.3, readable-stream@npm:^2.3.5, readable-stream@npm:^2.3.6, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.1, readable-stream@npm:^2.0.2, readable-stream@npm:^2.0.5, readable-stream@npm:^2.1.5, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.3, readable-stream@npm:^2.3.5, readable-stream@npm:^2.3.6, readable-stream@npm:~2.3.6": version: 2.3.7 resolution: "readable-stream@npm:2.3.7" dependencies: @@ -13300,6 +14102,15 @@ __metadata: languageName: node linkType: hard +"responselike@npm:1.0.2": + version: 1.0.2 + resolution: "responselike@npm:1.0.2" + dependencies: + lowercase-keys: ^1.0.0 + checksum: 2e9e70f1dcca3da621a80ce71f2f9a9cad12c047145c6ece20df22f0743f051cf7c73505e109814915f23f9e34fb0d358e22827723ee3d56b623533cab8eafcd + languageName: node + linkType: hard + "responselike@npm:^2.0.0": version: 2.0.1 resolution: "responselike@npm:2.0.1" @@ -13467,7 +14278,7 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": +"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 @@ -13590,6 +14401,18 @@ __metadata: languageName: node linkType: hard +"seek-bzip@npm:^1.0.5": + version: 1.0.6 + resolution: "seek-bzip@npm:1.0.6" + dependencies: + commander: ^2.8.1 + bin: + seek-bunzip: bin/seek-bunzip + seek-table: bin/seek-bzip-table + checksum: c2ab3291e7085558499efd4e99d1466ee6782f6c4a4e4c417aa859e1cd2f5117fb3b5444f3d27c38ec5908c0f0312e2a0bc69dff087751f97b3921b5bde4f9ed + languageName: node + linkType: hard + "semver-greatest-satisfied-range@npm:^1.1.0": version: 1.1.0 resolution: "semver-greatest-satisfied-range@npm:1.1.0" @@ -13599,7 +14422,23 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.6.0": +"semver-regex@npm:^2.0.0": + version: 2.0.0 + resolution: "semver-regex@npm:2.0.0" + checksum: da7d6f5ceae80e2097933b1e4ea2815c2cfa2c50c6501db1a3d435a6063c0f23d66bc25fe8d06755048f3d7588d85339db6471446b2c91fea907e5c2ada5b0df + languageName: node + linkType: hard + +"semver-truncate@npm:^1.1.2": + version: 1.1.2 + resolution: "semver-truncate@npm:1.1.2" + dependencies: + semver: ^5.3.0 + checksum: a4583b535184530bdc39cec9f572081a5c2c70b434150f5c2f6eb4177f69cc94f395abb0d995e15c4b0a2cdb2069f3804a38129735367dba86ba250cdcced4dc + languageName: node + linkType: hard + +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0, semver@npm:^5.5.0, semver@npm:^5.6.0": version: 5.7.1 resolution: "semver@npm:5.7.1" bin: @@ -13716,6 +14555,15 @@ __metadata: languageName: node linkType: hard +"shebang-command@npm:^1.2.0": + version: 1.2.0 + resolution: "shebang-command@npm:1.2.0" + dependencies: + shebang-regex: ^1.0.0 + checksum: 9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908 + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -13725,6 +14573,13 @@ __metadata: languageName: node linkType: hard +"shebang-regex@npm:^1.0.0": + version: 1.0.0 + resolution: "shebang-regex@npm:1.0.0" + checksum: 404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372 + languageName: node + linkType: hard + "shebang-regex@npm:^3.0.0": version: 3.0.0 resolution: "shebang-regex@npm:3.0.0" @@ -13784,7 +14639,7 @@ __metadata: languageName: node linkType: hard -"slash@npm:^3.0.0": +"slash@npm:3.0.0, slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" checksum: 94a93fff615f25a999ad4b83c9d5e257a7280c90a32a7cb8b4a87996e4babf322e469c42b7f649fd5796edd8687652f3fb452a86dc97a816f01113183393f11c @@ -13877,6 +14732,15 @@ __metadata: languageName: node linkType: hard +"sort-keys-length@npm:^1.0.0": + version: 1.0.1 + resolution: "sort-keys-length@npm:1.0.1" + dependencies: + sort-keys: ^1.0.0 + checksum: f9acac5fb31580a9e3d43b419dc86a1b75e85b79036a084d95dd4d1062b621c9589906588ac31e370a0dd381be46d8dbe900efa306d087ca9c912d7a59b5a590 + languageName: node + linkType: hard + "sort-keys@npm:^1.0.0": version: 1.1.2 resolution: "sort-keys@npm:1.1.2" @@ -13886,6 +14750,15 @@ __metadata: languageName: node linkType: hard +"sort-keys@npm:^2.0.0": + version: 2.0.0 + resolution: "sort-keys@npm:2.0.0" + dependencies: + is-plain-obj: ^1.0.0 + checksum: f0fd827fa9f8f866e98588d2a38c35209afbf1e9a05bb0e4ceeeb8bbf31d923c8902b0a7e0f561590ddb65e58eba6a74f74b991c85360bcc52e83a3f0d1cffd7 + languageName: node + linkType: hard + "sortablejs@npm:1.14.0": version: 1.14.0 resolution: "sortablejs@npm:1.14.0" @@ -13944,6 +14817,13 @@ __metadata: languageName: node linkType: hard +"source-map@npm:^0.7.3": + version: 0.7.4 + resolution: "source-map@npm:0.7.4" + checksum: 01cc5a74b1f0e1d626a58d36ad6898ea820567e87f18dfc9d24a9843a351aaa2ec09b87422589906d6ff1deed29693e176194dc88bcae7c9a852dc74b311dbf5 + languageName: node + linkType: hard + "sourcemap-codec@npm:^1.4.8": version: 1.4.8 resolution: "sourcemap-codec@npm:1.4.8" @@ -14300,6 +15180,22 @@ __metadata: languageName: node linkType: hard +"strip-dirs@npm:^2.0.0": + version: 2.1.0 + resolution: "strip-dirs@npm:2.1.0" + dependencies: + is-natural-number: ^4.0.1 + checksum: 9465547d71d8819daa7a5c9d4d783289ed8eac72eb06bd687bed382ce62af8ab8e6ffbda229805f5d2e71acce2ca4915e781c94190d284994cbc0b7cdc8303cc + languageName: node + linkType: hard + +"strip-eof@npm:^1.0.0": + version: 1.0.0 + resolution: "strip-eof@npm:1.0.0" + checksum: 40bc8ddd7e072f8ba0c2d6d05267b4e0a4800898c3435b5fb5f5a21e6e47dfaff18467e7aa0d1844bb5d6274c3097246595841fbfeb317e541974ee992cac506 + languageName: node + linkType: hard + "strip-final-newline@npm:^2.0.0": version: 2.0.0 resolution: "strip-final-newline@npm:2.0.0" @@ -14328,6 +15224,15 @@ __metadata: languageName: node linkType: hard +"strip-outer@npm:^1.0.0": + version: 1.0.1 + resolution: "strip-outer@npm:1.0.1" + dependencies: + escape-string-regexp: ^1.0.2 + checksum: f8d65d33ca2b49aabc66bb41d689dda7b8b9959d320e3a40a2ef4d7079ff2f67ffb72db43f179f48dbf9495c2e33742863feab7a584d180fa62505439162c191 + languageName: node + linkType: hard + "strnum@npm:^1.0.4": version: 1.0.5 resolution: "strnum@npm:1.0.5" @@ -14521,6 +15426,21 @@ __metadata: languageName: node linkType: hard +"tar-stream@npm:^1.5.2": + version: 1.6.2 + resolution: "tar-stream@npm:1.6.2" + dependencies: + bl: ^1.0.0 + buffer-alloc: ^1.2.0 + end-of-stream: ^1.0.0 + fs-constants: ^1.0.0 + readable-stream: ^2.3.0 + to-buffer: ^1.1.1 + xtend: ^4.0.0 + checksum: a5d49e232d3e33321bbd150381b6a4e5046bf12b1c2618acb95435b7871efde4d98bd1891eb2200478a7142ef7e304e033eb29bbcbc90451a2cdfa1890e05245 + languageName: node + linkType: hard + "tar-stream@npm:^2.1.4, tar-stream@npm:^2.2.0": version: 2.2.0 resolution: "tar-stream@npm:2.2.0" @@ -14715,6 +15635,13 @@ __metadata: languageName: node linkType: hard +"timed-out@npm:^4.0.1": + version: 4.0.1 + resolution: "timed-out@npm:4.0.1" + checksum: 98efc5d6fc0d2a329277bd4d34f65c1bf44d9ca2b14fd267495df92898f522e6f563c5e9e467c418e0836f5ca1f47a84ca3ee1de79b1cc6fe433834b7f02ec54 + languageName: node + linkType: hard + "tinycolor2@npm:1.5.2": version: 1.5.2 resolution: "tinycolor2@npm:1.5.2" @@ -14741,6 +15668,13 @@ __metadata: languageName: node linkType: hard +"to-buffer@npm:^1.1.1": + version: 1.1.1 + resolution: "to-buffer@npm:1.1.1" + checksum: 6c897f58c2bdd8b8b1645ea515297732fec6dafb089bf36d12370c102ff5d64abf2be9410e0b1b7cfc707bada22d9a4084558010bfc78dd7023748dc5dd9a1ce + languageName: node + linkType: hard + "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" @@ -14873,6 +15807,15 @@ __metadata: languageName: node linkType: hard +"trim-repeated@npm:^1.0.0": + version: 1.0.0 + resolution: "trim-repeated@npm:1.0.0" + dependencies: + escape-string-regexp: ^1.0.2 + checksum: e25c235305b82c43f1d64a67a71226c406b00281755e4c2c4f3b1d0b09c687a535dd3c4483327f949f28bb89dc400a0bc5e5b749054f4b99f49ebfe48ba36496 + languageName: node + linkType: hard + "ts-loader@npm:9.4.2": version: 9.4.2 resolution: "ts-loader@npm:9.4.2" @@ -15222,6 +16165,16 @@ __metadata: languageName: node linkType: hard +"unbzip2-stream@npm:^1.0.9": + version: 1.4.3 + resolution: "unbzip2-stream@npm:1.4.3" + dependencies: + buffer: ^5.2.1 + through: ^2.3.8 + checksum: 0e67c4a91f4fa0fc7b4045f8b914d3498c2fc2e8c39c359977708ec85ac6d6029840e97f508675fdbdf21fcb8d276ca502043406f3682b70f075e69aae626d1d + languageName: node + linkType: hard + "unc-path-regex@npm:^0.1.2": version: 0.1.2 resolution: "unc-path-regex@npm:0.1.2" @@ -15403,6 +16356,15 @@ __metadata: languageName: node linkType: hard +"url-parse-lax@npm:^3.0.0": + version: 3.0.0 + resolution: "url-parse-lax@npm:3.0.0" + dependencies: + prepend-http: ^2.0.0 + checksum: 1040e357750451173132228036aff1fd04abbd43eac1fb3e4fca7495a078bcb8d33cb765fe71ad7e473d9c94d98fd67adca63bd2716c815a2da066198dd37217 + languageName: node + linkType: hard + "url-parse@npm:^1.5.3": version: 1.5.10 resolution: "url-parse@npm:1.5.10" @@ -15420,6 +16382,13 @@ __metadata: languageName: node linkType: hard +"url-to-options@npm:^1.0.1": + version: 1.0.1 + resolution: "url-to-options@npm:1.0.1" + checksum: 20e59f4578525fb0d30ffc22b13b5aa60bc9e57cefd4f5842720f5b57211b6dec54abeae2d675381ac4486fd1a2e987f1318725dea996e503ff89f8c8ce2c17e + languageName: node + linkType: hard + "url@npm:0.10.3": version: 0.10.3 resolution: "url@npm:0.10.3" @@ -15950,7 +16919,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^1.1.1, which@npm:^1.2.14": +"which@npm:^1.1.1, which@npm:^1.2.14, which@npm:^1.2.9": version: 1.3.1 resolution: "which@npm:1.3.1" dependencies: @@ -16313,7 +17282,7 @@ __metadata: languageName: node linkType: hard -"yauzl@npm:^2.10.0": +"yauzl@npm:^2.10.0, yauzl@npm:^2.4.2": version: 2.10.0 resolution: "yauzl@npm:2.10.0" dependencies: From bd57f8f932fa3c94f808ffaa7fefcf22863fb2c3 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 16:51:48 -0800 Subject: [PATCH 25/89] fix: drive/files/create.ts endpoint --- .../backend/src/server/api/endpoints/drive/files/create.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index a37e6cf0c..054ce8a1f 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -3,12 +3,10 @@ import { DriveFiles } from '@/models/index.js'; import { DB_MAX_IMAGE_COMMENT_LENGTH } from '@/misc/hard-limits.js'; import { IdentifiableError } from '@/misc/identifiable-error.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; +import { HOUR } from '@/const.js'; import define from '../../../define.js'; import { apiLogger } from '../../../logger.js'; import { ApiError } from '../../../error.js'; -import { DriveFiles } from '@/models/index.js'; -import { DB_MAX_IMAGE_COMMENT_LENGTH } from '@/misc/hard-limits.js'; -import { HOUR } from '@/const.js'; export const meta = { tags: ['drive'], From 2e256eb138cc41c3f3d4635dd5152233dcf884e7 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Tue, 10 Jan 2023 00:19:16 +0100 Subject: [PATCH 26/89] potentially breaking: default lang I switched the url preview default language from jp-JP to en @thatonecalculator please review --- packages/backend/src/server/web/url-preview.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/web/url-preview.ts b/packages/backend/src/server/web/url-preview.ts index 1e259649f..23819135a 100644 --- a/packages/backend/src/server/web/url-preview.ts +++ b/packages/backend/src/server/web/url-preview.ts @@ -30,10 +30,10 @@ export const urlPreviewHandler = async (ctx: Koa.Context) => { try { const summary = meta.summalyProxy ? await getJson(`${meta.summalyProxy}?${query({ url: url, - lang: lang ?? 'ja-JP', + lang: lang ?? 'en-US', })}`) : await summaly.default(url, { followRedirects: false, - lang: lang ?? 'ja-JP', + lang: lang ?? 'en-US', }); logger.succ(`Got preview of ${url}: ${summary.title}`); From ecebdd57326571a5187c3395966a8b70abb55a4d Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Tue, 10 Jan 2023 01:02:22 +0100 Subject: [PATCH 27/89] update pug description --- packages/backend/src/server/web/index.ts | 2 ++ packages/backend/src/server/web/views/base.pug | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 446df1554..66ff1b725 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -385,6 +385,8 @@ router.get('/notes/:note', async (ctx, next) => { return; } + //TODO: remove. public test. + ctx.set('Debug-Serve', 'public, max-age=15'); await next(); }); diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index b5841883b..e03aeb157 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -50,17 +50,16 @@ html = title || 'Calckey' block desc - meta(name='description' content=desc || 'An open source, decentralized social media platform that\'s free forever! 🚀') + meta(name='description' content= desc || '🌎 A open source, decentralized social media platform that\'s free forever 🚀') block meta if privateMode meta(name='robots' content='noindex') block og - meta(property='og:title' content=title || 'Calckey') - meta(property='og:description' content=desc || 'An open source, decentralized social media platform that\'s free forever! 🚀') - meta(property='og:image' content=img) - meta(property='og:image:alt' content=alt || 'Pfp') + meta(property='og:title' content= title || 'Calckey') + meta(property='og:description' content= desc || '🌎 A open source, decentralized social media platform that\'s free forever 🚀') + meta(property='og:image' content= img) style include ../style.css From 945d43c5e87d7b6426096a988f36f8027627f671 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Wed, 11 Jan 2023 16:47:26 +0100 Subject: [PATCH 28/89] introduce unused posts endpoint --- packages/backend/src/server/web/index.ts | 36 +++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 66ff1b725..4e7e0a76e 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -385,8 +385,36 @@ router.get('/notes/:note', async (ctx, next) => { return; } - //TODO: remove. public test. - ctx.set('Debug-Serve', 'public, max-age=15'); + + await next(); +}); + +router.get('/posts/:note', async (ctx, next) => { + const note = await Notes.findOneBy({ + id: ctx.params.note, + visibility: In(['public', 'home']), + }); + + if (note) { + const _note = await Notes.pack(note); + const profile = await UserProfiles.findOneByOrFail({ userId: note.userId }); + const meta = await fetchMeta(); + await ctx.render('note', { + note: _note, + profile, + avatarUrl: await Users.getAvatarUrl(await Users.findOneByOrFail({ id: note.userId })), + // TODO: Let locale changeable by instance setting + summary: getNoteSummary(_note), + instanceName: meta.name || 'Calckey', + icon: meta.iconUrl, + privateMode: meta.privateMode, + themeColor: meta.themeColor, + }); + + ctx.set('Cache-Control', 'public, max-age=15'); + + return; + } await next(); }); @@ -433,7 +461,7 @@ router.get('/@:user/pages/:page', async (ctx, next) => { }); // Clip -// TODO: 非publicなclipのハンドリング +// TODO: handling of private clips router.get('/clips/:clip', async (ctx, next) => { const clip = await Clips.findOneBy({ id: ctx.params.clip, @@ -550,7 +578,7 @@ router.get('/flush', async ctx => { await ctx.render('flush'); }); -// streamingに非WebSocketリクエストが来た場合にbase htmlをキャシュ付きで返すと、Proxy等でそのパスがキャッシュされておかしくなる +// If a non-WebSocket request comes in to streaming and base html is returned with cache, the path will be cached by Proxy, etc. and it will be wrong. router.get('/streaming', async ctx => { ctx.status = 503; ctx.set('Cache-Control', 'private, max-age=0'); From c6a633e1f0a78df62d7b9c61ada46e1df66b3a16 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Wed, 11 Jan 2023 19:42:04 +0100 Subject: [PATCH 29/89] refactor: merge CI configs --- .woodpecker/{commitDatabase.yml => commit.yml} | 11 +++-------- .woodpecker/commitBuild.yml | 16 ---------------- .woodpecker/prSecurityCheck.yml | 7 ------- .woodpecker/{commitDocker.yml => testDocker.yml} | 0 4 files changed, 3 insertions(+), 31 deletions(-) rename .woodpecker/{commitDatabase.yml => commit.yml} (76%) delete mode 100644 .woodpecker/commitBuild.yml delete mode 100644 .woodpecker/prSecurityCheck.yml rename .woodpecker/{commitDocker.yml => testDocker.yml} (100%) diff --git a/.woodpecker/commitDatabase.yml b/.woodpecker/commit.yml similarity index 76% rename from .woodpecker/commitDatabase.yml rename to .woodpecker/commit.yml index de711ba19..87014f127 100644 --- a/.woodpecker/commitDatabase.yml +++ b/.woodpecker/commit.yml @@ -1,26 +1,21 @@ pipeline: - migrate: + testCommit: image: node:latest commands: - cp .config/ci.yml .config/default.yml - corepack enable - yarn set version berry - yarn install --immutable - - yarn build + - yarn run build - yarn migrate services: database: - image: postgres:${DATABASE} + image: postgres:15 environment: - POSTGRES_PASSWORD=test redis: image: redis -matrix: - DATABASE: - - 12 - - latest - branches: include: [ main, develop, feature/* ] diff --git a/.woodpecker/commitBuild.yml b/.woodpecker/commitBuild.yml deleted file mode 100644 index ffaf78355..000000000 --- a/.woodpecker/commitBuild.yml +++ /dev/null @@ -1,16 +0,0 @@ -pipeline: - build: - image: node:${NODE_VERSION} - commands: - - corepack enable - - yarn set version berry - - yarn install --immutable - - yarn build - -matrix: - NODE_VERSION: - - 18.12.1 - - latest - -branches: - include: [ main, develop, feature/* ] diff --git a/.woodpecker/prSecurityCheck.yml b/.woodpecker/prSecurityCheck.yml deleted file mode 100644 index 0160c2bca..000000000 --- a/.woodpecker/prSecurityCheck.yml +++ /dev/null @@ -1,7 +0,0 @@ -pipeline: - build: - image: node:latest - commands: - - corepack enable - - yarn set version berry - - yarn install --immutable diff --git a/.woodpecker/commitDocker.yml b/.woodpecker/testDocker.yml similarity index 100% rename from .woodpecker/commitDocker.yml rename to .woodpecker/testDocker.yml From 54607cd1e9e45365d4a55d45224ddb6ba842710f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 11 Jan 2023 10:44:05 -0800 Subject: [PATCH 30/89] Revert "update pug description" This reverts commit a79e5275fea7144a834f8faf39ec9b2680278c9b. --- packages/backend/src/server/web/views/base.pug | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index e03aeb157..b5841883b 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -50,16 +50,17 @@ html = title || 'Calckey' block desc - meta(name='description' content= desc || '🌎 A open source, decentralized social media platform that\'s free forever 🚀') + meta(name='description' content=desc || 'An open source, decentralized social media platform that\'s free forever! 🚀') block meta if privateMode meta(name='robots' content='noindex') block og - meta(property='og:title' content= title || 'Calckey') - meta(property='og:description' content= desc || '🌎 A open source, decentralized social media platform that\'s free forever 🚀') - meta(property='og:image' content= img) + meta(property='og:title' content=title || 'Calckey') + meta(property='og:description' content=desc || 'An open source, decentralized social media platform that\'s free forever! 🚀') + meta(property='og:image' content=img) + meta(property='og:image:alt' content=alt || 'Pfp') style include ../style.css From 80febfe73ab054f751f093724de1a4e0a7c63561 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 11 Jan 2023 10:48:17 -0800 Subject: [PATCH 31/89] Revert "refactor: :wrench: vite config" This reverts commit 83fe5ca70170c96b306bfb971b100b11076176d2. --- package.json | 2 -- packages/client/tsconfig.json | 2 +- packages/client/vite.config.ts | 57 +++++++--------------------------- packages/sw/tsconfig.json | 2 +- yarn.lock | 32 +++---------------- 5 files changed, 18 insertions(+), 77 deletions(-) diff --git a/package.json b/package.json index fb7992f43..c50e057a6 100644 --- a/package.json +++ b/package.json @@ -58,14 +58,12 @@ "devDependencies": { "@types/gulp": "4.0.10", "@types/gulp-rename": "2.0.1", - "@types/node": "^18.11.18", "@typescript-eslint/parser": "5.46.1", "cross-env": "7.0.3", "cypress": "10.11.0", "install-peers": "^1.0.4", "start-server-and-test": "1.15.2", "typescript": "4.9.4", - "vite-plugin-webfont-dl": "^3.4.3", "vue-eslint-parser": "^9.1.0" } } diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 2586f899d..86109f600 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -9,7 +9,7 @@ "noFallthroughCasesInSwitch": true, "declaration": false, "sourceMap": false, - "target": "es2022", + "target": "es2017", "module": "esnext", "moduleResolution": "node", "removeComments": false, diff --git a/packages/client/vite.config.ts b/packages/client/vite.config.ts index 15c8048ec..d9b78c779 100644 --- a/packages/client/vite.config.ts +++ b/packages/client/vite.config.ts @@ -1,43 +1,17 @@ +import * as fs from 'fs'; import pluginVue from '@vitejs/plugin-vue'; import { defineConfig } from 'vite'; -import webfontDownload from 'vite-plugin-webfont-dl'; import locales from '../../locales'; import meta from '../../package.json'; import pluginJson5 from './vite.json5'; const extensions = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.json', '.json5', '.svg', '.sass', '.scss', '.css', '.vue']; -const hash = (str: string, seed = 0): number => { - let h1 = 0xdeadbeef ^ seed, - h2 = 0x41c6ce57 ^ seed; - for (let i = 0, ch; i < str.length; i++) { - ch = str.charCodeAt(i); - h1 = Math.imul(h1 ^ ch, 2654435761); - h2 = Math.imul(h2 ^ ch, 1597334677); - } - - h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909); - h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909); - - return 4294967296 * (2097151 & h2) + (h1 >>> 0); -}; - -const BASE62_DIGITS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; -function toBase62(n: number): string { - if (n === 0) { - return '0'; - } - let result = ''; - while (n > 0) { - result = BASE62_DIGITS[n % BASE62_DIGITS.length] + result; - n = Math.floor(n / BASE62_DIGITS.length); - } - - return result; -} - export default defineConfig(({ command, mode }) => { + fs.mkdirSync(__dirname + '/../../built', { recursive: true }); + fs.writeFileSync(__dirname + '/../../built/meta.json', JSON.stringify({ version: meta.version }), 'utf-8'); + return { base: '/assets/', @@ -46,7 +20,6 @@ export default defineConfig(({ command, mode }) => { reactivityTransform: true, }), pluginJson5(), - webfontDownload(), ], resolve: { @@ -58,14 +31,6 @@ export default defineConfig(({ command, mode }) => { }, }, - css: { - modules: { - generateScopedName: (name, filename, css) => { - return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4); - }, - }, - }, - define: { _VERSION_: JSON.stringify(meta.version), _LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])), @@ -81,9 +46,10 @@ export default defineConfig(({ command, mode }) => { build: { target: [ - 'chrome108', - 'firefox109', - 'safari16', + 'chrome100', + 'firefox100', + 'safari15', + 'es2021', // TODO: keep this up to date ], manifest: 'manifest.json', rollupOptions: { @@ -97,14 +63,15 @@ export default defineConfig(({ command, mode }) => { }, }, cssCodeSplit: true, + assetsInlineLimit: 0, outDir: __dirname + '/../../built/_client_dist_', assetsDir: '.', emptyOutDir: false, - sourcemap: process.env.NODE_ENV === 'development', - reportCompressedSize: true, + sourcemap: process.env.NODE_ENV !== 'production', + reportCompressedSize: false, }, optimizeDeps: { - auto: true, + auto: true }, }; }); diff --git a/packages/sw/tsconfig.json b/packages/sw/tsconfig.json index e512cc6ec..fad2ae567 100644 --- a/packages/sw/tsconfig.json +++ b/packages/sw/tsconfig.json @@ -9,7 +9,7 @@ "noFallthroughCasesInSwitch": true, "declaration": false, "sourceMap": false, - "target": "es2022", + "target": "es2017", "module": "esnext", "moduleResolution": "node", "removeComments": false, diff --git a/yarn.lock b/yarn.lock index 47698dc88..b6ca5d706 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1944,7 +1944,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:18.11.18, @types/node@npm:^18.11.18": +"@types/node@npm:18.11.18": version: 18.11.18 resolution: "@types/node@npm:18.11.18" checksum: 03f17f9480f8d775c8a72da5ea7e9383db5f6d85aa5fefde90dd953a1449bd5e4ffde376f139da4f3744b4c83942166d2a7603969a6f8ea826edfb16e6e3b49d @@ -3272,7 +3272,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.25, axios@npm:^0.25.0": +"axios@npm:^0.25.0": version: 0.25.0 resolution: "axios@npm:0.25.0" dependencies: @@ -4078,7 +4078,6 @@ __metadata: "@tensorflow/tfjs": ^3.21.0 "@types/gulp": 4.0.10 "@types/gulp-rename": 2.0.1 - "@types/node": ^18.11.18 "@typescript-eslint/parser": 5.46.1 calckey-js: ^0.0.20 cross-env: 7.0.3 @@ -4097,7 +4096,6 @@ __metadata: seedrandom: ^3.0.5 start-server-and-test: 1.15.2 typescript: 4.9.4 - vite-plugin-webfont-dl: ^3.4.3 vue-eslint-parser: ^9.1.0 languageName: unknown linkType: soft @@ -4416,15 +4414,6 @@ __metadata: languageName: node linkType: hard -"clean-css@npm:^5.3": - version: 5.3.1 - resolution: "clean-css@npm:5.3.1" - dependencies: - source-map: ~0.6.0 - checksum: 860696c60503cbfec480b5f92f62729246304b55950571af7292f2687b57f86b277f2b9fefe6f64643d409008018b78383972b55c2cc859792dcc8658988fb16 - languageName: node - linkType: hard - "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -12604,7 +12593,7 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0, picocolors@npm:^1.0.0": +"picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 @@ -14810,7 +14799,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": +"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 @@ -16616,19 +16605,6 @@ __metadata: languageName: node linkType: hard -"vite-plugin-webfont-dl@npm:^3.4.3": - version: 3.4.3 - resolution: "vite-plugin-webfont-dl@npm:3.4.3" - dependencies: - axios: ^0.25 - clean-css: ^5.3 - picocolors: ^1.0 - peerDependencies: - vite: ^2 || ^3 || ^4 - checksum: cc890e30765f05039414299afc0d9894c72d5b832510144c27abf535cc16d342f8e57f4a4a310e010a5eb69e361d9fd7a5f8002de5c8d01f9bdb4edffcd2b8a9 - languageName: node - linkType: hard - "vite@npm:^4.0.4": version: 4.0.4 resolution: "vite@npm:4.0.4" From 05319344223bf17dd8e19c5f9d1ac3d0a661a3ad Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 11 Jan 2023 10:50:46 -0800 Subject: [PATCH 32/89] fix build --- packages/client/vite.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/client/vite.config.ts b/packages/client/vite.config.ts index d9b78c779..dfc6a3b66 100644 --- a/packages/client/vite.config.ts +++ b/packages/client/vite.config.ts @@ -46,10 +46,10 @@ export default defineConfig(({ command, mode }) => { build: { target: [ - 'chrome100', - 'firefox100', - 'safari15', - 'es2021', // TODO: keep this up to date + 'chrome108', + 'firefox109', + 'safari16', + 'es2022', ], manifest: 'manifest.json', rollupOptions: { @@ -67,11 +67,11 @@ export default defineConfig(({ command, mode }) => { outDir: __dirname + '/../../built/_client_dist_', assetsDir: '.', emptyOutDir: false, - sourcemap: process.env.NODE_ENV !== 'production', + sourcemap: process.env.NODE_ENV === 'development', reportCompressedSize: false, }, optimizeDeps: { - auto: true + auto: true, }, }; }); From 0d0e3ca2f3f7bfa940e4ac5f0d04858da7750811 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Thu, 12 Jan 2023 20:19:12 +0100 Subject: [PATCH 33/89] hopefully this fixed chat updates --- packages/client/src/components/MkPagination.vue | 1 + packages/client/src/pages/messaging/index.vue | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/MkPagination.vue b/packages/client/src/components/MkPagination.vue index 9f1fad38e..703e8c66b 100644 --- a/packages/client/src/components/MkPagination.vue +++ b/packages/client/src/components/MkPagination.vue @@ -64,6 +64,7 @@ const props = withDefaults(defineProps<{ pagination: Paging; disableAutoLoad?: boolean; displayLimit?: number; + reloadKey?: number; }>(), { displayLimit: 30, }); diff --git a/packages/client/src/pages/messaging/index.vue b/packages/client/src/pages/messaging/index.vue index af2baf852..3798ec6f8 100644 --- a/packages/client/src/pages/messaging/index.vue +++ b/packages/client/src/pages/messaging/index.vue @@ -37,7 +37,7 @@ From 1da7464ee7a295157567f2f2dd1ab944f28fd737 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 16 Jan 2023 11:19:20 -0800 Subject: [PATCH 79/89] clean up w/ rome --- packages/backend/src/mfm/from-html.ts | 2 +- .../src/misc/is-duplicate-key-value-error.ts | 4 +--- packages/backend/src/misc/is-user-related.ts | 3 +-- packages/backend/src/prelude/await-all.ts | 2 +- .../src/queue/processors/db/export-blocking.ts | 6 ++++-- .../queue/processors/db/export-custom-emojis.ts | 6 ++++-- .../src/queue/processors/db/export-following.ts | 6 ++++-- .../src/queue/processors/db/export-mute.ts | 6 ++++-- .../src/queue/processors/db/export-notes.ts | 6 ++++-- .../src/queue/processors/db/export-user-lists.ts | 6 ++++-- .../src/remote/activitypub/models/question.ts | 2 +- .../src/remote/activitypub/renderer/person.ts | 15 +++++++-------- packages/backend/src/remote/webfinger.ts | 12 ++++++------ packages/backend/src/server/api/2fa.ts | 6 +++--- .../api/endpoints/admin/abuse-user-reports.ts | 1 - .../api/endpoints/admin/accounts/create.ts | 1 - .../api/endpoints/admin/accounts/delete.ts | 1 - .../api/endpoints/admin/accounts/hosted.ts | 1 - .../src/server/api/endpoints/admin/ad/create.ts | 1 - .../src/server/api/endpoints/admin/ad/delete.ts | 1 - .../src/server/api/endpoints/admin/ad/list.ts | 1 - .../src/server/api/endpoints/admin/ad/update.ts | 1 - .../api/endpoints/admin/announcements/create.ts | 1 - .../api/endpoints/admin/announcements/delete.ts | 1 - .../api/endpoints/admin/announcements/list.ts | 1 - .../api/endpoints/admin/announcements/update.ts | 1 - .../server/api/endpoints/admin/delete-account.ts | 1 - .../admin/delete-all-files-of-a-user.ts | 1 - .../endpoints/admin/drive-capacity-override.ts | 1 - .../endpoints/admin/drive/clean-remote-files.ts | 1 - .../server/api/endpoints/admin/drive/cleanup.ts | 1 - .../server/api/endpoints/admin/drive/files.ts | 1 - .../api/endpoints/admin/drive/show-file.ts | 1 - .../endpoints/admin/emoji/add-aliases-bulk.ts | 1 - .../src/server/api/endpoints/admin/emoji/add.ts | 1 - .../src/server/api/endpoints/admin/emoji/copy.ts | 1 - .../api/endpoints/admin/emoji/delete-bulk.ts | 1 - .../server/api/endpoints/admin/emoji/delete.ts | 1 - .../api/endpoints/admin/emoji/import-zip.ts | 1 - .../api/endpoints/admin/emoji/list-remote.ts | 1 - .../src/server/api/endpoints/admin/emoji/list.ts | 1 - .../endpoints/admin/emoji/remove-aliases-bulk.ts | 1 - .../endpoints/admin/emoji/set-aliases-bulk.ts | 1 - .../endpoints/admin/emoji/set-category-bulk.ts | 1 - .../server/api/endpoints/admin/emoji/update.ts | 1 - .../admin/federation/delete-all-files.ts | 1 - .../refresh-remote-instance-metadata.ts | 1 - .../admin/federation/remove-all-following.ts | 1 - .../admin/federation/update-instance.ts | 1 - .../api/endpoints/admin/get-index-stats.ts | 1 - .../api/endpoints/admin/get-table-stats.ts | 1 - .../server/api/endpoints/admin/get-user-ips.ts | 1 - .../src/server/api/endpoints/admin/invite.ts | 1 - .../src/server/api/endpoints/admin/meta.ts | 1 - .../server/api/endpoints/admin/moderators/add.ts | 1 - .../api/endpoints/admin/moderators/remove.ts | 1 - .../server/api/endpoints/admin/promo/create.ts | 1 - .../server/api/endpoints/admin/queue/clear.ts | 1 - .../api/endpoints/admin/queue/deliver-delayed.ts | 1 - .../api/endpoints/admin/queue/inbox-delayed.ts | 1 - .../server/api/endpoints/admin/queue/stats.ts | 1 - .../src/server/api/endpoints/admin/relays/add.ts | 1 - .../server/api/endpoints/admin/relays/list.ts | 1 - .../server/api/endpoints/admin/relays/remove.ts | 1 - .../server/api/endpoints/admin/reset-password.ts | 1 - .../endpoints/admin/resolve-abuse-user-report.ts | 1 - .../src/server/api/endpoints/admin/send-email.ts | 1 - .../server/api/endpoints/admin/server-info.ts | 1 - .../api/endpoints/admin/show-moderation-logs.ts | 1 - .../src/server/api/endpoints/admin/show-user.ts | 1 - .../src/server/api/endpoints/admin/show-users.ts | 1 - .../server/api/endpoints/admin/silence-user.ts | 1 - .../server/api/endpoints/admin/suspend-user.ts | 1 - .../server/api/endpoints/admin/unsilence-user.ts | 1 - .../server/api/endpoints/admin/unsuspend-user.ts | 1 - .../server/api/endpoints/admin/update-meta.ts | 1 - .../api/endpoints/admin/update-user-note.ts | 1 - .../src/server/api/endpoints/admin/vacuum.ts | 1 - .../src/server/api/endpoints/announcements.ts | 1 - .../src/server/api/endpoints/antennas/create.ts | 1 - .../src/server/api/endpoints/antennas/delete.ts | 1 - .../src/server/api/endpoints/antennas/list.ts | 1 - .../server/api/endpoints/antennas/markread.ts | 1 - .../src/server/api/endpoints/antennas/notes.ts | 1 - .../src/server/api/endpoints/antennas/show.ts | 1 - .../src/server/api/endpoints/antennas/update.ts | 1 - .../backend/src/server/api/endpoints/ap/get.ts | 1 - .../backend/src/server/api/endpoints/ap/show.ts | 1 - .../src/server/api/endpoints/app/create.ts | 1 - .../backend/src/server/api/endpoints/app/show.ts | 1 - .../src/server/api/endpoints/auth/accept.ts | 1 - .../api/endpoints/auth/session/generate.ts | 1 - .../server/api/endpoints/auth/session/show.ts | 1 - .../server/api/endpoints/auth/session/userkey.ts | 1 - .../src/server/api/endpoints/blocking/create.ts | 1 - .../src/server/api/endpoints/blocking/delete.ts | 1 - .../src/server/api/endpoints/blocking/list.ts | 1 - .../src/server/api/endpoints/channels/create.ts | 1 - .../server/api/endpoints/channels/featured.ts | 1 - .../src/server/api/endpoints/channels/follow.ts | 1 - .../server/api/endpoints/channels/followed.ts | 1 - .../src/server/api/endpoints/channels/owned.ts | 1 - .../src/server/api/endpoints/channels/show.ts | 1 - .../server/api/endpoints/channels/timeline.ts | 1 - .../server/api/endpoints/channels/unfollow.ts | 1 - .../src/server/api/endpoints/channels/update.ts | 1 - .../server/api/endpoints/charts/active-users.ts | 1 - .../server/api/endpoints/charts/ap-request.ts | 1 - .../src/server/api/endpoints/charts/drive.ts | 1 - .../server/api/endpoints/charts/federation.ts | 1 - .../src/server/api/endpoints/charts/hashtag.ts | 1 - .../src/server/api/endpoints/charts/instance.ts | 1 - .../src/server/api/endpoints/charts/notes.ts | 1 - .../server/api/endpoints/charts/user/drive.ts | 1 - .../api/endpoints/charts/user/following.ts | 1 - .../server/api/endpoints/charts/user/notes.ts | 1 - .../api/endpoints/charts/user/reactions.ts | 1 - .../src/server/api/endpoints/charts/users.ts | 1 - .../src/server/api/endpoints/clips/add-note.ts | 1 - .../src/server/api/endpoints/clips/create.ts | 1 - .../src/server/api/endpoints/clips/delete.ts | 1 - .../src/server/api/endpoints/clips/list.ts | 1 - .../src/server/api/endpoints/clips/notes.ts | 1 - .../server/api/endpoints/clips/remove-note.ts | 1 - .../src/server/api/endpoints/clips/show.ts | 1 - .../src/server/api/endpoints/clips/update.ts | 1 - .../api/endpoints/compatibility/custom-emojis.ts | 1 - .../api/endpoints/compatibility/instance-info.ts | 1 - .../src/server/api/endpoints/custom-motd.ts | 1 - .../server/api/endpoints/custom-splash-icons.ts | 1 - .../backend/src/server/api/endpoints/drive.ts | 1 - .../src/server/api/endpoints/drive/files.ts | 1 - .../api/endpoints/drive/files/attached-notes.ts | 1 - .../api/endpoints/drive/files/caption-image.ts | 1 - .../api/endpoints/drive/files/check-existence.ts | 1 - .../server/api/endpoints/drive/files/create.ts | 1 - .../server/api/endpoints/drive/files/delete.ts | 3 +-- .../api/endpoints/drive/files/find-by-hash.ts | 1 - .../src/server/api/endpoints/drive/files/find.ts | 1 - .../src/server/api/endpoints/drive/files/show.ts | 3 +-- .../server/api/endpoints/drive/files/update.ts | 3 +-- .../api/endpoints/drive/files/upload-from-url.ts | 1 - .../src/server/api/endpoints/drive/folders.ts | 1 - .../server/api/endpoints/drive/folders/create.ts | 1 - .../server/api/endpoints/drive/folders/delete.ts | 1 - .../server/api/endpoints/drive/folders/find.ts | 1 - .../server/api/endpoints/drive/folders/show.ts | 1 - .../server/api/endpoints/drive/folders/update.ts | 1 - .../src/server/api/endpoints/drive/stream.ts | 1 - .../api/endpoints/email-address/available.ts | 1 - .../backend/src/server/api/endpoints/endpoint.ts | 1 - .../src/server/api/endpoints/endpoints.ts | 1 - .../server/api/endpoints/export-custom-emojis.ts | 1 - .../server/api/endpoints/federation/followers.ts | 1 - .../server/api/endpoints/federation/following.ts | 1 - .../server/api/endpoints/federation/instances.ts | 1 - .../api/endpoints/federation/show-instance.ts | 1 - .../src/server/api/endpoints/federation/stats.ts | 1 - .../endpoints/federation/update-remote-user.ts | 1 - .../src/server/api/endpoints/federation/users.ts | 1 - .../src/server/api/endpoints/fetch-rss.ts | 1 - .../src/server/api/endpoints/following/create.ts | 1 - .../src/server/api/endpoints/following/delete.ts | 1 - .../server/api/endpoints/following/invalidate.ts | 1 - .../api/endpoints/following/requests/accept.ts | 1 - .../api/endpoints/following/requests/cancel.ts | 1 - .../api/endpoints/following/requests/list.ts | 1 - .../api/endpoints/following/requests/reject.ts | 1 - .../src/server/api/endpoints/gallery/featured.ts | 1 - .../src/server/api/endpoints/gallery/popular.ts | 1 - .../src/server/api/endpoints/gallery/posts.ts | 1 - .../server/api/endpoints/gallery/posts/create.ts | 1 - .../server/api/endpoints/gallery/posts/delete.ts | 1 - .../server/api/endpoints/gallery/posts/like.ts | 1 - .../server/api/endpoints/gallery/posts/show.ts | 1 - .../server/api/endpoints/gallery/posts/unlike.ts | 1 - .../server/api/endpoints/gallery/posts/update.ts | 1 - .../api/endpoints/get-online-users-count.ts | 1 - .../src/server/api/endpoints/hashtags/list.ts | 1 - .../src/server/api/endpoints/hashtags/search.ts | 1 - .../src/server/api/endpoints/hashtags/show.ts | 1 - .../src/server/api/endpoints/hashtags/trend.ts | 1 - .../src/server/api/endpoints/hashtags/users.ts | 1 - packages/backend/src/server/api/endpoints/i.ts | 1 - .../src/server/api/endpoints/i/2fa/done.ts | 1 - .../src/server/api/endpoints/i/2fa/key-done.ts | 1 - .../server/api/endpoints/i/2fa/password-less.ts | 1 - .../server/api/endpoints/i/2fa/register-key.ts | 1 - .../src/server/api/endpoints/i/2fa/register.ts | 1 - .../src/server/api/endpoints/i/2fa/remove-key.ts | 1 - .../src/server/api/endpoints/i/2fa/unregister.ts | 1 - .../backend/src/server/api/endpoints/i/apps.ts | 1 - .../server/api/endpoints/i/authorized-apps.ts | 1 - .../server/api/endpoints/i/change-password.ts | 1 - .../src/server/api/endpoints/i/delete-account.ts | 1 - .../server/api/endpoints/i/export-blocking.ts | 1 - .../server/api/endpoints/i/export-following.ts | 1 - .../src/server/api/endpoints/i/export-mute.ts | 1 - .../src/server/api/endpoints/i/export-notes.ts | 1 - .../server/api/endpoints/i/export-user-lists.ts | 1 - .../src/server/api/endpoints/i/favorites.ts | 1 - .../src/server/api/endpoints/i/gallery/likes.ts | 1 - .../src/server/api/endpoints/i/gallery/posts.ts | 1 - .../endpoints/i/get-word-muted-notes-count.ts | 1 - .../server/api/endpoints/i/import-blocking.ts | 1 - .../server/api/endpoints/i/import-following.ts | 1 - .../src/server/api/endpoints/i/import-muting.ts | 1 - .../server/api/endpoints/i/import-user-lists.ts | 1 - .../src/server/api/endpoints/i/known-as.ts | 1 - .../backend/src/server/api/endpoints/i/move.ts | 3 +-- .../src/server/api/endpoints/i/notifications.ts | 1 - .../src/server/api/endpoints/i/page-likes.ts | 1 - .../backend/src/server/api/endpoints/i/pages.ts | 1 - .../backend/src/server/api/endpoints/i/pin.ts | 1 - .../endpoints/i/read-all-messaging-messages.ts | 1 - .../api/endpoints/i/read-all-unread-notes.ts | 1 - .../server/api/endpoints/i/read-announcement.ts | 1 - .../server/api/endpoints/i/regenerate-token.ts | 1 - .../server/api/endpoints/i/registry/get-all.ts | 1 - .../api/endpoints/i/registry/get-detail.ts | 1 - .../src/server/api/endpoints/i/registry/get.ts | 1 - .../api/endpoints/i/registry/keys-with-type.ts | 1 - .../src/server/api/endpoints/i/registry/keys.ts | 1 - .../server/api/endpoints/i/registry/remove.ts | 1 - .../server/api/endpoints/i/registry/scopes.ts | 1 - .../src/server/api/endpoints/i/registry/set.ts | 1 - .../src/server/api/endpoints/i/revoke-token.ts | 1 - .../src/server/api/endpoints/i/signin-history.ts | 1 - .../backend/src/server/api/endpoints/i/unpin.ts | 1 - .../src/server/api/endpoints/i/update-email.ts | 1 - .../backend/src/server/api/endpoints/i/update.ts | 1 - .../server/api/endpoints/i/user-group-invites.ts | 1 - .../server/api/endpoints/i/webhooks/create.ts | 1 - .../server/api/endpoints/i/webhooks/delete.ts | 1 - .../src/server/api/endpoints/i/webhooks/list.ts | 1 - .../src/server/api/endpoints/i/webhooks/show.ts | 1 - .../server/api/endpoints/i/webhooks/update.ts | 1 - .../src/server/api/endpoints/latest-version.ts | 1 - .../server/api/endpoints/messaging/history.ts | 1 - .../server/api/endpoints/messaging/messages.ts | 1 - .../api/endpoints/messaging/messages/create.ts | 1 - .../api/endpoints/messaging/messages/delete.ts | 1 - .../api/endpoints/messaging/messages/read.ts | 1 - .../backend/src/server/api/endpoints/meta.ts | 1 - .../src/server/api/endpoints/miauth/gen-token.ts | 1 - .../src/server/api/endpoints/mute/create.ts | 1 - .../src/server/api/endpoints/mute/delete.ts | 1 - .../src/server/api/endpoints/mute/list.ts | 1 - .../backend/src/server/api/endpoints/my/apps.ts | 1 - .../backend/src/server/api/endpoints/notes.ts | 1 - .../src/server/api/endpoints/notes/children.ts | 1 - .../src/server/api/endpoints/notes/clips.ts | 1 - .../server/api/endpoints/notes/conversation.ts | 1 - .../src/server/api/endpoints/notes/create.ts | 1 - .../src/server/api/endpoints/notes/delete.ts | 3 +-- .../api/endpoints/notes/favorites/create.ts | 1 - .../api/endpoints/notes/favorites/delete.ts | 1 - .../src/server/api/endpoints/notes/featured.ts | 1 - .../api/endpoints/notes/global-timeline.ts | 3 +-- .../api/endpoints/notes/hybrid-timeline.ts | 1 - .../server/api/endpoints/notes/local-timeline.ts | 3 +-- .../src/server/api/endpoints/notes/mentions.ts | 1 - .../api/endpoints/notes/polls/recommendation.ts | 1 - .../src/server/api/endpoints/notes/polls/vote.ts | 1 - .../src/server/api/endpoints/notes/reactions.ts | 1 - .../api/endpoints/notes/reactions/create.ts | 1 - .../api/endpoints/notes/reactions/delete.ts | 1 - .../api/endpoints/notes/recommended-timeline.ts | 3 +-- .../src/server/api/endpoints/notes/renotes.ts | 1 - .../src/server/api/endpoints/notes/replies.ts | 1 - .../server/api/endpoints/notes/search-by-tag.ts | 1 - .../src/server/api/endpoints/notes/search.ts | 1 - .../src/server/api/endpoints/notes/show.ts | 1 - .../src/server/api/endpoints/notes/state.ts | 1 - .../api/endpoints/notes/thread-muting/create.ts | 1 - .../api/endpoints/notes/thread-muting/delete.ts | 1 - .../src/server/api/endpoints/notes/timeline.ts | 1 - .../src/server/api/endpoints/notes/translate.ts | 1 - .../src/server/api/endpoints/notes/unrenote.ts | 1 - .../api/endpoints/notes/user-list-timeline.ts | 1 - .../api/endpoints/notes/watching/create.ts | 1 - .../api/endpoints/notes/watching/delete.ts | 1 - .../server/api/endpoints/notifications/create.ts | 1 - .../endpoints/notifications/mark-all-as-read.ts | 1 - .../server/api/endpoints/notifications/read.ts | 1 - .../src/server/api/endpoints/page-push.ts | 1 - .../src/server/api/endpoints/pages/create.ts | 1 - .../src/server/api/endpoints/pages/delete.ts | 1 - .../src/server/api/endpoints/pages/featured.ts | 1 - .../src/server/api/endpoints/pages/like.ts | 1 - .../src/server/api/endpoints/pages/show.ts | 1 - .../src/server/api/endpoints/pages/unlike.ts | 1 - .../src/server/api/endpoints/pages/update.ts | 1 - .../backend/src/server/api/endpoints/patrons.ts | 1 - .../backend/src/server/api/endpoints/ping.ts | 1 - .../src/server/api/endpoints/pinned-users.ts | 1 - .../src/server/api/endpoints/promo/read.ts | 1 - .../api/endpoints/recommended-instances.ts | 1 - .../backend/src/server/api/endpoints/release.ts | 1 - .../api/endpoints/request-reset-password.ts | 1 - .../backend/src/server/api/endpoints/reset-db.ts | 1 - .../src/server/api/endpoints/reset-password.ts | 1 - .../src/server/api/endpoints/server-info.ts | 1 - .../backend/src/server/api/endpoints/stats.ts | 1 - .../src/server/api/endpoints/sw/register.ts | 1 - .../src/server/api/endpoints/sw/unregister.ts | 1 - .../backend/src/server/api/endpoints/test.ts | 1 - .../server/api/endpoints/username/available.ts | 1 - .../backend/src/server/api/endpoints/users.ts | 1 - .../src/server/api/endpoints/users/clips.ts | 1 - .../src/server/api/endpoints/users/followers.ts | 1 - .../src/server/api/endpoints/users/following.ts | 1 - .../server/api/endpoints/users/gallery/posts.ts | 1 - .../users/get-frequently-replied-users.ts | 1 - .../server/api/endpoints/users/groups/create.ts | 1 - .../server/api/endpoints/users/groups/delete.ts | 1 - .../endpoints/users/groups/invitations/accept.ts | 1 - .../endpoints/users/groups/invitations/reject.ts | 1 - .../server/api/endpoints/users/groups/invite.ts | 1 - .../server/api/endpoints/users/groups/joined.ts | 1 - .../server/api/endpoints/users/groups/leave.ts | 1 - .../server/api/endpoints/users/groups/owned.ts | 1 - .../server/api/endpoints/users/groups/pull.ts | 1 - .../server/api/endpoints/users/groups/show.ts | 1 - .../api/endpoints/users/groups/transfer.ts | 1 - .../server/api/endpoints/users/groups/update.ts | 1 - .../server/api/endpoints/users/lists/create.ts | 1 - .../api/endpoints/users/lists/delete-all.ts | 1 - .../server/api/endpoints/users/lists/delete.ts | 1 - .../src/server/api/endpoints/users/lists/list.ts | 1 - .../src/server/api/endpoints/users/lists/pull.ts | 1 - .../src/server/api/endpoints/users/lists/push.ts | 1 - .../src/server/api/endpoints/users/lists/show.ts | 1 - .../server/api/endpoints/users/lists/update.ts | 1 - .../src/server/api/endpoints/users/notes.ts | 1 - .../src/server/api/endpoints/users/pages.ts | 1 - .../src/server/api/endpoints/users/reactions.ts | 1 - .../server/api/endpoints/users/recommendation.ts | 1 - .../src/server/api/endpoints/users/relation.ts | 1 - .../server/api/endpoints/users/report-abuse.ts | 1 - .../users/search-by-username-and-host.ts | 1 - .../src/server/api/endpoints/users/search.ts | 1 - .../src/server/api/endpoints/users/show.ts | 1 - .../src/server/api/endpoints/users/stats.ts | 1 - .../src/server/api/stream/channels/channel.ts | 3 ++- .../api/stream/channels/global-timeline.ts | 2 +- .../server/api/stream/channels/local-timeline.ts | 2 +- .../src/server/api/stream/channels/messaging.ts | 3 ++- .../backend/src/server/file/send-drive-file.ts | 1 - packages/backend/src/server/proxy/proxy-media.ts | 2 +- packages/backend/src/server/web/index.ts | 6 +++--- .../src/services/fetch-instance-metadata.ts | 6 +----- packages/client/src/components/mfm.ts | 7 ++++--- packages/client/src/config.ts | 5 +++-- .../scripts/extract-avg-color-from-blurhash.ts | 16 ++++++++-------- .../client/src/scripts/extract-url-from-mfm.ts | 2 +- packages/client/src/scripts/sound.ts | 2 +- packages/client/src/store.ts | 4 ++-- packages/client/src/widgets/index.ts | 5 +++++ 359 files changed, 88 insertions(+), 406 deletions(-) diff --git a/packages/backend/src/mfm/from-html.ts b/packages/backend/src/mfm/from-html.ts index 076061a4d..7c956e905 100644 --- a/packages/backend/src/mfm/from-html.ts +++ b/packages/backend/src/mfm/from-html.ts @@ -69,7 +69,7 @@ export function fromHtml(html: string, hashtagNames?: string[]): string { ) { text += txt; // メンション - } else if (txt.startsWith("@") && !(rel?.value.match(/^me /))) { + } else if (txt.startsWith("@") && !rel?.value.match(/^me /)) { const part = txt.split("@"); if (part.length === 2 && href) { diff --git a/packages/backend/src/misc/is-duplicate-key-value-error.ts b/packages/backend/src/misc/is-duplicate-key-value-error.ts index a89023cc1..18d22bb77 100644 --- a/packages/backend/src/misc/is-duplicate-key-value-error.ts +++ b/packages/backend/src/misc/is-duplicate-key-value-error.ts @@ -1,5 +1,3 @@ export function isDuplicateKeyValueError(e: unknown | Error): boolean { - return ( - (e as Error).message?.startsWith("duplicate key value") - ); + return (e as Error).message?.startsWith("duplicate key value"); } diff --git a/packages/backend/src/misc/is-user-related.ts b/packages/backend/src/misc/is-user-related.ts index 62cbed7e2..64591cfef 100644 --- a/packages/backend/src/misc/is-user-related.ts +++ b/packages/backend/src/misc/is-user-related.ts @@ -1,7 +1,6 @@ export function isUserRelated(note: any, ids: Set): boolean { if (ids.has(note.userId)) return true; // note author is muted - if (note.mentions?.some((user: string) => ids.has(user))) - return true; // any of mentioned users are muted + if (note.mentions?.some((user: string) => ids.has(user))) return true; // any of mentioned users are muted if (note.reply && isUserRelated(note.reply, ids)) return true; // also check reply target if (note.renote && isUserRelated(note.renote, ids)) return true; // also check renote target return false; diff --git a/packages/backend/src/prelude/await-all.ts b/packages/backend/src/prelude/await-all.ts index 5b2a4177d..ce11eb87b 100644 --- a/packages/backend/src/prelude/await-all.ts +++ b/packages/backend/src/prelude/await-all.ts @@ -9,7 +9,7 @@ export async function awaitAll(obj: Promiseable): Promise { const resolvedValues = await Promise.all( values.map((value) => - !(value?.constructor ) || value.constructor.name !== "Object" + !value?.constructor || value.constructor.name !== "Object" ? value : awaitAll(value), ), diff --git a/packages/backend/src/queue/processors/db/export-blocking.ts b/packages/backend/src/queue/processors/db/export-blocking.ts index 2427564a3..90da76b87 100644 --- a/packages/backend/src/queue/processors/db/export-blocking.ts +++ b/packages/backend/src/queue/processors/db/export-blocking.ts @@ -85,8 +85,10 @@ export async function exportBlocking( stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = - `blocking-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`; + const fileName = `blocking-${dateFormat( + new Date(), + "yyyy-MM-dd-HH-mm-ss", + )}.csv`; const driveFile = await addFile({ user, path, diff --git a/packages/backend/src/queue/processors/db/export-custom-emojis.ts b/packages/backend/src/queue/processors/db/export-custom-emojis.ts index f49c1938a..7a19d0b60 100644 --- a/packages/backend/src/queue/processors/db/export-custom-emojis.ts +++ b/packages/backend/src/queue/processors/db/export-custom-emojis.ts @@ -108,8 +108,10 @@ export async function exportCustomEmojis( archiveStream.on("close", async () => { logger.succ(`Exported to: ${archivePath}`); - const fileName = - `custom-emojis-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.zip`; + const fileName = `custom-emojis-${dateFormat( + new Date(), + "yyyy-MM-dd-HH-mm-ss", + )}.zip`; const driveFile = await addFile({ user, path: archivePath, diff --git a/packages/backend/src/queue/processors/db/export-following.ts b/packages/backend/src/queue/processors/db/export-following.ts index 3f790d4c2..80e8e6b92 100644 --- a/packages/backend/src/queue/processors/db/export-following.ts +++ b/packages/backend/src/queue/processors/db/export-following.ts @@ -93,8 +93,10 @@ export async function exportFollowing( stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = - `following-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`; + const fileName = `following-${dateFormat( + new Date(), + "yyyy-MM-dd-HH-mm-ss", + )}.csv`; const driveFile = await addFile({ user, path, diff --git a/packages/backend/src/queue/processors/db/export-mute.ts b/packages/backend/src/queue/processors/db/export-mute.ts index 4cc50eb3e..87b140b76 100644 --- a/packages/backend/src/queue/processors/db/export-mute.ts +++ b/packages/backend/src/queue/processors/db/export-mute.ts @@ -86,8 +86,10 @@ export async function exportMute( stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = - `mute-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`; + const fileName = `mute-${dateFormat( + new Date(), + "yyyy-MM-dd-HH-mm-ss", + )}.csv`; const driveFile = await addFile({ user, path, diff --git a/packages/backend/src/queue/processors/db/export-notes.ts b/packages/backend/src/queue/processors/db/export-notes.ts index 3ab5971aa..de8fac05b 100644 --- a/packages/backend/src/queue/processors/db/export-notes.ts +++ b/packages/backend/src/queue/processors/db/export-notes.ts @@ -93,8 +93,10 @@ export async function exportNotes( stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = - `notes-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.json`; + const fileName = `notes-${dateFormat( + new Date(), + "yyyy-MM-dd-HH-mm-ss", + )}.json`; const driveFile = await addFile({ user, path, diff --git a/packages/backend/src/queue/processors/db/export-user-lists.ts b/packages/backend/src/queue/processors/db/export-user-lists.ts index 8ff7a3d8e..e0c9cd8f3 100644 --- a/packages/backend/src/queue/processors/db/export-user-lists.ts +++ b/packages/backend/src/queue/processors/db/export-user-lists.ts @@ -61,8 +61,10 @@ export async function exportUserLists( stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = - `user-lists-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`; + const fileName = `user-lists-${dateFormat( + new Date(), + "yyyy-MM-dd-HH-mm-ss", + )}.csv`; const driveFile = await addFile({ user, path, diff --git a/packages/backend/src/remote/activitypub/models/question.ts b/packages/backend/src/remote/activitypub/models/question.ts index 5d9385e56..520b9fee9 100644 --- a/packages/backend/src/remote/activitypub/models/question.ts +++ b/packages/backend/src/remote/activitypub/models/question.ts @@ -34,7 +34,7 @@ export async function extractPollFromQuestion( ); const votes = question[multiple ? "anyOf" : "oneOf"]!.map( - (x, i) => (x.replies?.totalItems) || x._misskey_votes || 0, + (x, i) => x.replies?.totalItems || x._misskey_votes || 0, ); return { diff --git a/packages/backend/src/remote/activitypub/renderer/person.ts b/packages/backend/src/remote/activitypub/renderer/person.ts index cad3374cc..1122a3a27 100644 --- a/packages/backend/src/remote/activitypub/renderer/person.ts +++ b/packages/backend/src/remote/activitypub/renderer/person.ts @@ -38,14 +38,13 @@ export async function renderPerson(user: ILocalUser) { attachment.push({ type: "PropertyValue", name: field.name, - value: - field.value?.match(/^https?:/) - ? `${ - new URL(field.value).href - }` - : field.value, + value: field.value?.match(/^https?:/) + ? `${ + new URL(field.value).href + }` + : field.value, }); } } diff --git a/packages/backend/src/remote/webfinger.ts b/packages/backend/src/remote/webfinger.ts index 52226b042..1e929c8ff 100644 --- a/packages/backend/src/remote/webfinger.ts +++ b/packages/backend/src/remote/webfinger.ts @@ -24,17 +24,17 @@ export default async function (query: string): Promise { function genUrl(query: string) { if (query.match(/^https?:\/\//)) { const u = new URL(query); - return ( - `${u.protocol}//${u.hostname}/.well-known/webfinger?${urlQuery({ resource: query })}` - ); + return `${u.protocol}//${u.hostname}/.well-known/webfinger?${urlQuery({ + resource: query, + })}`; } const m = query.match(/^([^@]+)@(.*)/); if (m) { const hostname = m[2]; - return ( - `https://${hostname}/.well-known/webfinger?${urlQuery({ resource: `acct:${query}` })}` - ); + return `https://${hostname}/.well-known/webfinger?${urlQuery({ + resource: `acct:${query}`, + })}`; } throw new Error(`Invalid query (${query})`); diff --git a/packages/backend/src/server/api/2fa.ts b/packages/backend/src/server/api/2fa.ts index 830fb809a..7318f0f43 100644 --- a/packages/backend/src/server/api/2fa.ts +++ b/packages/backend/src/server/api/2fa.ts @@ -92,9 +92,9 @@ function PEMString(pemBuffer: Buffer, type = "CERTIFICATE") { start += 64; } - return ( - `-----BEGIN ${type}-----\n${keyParts.join("\n")}\n-----END ${type}-----\n` - ); + return `-----BEGIN ${type}-----\n${keyParts.join( + "\n", + )}\n-----END ${type}-----\n`; } export function hash(data: Buffer) { diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts index a434a1d4e..486143140 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts @@ -104,7 +104,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( AbuseUserReports.createQueryBuilder("report"), diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts index 64ac10420..11ef2273c 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts @@ -30,7 +30,6 @@ export const paramDef = { required: ["username", "password"], } as const; - export default define(meta, paramDef, async (ps, _me) => { const me = _me ? await Users.findOneByOrFail({ id: _me.id }) : null; const noUsers = diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts index e71199b04..3f7243ab5 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts @@ -19,7 +19,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts b/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts index 8f7d04768..15ad1f9a1 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const hostedConfig = config.isManagedHosting; const hosted = hostedConfig != null && hostedConfig === true; diff --git a/packages/backend/src/server/api/endpoints/admin/ad/create.ts b/packages/backend/src/server/api/endpoints/admin/ad/create.ts index bdd43dd3b..db39f3eb2 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/create.ts @@ -31,7 +31,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps) => { await Ads.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts index a0eb47c8a..ee6d314de 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts @@ -25,7 +25,6 @@ export const paramDef = { required: ["id"], } as const; - export default define(meta, paramDef, async (ps, me) => { const ad = await Ads.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/ad/list.ts b/packages/backend/src/server/api/endpoints/admin/ad/list.ts index 70369159e..65944d31e 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts @@ -19,7 +19,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( Ads.createQueryBuilder("ad"), diff --git a/packages/backend/src/server/api/endpoints/admin/ad/update.ts b/packages/backend/src/server/api/endpoints/admin/ad/update.ts index fdd05bb34..2c7038731 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/update.ts @@ -41,7 +41,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, me) => { const ad = await Ads.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index 0b15c17e6..a532b6677 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -61,7 +61,6 @@ export const paramDef = { required: ["title", "text", "imageUrl"], } as const; - export default define(meta, paramDef, async (ps) => { const announcement = await Announcements.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts index 043be07cc..5665b94a7 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts @@ -25,7 +25,6 @@ export const paramDef = { required: ["id"], } as const; - export default define(meta, paramDef, async (ps, me) => { const announcement = await Announcements.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts index 68bda5466..fc5b02070 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -72,7 +72,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( Announcements.createQueryBuilder("announcement"), diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts index 5e285527d..35e64f281 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts @@ -28,7 +28,6 @@ export const paramDef = { required: ["id", "title", "text", "imageUrl"], } as const; - export default define(meta, paramDef, async (ps, me) => { const announcement = await Announcements.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/delete-account.ts b/packages/backend/src/server/api/endpoints/admin/delete-account.ts index 386156ffc..9fd196888 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-account.ts @@ -19,7 +19,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps) => { const user = await Users.findOneByOrFail({ id: ps.userId }); if (user.isDeleted) { diff --git a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts index 6f43ef299..796900811 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const files = await DriveFiles.findBy({ userId: ps.userId, diff --git a/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts b/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts index 345a14d1d..1f6ac5f27 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["userId", "overrideMb"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts index e6b9833d6..1b0c1260b 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -14,7 +14,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { createCleanRemoteFilesJob(); }); diff --git a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts index e8b6c835b..04208f600 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts @@ -16,7 +16,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const files = await DriveFiles.findBy({ userId: IsNull(), diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts index 4979d2ad0..5cb0aecd8 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -48,7 +48,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( DriveFiles.createQueryBuilder("file"), diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index 0c9387bec..d65ec09fc 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -195,7 +195,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, me) => { const file = ps.fileId ? await DriveFiles.findOneBy({ id: ps.fileId }) diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts index dcaadc03d..1ea457adf 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts @@ -31,7 +31,6 @@ export const paramDef = { required: ["ids", "aliases"], } as const; - export default define(meta, paramDef, async (ps) => { const emojis = await Emojis.findBy({ id: In(ps.ids), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index 2b3b2ac8d..601d754a0 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -30,7 +30,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts index 2c1ab5ded..4a7f2bc61 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -44,7 +44,6 @@ export const paramDef = { required: ["emojiId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const emoji = await Emojis.findOneBy({ id: ps.emojiId }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts index 5e378c4d6..585af231f 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts @@ -26,7 +26,6 @@ export const paramDef = { required: ["ids"], } as const; - export default define(meta, paramDef, async (ps, me) => { const emojis = await Emojis.findBy({ id: In(ps.ids), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts index 61c9fe698..761c7c377 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["id"], } as const; - export default define(meta, paramDef, async (ps, me) => { const emoji = await Emojis.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts index 4499c50ab..6f49d6d18 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts @@ -16,7 +16,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { createImportCustomEmojisJob(user, ps.fileId); }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index 6bbbd3bf8..63f60bc99 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -77,7 +77,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const q = makePaginationQuery( Emojis.createQueryBuilder("emoji"), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index b8b351c76..bc4f1d29f 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -71,7 +71,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const q = makePaginationQuery( Emojis.createQueryBuilder("emoji"), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts index 3c21177ee..4e57fa3dd 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts @@ -31,7 +31,6 @@ export const paramDef = { required: ["ids", "aliases"], } as const; - export default define(meta, paramDef, async (ps) => { const emojis = await Emojis.findBy({ id: In(ps.ids), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts index 92ce4266d..1197f6077 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts @@ -31,7 +31,6 @@ export const paramDef = { required: ["ids", "aliases"], } as const; - export default define(meta, paramDef, async (ps) => { await Emojis.update( { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts index 273478a82..17881a445 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts @@ -30,7 +30,6 @@ export const paramDef = { required: ["ids"], } as const; - export default define(meta, paramDef, async (ps) => { await Emojis.update( { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index 2e4743e70..3f7f6639f 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -38,7 +38,6 @@ export const paramDef = { required: ["id", "name", "aliases"], } as const; - export default define(meta, paramDef, async (ps) => { const emoji = await Emojis.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts index a0ab1e621..534f226c2 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["host"], } as const; - export default define(meta, paramDef, async (ps, me) => { const files = await DriveFiles.findBy({ userHost: ps.host, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index 487e5381d..9c7165593 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["host"], } as const; - export default define(meta, paramDef, async (ps, me) => { const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts index b449dbb95..a1ccf11af 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["host"], } as const; - export default define(meta, paramDef, async (ps, me) => { const followings = await Followings.findBy({ followerHost: ps.host, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts index 093704976..016989b54 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["host", "isSuspended"], } as const; - export default define(meta, paramDef, async (ps, me) => { const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts index 3e643364d..f39a369ec 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts @@ -14,7 +14,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const stats = await db.query("SELECT * FROM pg_indexes;").then((recs) => { const res = [] as { tablename: string; indexname: string }[]; diff --git a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts index 0fd4f03a4..25d07f327 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const sizes = await db .query(` diff --git a/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts b/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts index 35462802b..da76ae624 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts @@ -16,7 +16,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const ips = await UserIps.find({ where: { userId: ps.userId }, diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts index 7683abb4d..b8bdb38b4 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const code = rndstr({ length: 8, diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index 6edb7d73e..1808de118 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -465,7 +465,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts index e58cf723c..478f2661b 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts index 3041d03e2..a43cc0cbe 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/promo/create.ts b/packages/backend/src/server/api/endpoints/admin/promo/create.ts index 4c5b41cab..a6d1f3519 100644 --- a/packages/backend/src/server/api/endpoints/admin/promo/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/promo/create.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["noteId", "expiresAt"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts index 708b820ff..9b828bb24 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts @@ -15,7 +15,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { destroy(); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts index 559bbde71..15fdfb025 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts @@ -37,7 +37,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const jobs = await deliverQueue.getJobs(["delayed"]); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts index 26a9cf9ef..1890bd434 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts @@ -37,7 +37,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const jobs = await inboxQueue.getJobs(["delayed"]); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts index bfd27646f..ecd67d893 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -47,7 +47,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const deliverJobCounts = await deliverQueue.getJobCounts(); const inboxJobCounts = await inboxQueue.getJobCounts(); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/add.ts b/packages/backend/src/server/api/endpoints/admin/relays/add.ts index 3242dc271..bb56216a7 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts @@ -54,7 +54,6 @@ export const paramDef = { required: ["inbox"], } as const; - export default define(meta, paramDef, async (ps, user) => { try { if (new URL(ps.inbox).protocol !== "https:") throw new Error("https only"); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/list.ts b/packages/backend/src/server/api/endpoints/admin/relays/list.ts index b5ce42866..4c294ba9b 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts @@ -46,7 +46,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { return await listRelay(); }); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts index 77f678249..1b3d90628 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts @@ -16,7 +16,6 @@ export const paramDef = { required: ["inbox"], } as const; - export default define(meta, paramDef, async (ps, user) => { return await removeRelay(ps.inbox); }); diff --git a/packages/backend/src/server/api/endpoints/admin/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/reset-password.ts index 9341c753a..dd3f258f7 100644 --- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index 1bebee23b..c876a2198 100644 --- a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -21,7 +21,6 @@ export const paramDef = { required: ["reportId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const report = await AbuseUserReports.findOneByOrFail({ id: ps.reportId }); diff --git a/packages/backend/src/server/api/endpoints/admin/send-email.ts b/packages/backend/src/server/api/endpoints/admin/send-email.ts index f06fa70c3..1676f6890 100644 --- a/packages/backend/src/server/api/endpoints/admin/send-email.ts +++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["to", "subject", "text"], } as const; - export default define(meta, paramDef, async (ps) => { await sendEmail(ps.to, ps.subject, ps.text, ps.text); }); diff --git a/packages/backend/src/server/api/endpoints/admin/server-info.ts b/packages/backend/src/server/api/endpoints/admin/server-info.ts index 5cb88fcdb..8998032cc 100644 --- a/packages/backend/src/server/api/endpoints/admin/server-info.ts +++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts @@ -108,7 +108,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const memStats = await si.mem(); const fsStats = await si.fsSize(); diff --git a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts index 407e3f135..df7e8979c 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts @@ -66,7 +66,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( ModerationLogs.createQueryBuilder("report"), diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index a9fe2c826..e91f07f83 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const [user, profile] = await Promise.all([ Users.findOneBy({ id: ps.userId }), diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index cec6311f5..868df9dc9 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -66,7 +66,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user"); diff --git a/packages/backend/src/server/api/endpoints/admin/silence-user.ts b/packages/backend/src/server/api/endpoints/admin/silence-user.ts index 1a88362c2..a61823297 100644 --- a/packages/backend/src/server/api/endpoints/admin/silence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/silence-user.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts index b7529be00..984bc0789 100644 --- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts @@ -21,7 +21,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts index f40ff3204..6a01b8e8d 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts index 6a0025d5f..e51d5851c 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 83ec74cc7..28aac4a4d 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -165,7 +165,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const set = {} as Partial; diff --git a/packages/backend/src/server/api/endpoints/admin/update-user-note.ts b/packages/backend/src/server/api/endpoints/admin/update-user-note.ts index 8baf3b252..04870d1c1 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-user-note.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-user-note.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["userId", "text"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts index 76897dabf..559b310e4 100644 --- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts +++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["full", "analyze"], } as const; - export default define(meta, paramDef, async (ps, me) => { const params: string[] = []; diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index 3c74a7b3e..00634cc42 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -72,7 +72,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Announcements.createQueryBuilder("announcement"), diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index dc3e405ec..171fc2c64 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -82,7 +82,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { if (user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup); let userList; diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts index 301702b94..a6cf79011 100644 --- a/packages/backend/src/server/api/endpoints/antennas/delete.ts +++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["antennaId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const antenna = await Antennas.findOneBy({ id: ps.antennaId, diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts index 36685bb79..929b761d4 100644 --- a/packages/backend/src/server/api/endpoints/antennas/list.ts +++ b/packages/backend/src/server/api/endpoints/antennas/list.ts @@ -27,7 +27,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const antennas = await Antennas.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/antennas/markread.ts b/packages/backend/src/server/api/endpoints/antennas/markread.ts index 42a812a29..e29e13bbb 100644 --- a/packages/backend/src/server/api/endpoints/antennas/markread.ts +++ b/packages/backend/src/server/api/endpoints/antennas/markread.ts @@ -19,7 +19,6 @@ export const paramDef = { required: ["antennaId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const antenna = await Antennas.findOneBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 344f7b9d3..d011c5fb8 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["antennaId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const antenna = await Antennas.findOneBy({ id: ps.antennaId, diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts index 3e429149a..350d73921 100644 --- a/packages/backend/src/server/api/endpoints/antennas/show.ts +++ b/packages/backend/src/server/api/endpoints/antennas/show.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["antennaId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the antenna const antenna = await Antennas.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index 7f9c6f05e..6c48cd369 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -89,7 +89,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch the antenna const antenna = await Antennas.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts index c2ae4e0c7..f0db67a34 100644 --- a/packages/backend/src/server/api/endpoints/ap/get.ts +++ b/packages/backend/src/server/api/endpoints/ap/get.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["uri"], } as const; - export default define(meta, paramDef, async (ps) => { const resolver = new Resolver(); const object = await resolver.resolve(ps.uri); diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index 8bd4f9cca..fa804802e 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -83,7 +83,6 @@ export const paramDef = { required: ["uri"], } as const; - export default define(meta, paramDef, async (ps, me) => { const object = await fetchAny(ps.uri, me); if (object) { diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index 811ac5edb..013c5a10b 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -34,7 +34,6 @@ export const paramDef = { required: ["name", "description", "permission"], } as const; - export default define(meta, paramDef, async (ps, user) => { if (user?.movedToUri != null) return await Apps.pack("", null, { diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts index 1533b917e..60949512e 100644 --- a/packages/backend/src/server/api/endpoints/app/show.ts +++ b/packages/backend/src/server/api/endpoints/app/show.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["appId"], } as const; - export default define(meta, paramDef, async (ps, user, token) => { const isSecure = user != null && token == null; diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts index 92357a071..35565e256 100644 --- a/packages/backend/src/server/api/endpoints/auth/accept.ts +++ b/packages/backend/src/server/api/endpoints/auth/accept.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["token"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch token const session = await AuthSessions.findOneBy({ token: ps.token }); diff --git a/packages/backend/src/server/api/endpoints/auth/session/generate.ts b/packages/backend/src/server/api/endpoints/auth/session/generate.ts index b0245d13b..1defb9400 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts @@ -46,7 +46,6 @@ export const paramDef = { required: ["appSecret"], } as const; - export default define(meta, paramDef, async (ps) => { // Lookup app const app = await Apps.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/auth/session/show.ts b/packages/backend/src/server/api/endpoints/auth/session/show.ts index c239134d6..01a5fe5dc 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/show.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts @@ -49,7 +49,6 @@ export const paramDef = { required: ["token"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Lookup session const session = await AuthSessions.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts index 66af1f692..0e97bf414 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts @@ -57,7 +57,6 @@ export const paramDef = { required: ["appSecret", "token"], } as const; - export default define(meta, paramDef, async (ps) => { // Lookup app const app = await Apps.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts index 6fc99c059..4bd58d5ef 100644 --- a/packages/backend/src/server/api/endpoints/blocking/create.ts +++ b/packages/backend/src/server/api/endpoints/blocking/create.ts @@ -53,7 +53,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const blocker = await Users.findOneByOrFail({ id: user.id }); diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts index f55d51723..6c4ca2775 100644 --- a/packages/backend/src/server/api/endpoints/blocking/delete.ts +++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts @@ -53,7 +53,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const blocker = await Users.findOneByOrFail({ id: user.id }); diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts index 18f5e34c6..83fca7b42 100644 --- a/packages/backend/src/server/api/endpoints/blocking/list.ts +++ b/packages/backend/src/server/api/endpoints/blocking/list.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Blockings.createQueryBuilder("blocking"), diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts index f92217c24..26a3448b2 100644 --- a/packages/backend/src/server/api/endpoints/channels/create.ts +++ b/packages/backend/src/server/api/endpoints/channels/create.ts @@ -42,7 +42,6 @@ export const paramDef = { required: ["name"], } as const; - export default define(meta, paramDef, async (ps, user) => { let banner = null; if (ps.bannerId != null) { diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts index 6d65b95f7..06e0e850f 100644 --- a/packages/backend/src/server/api/endpoints/channels/featured.ts +++ b/packages/backend/src/server/api/endpoints/channels/featured.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Channels.createQueryBuilder("channel") .where("channel.lastNotedAt IS NOT NULL") diff --git a/packages/backend/src/server/api/endpoints/channels/follow.ts b/packages/backend/src/server/api/endpoints/channels/follow.ts index 727205374..de0554383 100644 --- a/packages/backend/src/server/api/endpoints/channels/follow.ts +++ b/packages/backend/src/server/api/endpoints/channels/follow.ts @@ -28,7 +28,6 @@ export const paramDef = { required: ["channelId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 4085c28d0..63483a79a 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( ChannelFollowings.createQueryBuilder(), diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts index 678c4acdf..78d9e80cc 100644 --- a/packages/backend/src/server/api/endpoints/channels/owned.ts +++ b/packages/backend/src/server/api/endpoints/channels/owned.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Channels.createQueryBuilder(), diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts index 66146e206..e4ca75663 100644 --- a/packages/backend/src/server/api/endpoints/channels/show.ts +++ b/packages/backend/src/server/api/endpoints/channels/show.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["channelId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index 154dd2d65..b5d532523 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -44,7 +44,6 @@ export const paramDef = { required: ["channelId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/unfollow.ts b/packages/backend/src/server/api/endpoints/channels/unfollow.ts index 75b4395a2..654a4fbba 100644 --- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts +++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["channelId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts index 666f1bda6..d9f6f7644 100644 --- a/packages/backend/src/server/api/endpoints/channels/update.ts +++ b/packages/backend/src/server/api/endpoints/channels/update.ts @@ -53,7 +53,6 @@ export const paramDef = { required: ["channelId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/charts/active-users.ts b/packages/backend/src/server/api/endpoints/charts/active-users.ts index dd6a4f741..3817a32ca 100644 --- a/packages/backend/src/server/api/endpoints/charts/active-users.ts +++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["span"], } as const; - export default define(meta, paramDef, async (ps) => { return await activeUsersChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/ap-request.ts b/packages/backend/src/server/api/endpoints/charts/ap-request.ts index 998faca6a..9e9013ce5 100644 --- a/packages/backend/src/server/api/endpoints/charts/ap-request.ts +++ b/packages/backend/src/server/api/endpoints/charts/ap-request.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["span"], } as const; - export default define(meta, paramDef, async (ps) => { return await apRequestChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts index 7bb4607ca..03ac4c047 100644 --- a/packages/backend/src/server/api/endpoints/charts/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/drive.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["span"], } as const; - export default define(meta, paramDef, async (ps) => { return await driveChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts index d358f6c67..5862aad56 100644 --- a/packages/backend/src/server/api/endpoints/charts/federation.ts +++ b/packages/backend/src/server/api/endpoints/charts/federation.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["span"], } as const; - export default define(meta, paramDef, async (ps) => { return await federationChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts index 9cb2faf82..0af1e35ea 100644 --- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts +++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts @@ -23,7 +23,6 @@ export const paramDef = { required: ["span", "tag"], } as const; - export default define(meta, paramDef, async (ps) => { return await hashtagChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts index a727ab866..11a1dbce1 100644 --- a/packages/backend/src/server/api/endpoints/charts/instance.ts +++ b/packages/backend/src/server/api/endpoints/charts/instance.ts @@ -23,7 +23,6 @@ export const paramDef = { required: ["span", "host"], } as const; - export default define(meta, paramDef, async (ps) => { return await instanceChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts index 0dc9b3471..27e69a4c9 100644 --- a/packages/backend/src/server/api/endpoints/charts/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/notes.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["span"], } as const; - export default define(meta, paramDef, async (ps) => { return await notesChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/drive.ts b/packages/backend/src/server/api/endpoints/charts/user/drive.ts index 444de851c..178ba453c 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts @@ -23,7 +23,6 @@ export const paramDef = { required: ["span", "userId"], } as const; - export default define(meta, paramDef, async (ps) => { return await perUserDriveChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/following.ts b/packages/backend/src/server/api/endpoints/charts/user/following.ts index 8aebb61e5..6a0c22df1 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/following.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts @@ -23,7 +23,6 @@ export const paramDef = { required: ["span", "userId"], } as const; - export default define(meta, paramDef, async (ps) => { return await perUserFollowingChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/notes.ts b/packages/backend/src/server/api/endpoints/charts/user/notes.ts index 80890ed48..d78807696 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts @@ -23,7 +23,6 @@ export const paramDef = { required: ["span", "userId"], } as const; - export default define(meta, paramDef, async (ps) => { return await perUserNotesChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts index 411af783a..5b0048c50 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts @@ -23,7 +23,6 @@ export const paramDef = { required: ["span", "userId"], } as const; - export default define(meta, paramDef, async (ps) => { return await perUserReactionsChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts index 2dc2d6090..8973f013b 100644 --- a/packages/backend/src/server/api/endpoints/charts/users.ts +++ b/packages/backend/src/server/api/endpoints/charts/users.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["span"], } as const; - export default define(meta, paramDef, async (ps) => { return await usersChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts index 132ee5299..b9d6b54c9 100644 --- a/packages/backend/src/server/api/endpoints/clips/add-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts @@ -41,7 +41,6 @@ export const paramDef = { required: ["clipId", "noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index f46a0eba2..918e9462a 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["name"], } as const; - export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts index 013d68710..8f2489ddd 100644 --- a/packages/backend/src/server/api/endpoints/clips/delete.ts +++ b/packages/backend/src/server/api/endpoints/clips/delete.ts @@ -26,7 +26,6 @@ export const paramDef = { required: ["clipId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts index c77af6cac..d1625ee03 100644 --- a/packages/backend/src/server/api/endpoints/clips/list.ts +++ b/packages/backend/src/server/api/endpoints/clips/list.ts @@ -27,7 +27,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const clips = await Clips.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index b9a4265ee..c641d9ba9 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -46,7 +46,6 @@ export const paramDef = { required: ["clipId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/remove-note.ts b/packages/backend/src/server/api/endpoints/clips/remove-note.ts index 7f10d8eb6..2cc19aca9 100644 --- a/packages/backend/src/server/api/endpoints/clips/remove-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/remove-note.ts @@ -34,7 +34,6 @@ export const paramDef = { required: ["clipId", "noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts index 9c0e4c7fc..14709b504 100644 --- a/packages/backend/src/server/api/endpoints/clips/show.ts +++ b/packages/backend/src/server/api/endpoints/clips/show.ts @@ -34,7 +34,6 @@ export const paramDef = { required: ["clipId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the clip const clip = await Clips.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts index dfc00f315..e78f36e45 100644 --- a/packages/backend/src/server/api/endpoints/clips/update.ts +++ b/packages/backend/src/server/api/endpoints/clips/update.ts @@ -41,7 +41,6 @@ export const paramDef = { required: ["clipId", "name"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch the clip const clip = await Clips.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts b/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts index c0033cbdf..62e0836e8 100644 --- a/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts @@ -18,7 +18,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const now = Date.now(); const emojis: Emoji[] = await Emojis.find({ diff --git a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts index d67fe0c89..4e692568c 100644 --- a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts +++ b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts @@ -30,7 +30,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const now = Date.now(); const [meta, total, localPosts, instanceCount, firstAdmin, emojis] = diff --git a/packages/backend/src/server/api/endpoints/custom-motd.ts b/packages/backend/src/server/api/endpoints/custom-motd.ts index cc2ac8408..098a676a5 100644 --- a/packages/backend/src/server/api/endpoints/custom-motd.ts +++ b/packages/backend/src/server/api/endpoints/custom-motd.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const meta = await fetchMeta(); const motd = await Promise.all(meta.customMOTD.map((x) => x)); diff --git a/packages/backend/src/server/api/endpoints/custom-splash-icons.ts b/packages/backend/src/server/api/endpoints/custom-splash-icons.ts index 059567250..c4833a4ee 100644 --- a/packages/backend/src/server/api/endpoints/custom-splash-icons.ts +++ b/packages/backend/src/server/api/endpoints/custom-splash-icons.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const meta = await fetchMeta(); const icons = await Promise.all(meta.customSplashIcons.map((x) => x)); diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts index 44eefa29b..ce98b53a6 100644 --- a/packages/backend/src/server/api/endpoints/drive.ts +++ b/packages/backend/src/server/api/endpoints/drive.ts @@ -34,7 +34,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts index 0a3d931b4..c749e4903 100644 --- a/packages/backend/src/server/api/endpoints/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/drive/files.ts @@ -43,7 +43,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( DriveFiles.createQueryBuilder("file"), diff --git a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts index d3731e0c9..9267da585 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts @@ -40,7 +40,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch file const file = await DriveFiles.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts b/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts index a33040042..1ab817bd0 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts @@ -25,7 +25,6 @@ export const paramDef = { required: ["url"], } as const; - export default define(meta, paramDef, async (ps) => { const worker = createWorker({ logger: (m) => console.log(m), diff --git a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts index eb61e3772..df8968520 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts @@ -25,7 +25,6 @@ export const paramDef = { required: ["md5"], } as const; - export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ md5: ps.md5, diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index 9be42b616..0a167178b 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -76,7 +76,6 @@ export const paramDef = { required: [], } as const; - export default define( meta, paramDef, diff --git a/packages/backend/src/server/api/endpoints/drive/files/delete.ts b/packages/backend/src/server/api/endpoints/drive/files/delete.ts index 5eaf507fc..4e8b4156f 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts @@ -36,7 +36,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); @@ -44,7 +43,7 @@ export default define(meta, paramDef, async (ps, user) => { throw new ApiError(meta.errors.noSuchFile); } - if (!(user.isAdmin || user.isModerator ) && file.userId !== user.id) { + if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) { throw new ApiError(meta.errors.accessDenied); } diff --git a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts index 8671326fe..ce14f4e09 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -31,7 +31,6 @@ export const paramDef = { required: ["md5"], } as const; - export default define(meta, paramDef, async (ps, user) => { const files = await DriveFiles.findBy({ md5: ps.md5, diff --git a/packages/backend/src/server/api/endpoints/drive/files/find.ts b/packages/backend/src/server/api/endpoints/drive/files/find.ts index 88bd8c485..c2ad95126 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts @@ -38,7 +38,6 @@ export const paramDef = { required: ["name"], } as const; - export default define(meta, paramDef, async (ps, user) => { const files = await DriveFiles.findBy({ name: ps.name, diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index 13c9b8fc2..291e3f56b 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -52,7 +52,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { let file: DriveFile | null = null; @@ -78,7 +77,7 @@ export default define(meta, paramDef, async (ps, user) => { throw new ApiError(meta.errors.noSuchFile); } - if (!(user.isAdmin || user.isModerator ) && file.userId !== user.id) { + if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) { throw new ApiError(meta.errors.accessDenied); } diff --git a/packages/backend/src/server/api/endpoints/drive/files/update.ts b/packages/backend/src/server/api/endpoints/drive/files/update.ts index 337324181..d113b978f 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -59,7 +59,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); @@ -67,7 +66,7 @@ export default define(meta, paramDef, async (ps, user) => { throw new ApiError(meta.errors.noSuchFile); } - if (!(user.isAdmin || user.isModerator ) && file.userId !== user.id) { + if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) { throw new ApiError(meta.errors.accessDenied); } diff --git a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts index 049fb17db..7bb47dbef 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -38,7 +38,6 @@ export const paramDef = { required: ["url"], } as const; - export default define(meta, paramDef, async (ps, user) => { uploadFromUrl({ url: ps.url, diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts index 89123e805..ed0d38844 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders.ts @@ -38,7 +38,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( DriveFolders.createQueryBuilder("folder"), diff --git a/packages/backend/src/server/api/endpoints/drive/folders/create.ts b/packages/backend/src/server/api/endpoints/drive/folders/create.ts index 935c2377b..d50f5f281 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts @@ -36,7 +36,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { // If the parent folder is specified let parent = null; diff --git a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts index e8f1f7b76..98895a732 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["folderId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Get folder const folder = await DriveFolders.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/folders/find.ts b/packages/backend/src/server/api/endpoints/drive/folders/find.ts index c43b6e147..45451fb90 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts @@ -36,7 +36,6 @@ export const paramDef = { required: ["name"], } as const; - export default define(meta, paramDef, async (ps, user) => { const folders = await DriveFolders.findBy({ name: ps.name, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/show.ts b/packages/backend/src/server/api/endpoints/drive/folders/show.ts index e3cc85022..6a72a2277 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["folderId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Get folder const folder = await DriveFolders.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/folders/update.ts b/packages/backend/src/server/api/endpoints/drive/folders/update.ts index 16abf9fdc..929a69bde 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["folderId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch folder const folder = await DriveFolders.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts index 462656255..0c9654ca2 100644 --- a/packages/backend/src/server/api/endpoints/drive/stream.ts +++ b/packages/backend/src/server/api/endpoints/drive/stream.ts @@ -36,7 +36,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( DriveFiles.createQueryBuilder("file"), diff --git a/packages/backend/src/server/api/endpoints/email-address/available.ts b/packages/backend/src/server/api/endpoints/email-address/available.ts index 4dd846a3b..dc3c5e4b8 100644 --- a/packages/backend/src/server/api/endpoints/email-address/available.ts +++ b/packages/backend/src/server/api/endpoints/email-address/available.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["emailAddress"], } as const; - export default define(meta, paramDef, async (ps) => { return await validateEmailForAccount(ps.emailAddress); }); diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts index d4ccd68f5..ad0ce4562 100644 --- a/packages/backend/src/server/api/endpoints/endpoint.ts +++ b/packages/backend/src/server/api/endpoints/endpoint.ts @@ -15,7 +15,6 @@ export const paramDef = { required: ["endpoint"], } as const; - export default define(meta, paramDef, async (ps) => { const ep = endpoints.find((x) => x.name === ps.endpoint); if (ep == null) return null; diff --git a/packages/backend/src/server/api/endpoints/endpoints.ts b/packages/backend/src/server/api/endpoints/endpoints.ts index 440586a32..c5844f843 100644 --- a/packages/backend/src/server/api/endpoints/endpoints.ts +++ b/packages/backend/src/server/api/endpoints/endpoints.ts @@ -30,7 +30,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { return endpoints.map((x) => x.name); }); diff --git a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts index d3f498230..f4fc43c17 100644 --- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { createExportCustomEmojisJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index d241f9fd4..4c6d83abd 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["host"], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Followings.createQueryBuilder("following"), diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index 8ccacdbc6..88b168600 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["host"], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Followings.createQueryBuilder("following"), diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index 811948c0f..3ab37ff6f 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -43,7 +43,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Instances.createQueryBuilder("instance"); diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts index aa776acdd..633bb5707 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["host"], } as const; - export default define(meta, paramDef, async (ps, me) => { const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/federation/stats.ts b/packages/backend/src/server/api/endpoints/federation/stats.ts index 030d9f94a..ede7a56c2 100644 --- a/packages/backend/src/server/api/endpoints/federation/stats.ts +++ b/packages/backend/src/server/api/endpoints/federation/stats.ts @@ -20,7 +20,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const [topSubInstances, topPubInstances, allSubCount, allPubCount] = await Promise.all([ diff --git a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts index ac78dee22..f4c3f6d18 100644 --- a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts +++ b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts @@ -16,7 +16,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps) => { const user = await getRemoteUser(ps.userId); await updatePerson(user.uri!); diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index 8857619bc..ded0a26c5 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["host"], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Users.createQueryBuilder("user"), diff --git a/packages/backend/src/server/api/endpoints/fetch-rss.ts b/packages/backend/src/server/api/endpoints/fetch-rss.ts index 1698f4b64..b73d7262c 100644 --- a/packages/backend/src/server/api/endpoints/fetch-rss.ts +++ b/packages/backend/src/server/api/endpoints/fetch-rss.ts @@ -21,7 +21,6 @@ export const paramDef = { required: ["url"], } as const; - export default define(meta, paramDef, async (ps) => { const res = await getResponse({ url: ps.url, diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts index 7f9055f16..e617c1ffb 100644 --- a/packages/backend/src/server/api/endpoints/following/create.ts +++ b/packages/backend/src/server/api/endpoints/following/create.ts @@ -66,7 +66,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const follower = user; diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts index 7c1762f8a..2eebe8a90 100644 --- a/packages/backend/src/server/api/endpoints/following/delete.ts +++ b/packages/backend/src/server/api/endpoints/following/delete.ts @@ -53,7 +53,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const follower = user; diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index d1e561e76..979d298f7 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -53,7 +53,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const followee = user; diff --git a/packages/backend/src/server/api/endpoints/following/requests/accept.ts b/packages/backend/src/server/api/endpoints/following/requests/accept.ts index cf5fcfc59..a4fc05236 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch follower const follower = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts index b62504f4b..f309e3299 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts @@ -42,7 +42,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch followee const followee = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/following/requests/list.ts b/packages/backend/src/server/api/endpoints/following/requests/list.ts index 20e6fe87c..6ba23de58 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -46,7 +46,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const reqs = await FollowRequests.findBy({ followeeId: user.id, diff --git a/packages/backend/src/server/api/endpoints/following/requests/reject.ts b/packages/backend/src/server/api/endpoints/following/requests/reject.ts index 4b9d5cc37..fedc0db48 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch follower const follower = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts index ecc37ff78..d478e8e3b 100644 --- a/packages/backend/src/server/api/endpoints/gallery/featured.ts +++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = GalleryPosts.createQueryBuilder("post") .andWhere("post.createdAt > :date", { diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts index 6deda43b6..5eef68d97 100644 --- a/packages/backend/src/server/api/endpoints/gallery/popular.ts +++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = GalleryPosts.createQueryBuilder("post") .andWhere("post.likedCount > 0") diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts index b254882fc..f97c161af 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts @@ -29,7 +29,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( GalleryPosts.createQueryBuilder("post"), diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts index b33f10b2b..f3b3768e2 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["title", "fileIds"], } as const; - export default define(meta, paramDef, async (ps, user) => { const files = ( await Promise.all( diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts index 3f921b322..9fd9a5009 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts @@ -26,7 +26,6 @@ export const paramDef = { required: ["postId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const post = await GalleryPosts.findOneBy({ id: ps.postId, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts index d5b6eb4e1..fd46406bd 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["postId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const post = await GalleryPosts.findOneBy({ id: ps.postId }); if (post == null) { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts index be4cc07c3..87e272f01 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["postId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const post = await GalleryPosts.findOneBy({ id: ps.postId, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts index 6c0713f1e..772dc9202 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["postId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const post = await GalleryPosts.findOneBy({ id: ps.postId }); if (post == null) { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts index 6c27a33c1..64e204172 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["postId", "title", "fileIds"], } as const; - export default define(meta, paramDef, async (ps, user) => { const files = ( await Promise.all( diff --git a/packages/backend/src/server/api/endpoints/get-online-users-count.ts b/packages/backend/src/server/api/endpoints/get-online-users-count.ts index 5b5947edd..805674a5b 100644 --- a/packages/backend/src/server/api/endpoints/get-online-users-count.ts +++ b/packages/backend/src/server/api/endpoints/get-online-users-count.ts @@ -16,7 +16,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const count = await Users.countBy({ lastActiveDate: MoreThan(new Date(Date.now() - USER_ONLINE_THRESHOLD)), diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts index 9eac07474..df99a1e5a 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/list.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["sort"], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Hashtags.createQueryBuilder("tag"); diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts index f16816413..95bc608ec 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/search.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["query"], } as const; - export default define(meta, paramDef, async (ps) => { const hashtags = await Hashtags.createQueryBuilder("tag") .where("tag.name like :q", { q: `${ps.query.toLowerCase()}%` }) diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts index beed39da6..8cf90e450 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/show.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["tag"], } as const; - export default define(meta, paramDef, async (ps, user) => { const hashtag = await Hashtags.findOneBy({ name: normalizeForSearch(ps.tag), diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts index 5b34a1cfd..e2a834511 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts @@ -66,7 +66,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const instance = await fetchMeta(true); const hiddenTags = instance.hiddenTags.map((t) => normalizeForSearch(t)); diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts index 0fafdfd86..532c66307 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/users.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts @@ -47,7 +47,6 @@ export const paramDef = { required: ["tag", "sort"], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user").where( ":tag = ANY(user.tags)", diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts index c07ff029c..39543442c 100644 --- a/packages/backend/src/server/api/endpoints/i.ts +++ b/packages/backend/src/server/api/endpoints/i.ts @@ -20,7 +20,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user, token) => { const isSecure = token == null; diff --git a/packages/backend/src/server/api/endpoints/i/2fa/done.ts b/packages/backend/src/server/api/endpoints/i/2fa/done.ts index 0391de133..1e9892f03 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts @@ -16,7 +16,6 @@ export const paramDef = { required: ["token"], } as const; - export default define(meta, paramDef, async (ps, user) => { const token = ps.token.replace(/\s/g, ""); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index 4354ac36c..e80dc4d71 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -39,7 +39,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts index f286bdad7..11b2e9a2e 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts @@ -15,7 +15,6 @@ export const paramDef = { required: ["value"], } as const; - export default define(meta, paramDef, async (ps, user) => { await UserProfiles.update(user.id, { usePasswordLessLogin: ps.value, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index 4484524bd..8c0af28ee 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["password"], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register.ts b/packages/backend/src/server/api/endpoints/i/2fa/register.ts index 919ce1dc5..9019787f2 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts @@ -19,7 +19,6 @@ export const paramDef = { required: ["password"], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts index 7fafcb609..d491f0a6e 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts @@ -18,7 +18,6 @@ export const paramDef = { required: ["password", "credentialId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts index 491a89aed..9bb1538b0 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts @@ -16,7 +16,6 @@ export const paramDef = { required: ["password"], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts index f363b90cd..b95160194 100644 --- a/packages/backend/src/server/api/endpoints/i/apps.ts +++ b/packages/backend/src/server/api/endpoints/i/apps.ts @@ -18,7 +18,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = AccessTokens.createQueryBuilder("token").where( "token.userId = :userId", diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts index 408b987ed..f759b2303 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { // Get tokens const tokens = await AccessTokens.find({ diff --git a/packages/backend/src/server/api/endpoints/i/change-password.ts b/packages/backend/src/server/api/endpoints/i/change-password.ts index a33c801db..fcfc38bd1 100644 --- a/packages/backend/src/server/api/endpoints/i/change-password.ts +++ b/packages/backend/src/server/api/endpoints/i/change-password.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["currentPassword", "newPassword"], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/delete-account.ts b/packages/backend/src/server/api/endpoints/i/delete-account.ts index 50c6d09c9..81aee9a41 100644 --- a/packages/backend/src/server/api/endpoints/i/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["password"], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); const userDetailed = await Users.findOneByOrFail({ id: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/export-blocking.ts b/packages/backend/src/server/api/endpoints/i/export-blocking.ts index a2706a08b..4517ad5fa 100644 --- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { createExportBlockingJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-following.ts b/packages/backend/src/server/api/endpoints/i/export-following.ts index d99ad85e7..a228de8f1 100644 --- a/packages/backend/src/server/api/endpoints/i/export-following.ts +++ b/packages/backend/src/server/api/endpoints/i/export-following.ts @@ -20,7 +20,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { createExportFollowingJob(user, ps.excludeMuting, ps.excludeInactive); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-mute.ts b/packages/backend/src/server/api/endpoints/i/export-mute.ts index 2d9610a17..7bddc434d 100644 --- a/packages/backend/src/server/api/endpoints/i/export-mute.ts +++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { createExportMuteJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-notes.ts b/packages/backend/src/server/api/endpoints/i/export-notes.ts index 63a0dae50..48506ed6d 100644 --- a/packages/backend/src/server/api/endpoints/i/export-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { createExportNotesJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts index 15558a482..a71b1730b 100644 --- a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { createExportUserListsJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts index 489ff0526..f0dbd2de6 100644 --- a/packages/backend/src/server/api/endpoints/i/favorites.ts +++ b/packages/backend/src/server/api/endpoints/i/favorites.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( NoteFavorites.createQueryBuilder("favorite"), diff --git a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts index 7601b554d..d71ee3e5a 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts @@ -45,7 +45,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( GalleryLikes.createQueryBuilder("like"), diff --git a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts index 459fc580f..e471731ae 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( GalleryPosts.createQueryBuilder("post"), diff --git a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts index 2812cf3d4..bd58f9257 100644 --- a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -28,7 +28,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { return { count: await MutedNotes.countBy({ diff --git a/packages/backend/src/server/api/endpoints/i/import-blocking.ts b/packages/backend/src/server/api/endpoints/i/import-blocking.ts index 0644fa87e..e4f1da60c 100644 --- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/import-following.ts b/packages/backend/src/server/api/endpoints/i/import-following.ts index 4786cb83e..1a6c9b565 100644 --- a/packages/backend/src/server/api/endpoints/i/import-following.ts +++ b/packages/backend/src/server/api/endpoints/i/import-following.ts @@ -47,7 +47,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/import-muting.ts b/packages/backend/src/server/api/endpoints/i/import-muting.ts index e827456fd..20d240e73 100644 --- a/packages/backend/src/server/api/endpoints/i/import-muting.ts +++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts index 0ff5e1ae8..03b1dffbb 100644 --- a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts @@ -47,7 +47,6 @@ export const paramDef = { required: ["fileId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/known-as.ts b/packages/backend/src/server/api/endpoints/i/known-as.ts index 3a28b82f9..5e86e8b95 100644 --- a/packages/backend/src/server/api/endpoints/i/known-as.ts +++ b/packages/backend/src/server/api/endpoints/i/known-as.ts @@ -49,7 +49,6 @@ export const paramDef = { required: ["alsoKnownAs"], } as const; - export default define(meta, paramDef, async (ps, user) => { if (!ps.alsoKnownAs) throw new ApiError(meta.errors.noSuchUser); diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts index 4fa0a2f94..bfeba0459 100644 --- a/packages/backend/src/server/api/endpoints/i/move.ts +++ b/packages/backend/src/server/api/endpoints/i/move.ts @@ -91,7 +91,6 @@ function moveActivity(toUrl: string, fromUrl: string) { return renderActivity(activity); } - export default define(meta, paramDef, async (ps, user) => { if (!ps.moveToAccount) throw new ApiError(meta.errors.noSuchMoveTarget); if (user.isAdmin) throw new ApiError(meta.errors.adminForbidden); @@ -129,7 +128,7 @@ export default define(meta, paramDef, async (ps, user) => { if (fromUrl!.includes(element)) allowed = true; }); - if (!((allowed && toUrl ) && fromUrl)) + if (!(allowed && toUrl && fromUrl)) throw new ApiError(meta.errors.remoteAccountForbids); const updates = {} as Partial; diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index 0fe1dddab..6e1aabef7 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -64,7 +64,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { // includeTypes が空の場合はクエリしない if (ps.includeTypes && ps.includeTypes.length === 0) { diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts index 01eb08441..1be783a06 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -43,7 +43,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( PageLikes.createQueryBuilder("like"), diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts index 2929a50dc..78b72e3bc 100644 --- a/packages/backend/src/server/api/endpoints/i/pages.ts +++ b/packages/backend/src/server/api/endpoints/i/pages.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Pages.createQueryBuilder("page"), diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts index aa94e058f..40aa57918 100644 --- a/packages/backend/src/server/api/endpoints/i/pin.ts +++ b/packages/backend/src/server/api/endpoints/i/pin.ts @@ -46,7 +46,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { await addPinned(user, ps.noteId).catch((e) => { if (e.id === "70c4e51f-5bea-449c-a030-53bee3cce202") diff --git a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts index 8eeb9e236..033367727 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts @@ -16,7 +16,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { // Update documents await MessagingMessages.update( diff --git a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts index 85df15a10..8a8857c83 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts @@ -16,7 +16,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { // Remove documents await NoteUnreads.delete({ diff --git a/packages/backend/src/server/api/endpoints/i/read-announcement.ts b/packages/backend/src/server/api/endpoints/i/read-announcement.ts index c8797f923..5218dba87 100644 --- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts +++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts @@ -28,7 +28,6 @@ export const paramDef = { required: ["announcementId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Check if announcement exists const announcement = await Announcements.findOneBy({ id: ps.announcementId }); diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts index 1c253ef9e..dff37cf3d 100644 --- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts +++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts @@ -22,7 +22,6 @@ export const paramDef = { required: ["password"], } as const; - export default define(meta, paramDef, async (ps, user) => { const freshUser = await Users.findOneByOrFail({ id: user.id }); const oldToken = freshUser.token; diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts index 0a5095167..ee9fe7e9d 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts @@ -22,7 +22,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts index 73eb92481..85900bd74 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["key"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/get.ts b/packages/backend/src/server/api/endpoints/i/registry/get.ts index aff9806ee..b143b7228 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["key"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts index bf7ba6daa..23698dc53 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -22,7 +22,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys.ts b/packages/backend/src/server/api/endpoints/i/registry/keys.ts index c8c3b47c3..ad7d08c5a 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts @@ -22,7 +22,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .select("item.key") diff --git a/packages/backend/src/server/api/endpoints/i/registry/remove.ts b/packages/backend/src/server/api/endpoints/i/registry/remove.ts index 2e17e90ed..d3793b0e2 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["key"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts index a8d31497b..3d66359c1 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts @@ -13,7 +13,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .select("item.scope") diff --git a/packages/backend/src/server/api/endpoints/i/registry/set.ts b/packages/backend/src/server/api/endpoints/i/registry/set.ts index 3519afb83..7f9eebd5e 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/set.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts @@ -26,7 +26,6 @@ export const paramDef = { required: ["key", "value"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/revoke-token.ts b/packages/backend/src/server/api/endpoints/i/revoke-token.ts index 91062b338..308442bf7 100644 --- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts +++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts @@ -16,7 +16,6 @@ export const paramDef = { required: ["tokenId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const token = await AccessTokens.findOneBy({ id: ps.tokenId }); diff --git a/packages/backend/src/server/api/endpoints/i/signin-history.ts b/packages/backend/src/server/api/endpoints/i/signin-history.ts index 69b4fd979..288b750b7 100644 --- a/packages/backend/src/server/api/endpoints/i/signin-history.ts +++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts @@ -18,7 +18,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Signins.createQueryBuilder("signin"), diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts index a625fe941..c248eb34e 100644 --- a/packages/backend/src/server/api/endpoints/i/unpin.ts +++ b/packages/backend/src/server/api/endpoints/i/unpin.ts @@ -34,7 +34,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { await removePinned(user, ps.noteId).catch((e) => { if (e.id === "b302d4cf-c050-400a-bbb3-be208681f40c") diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts index a33da8fc9..c3c24d4d3 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -43,7 +43,6 @@ export const paramDef = { required: ["password"], } as const; - export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 5816ddf34..48868de37 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -134,7 +134,6 @@ export const paramDef = { }, } as const; - export default define(meta, paramDef, async (ps, _user, token) => { const user = await Users.findOneByOrFail({ id: _user.id }); const isSecure = token == null; diff --git a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts index 6799f6a5c..d0c6caf0e 100644 --- a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts +++ b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts @@ -45,7 +45,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( UserGroupInvitations.createQueryBuilder("invitation"), diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts index afa13fc75..2b0f1781e 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["name", "url", "secret", "on"], } as const; - export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts b/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts index 17c50de92..4a2c3d83b 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["webhookId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.findOneBy({ id: ps.webhookId, diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts index 16c244ea6..3afead599 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts @@ -15,7 +15,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const webhooks = await Webhooks.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts index 3c8af932b..96c045747 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts @@ -26,7 +26,6 @@ export const paramDef = { required: ["webhookId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.findOneBy({ id: ps.webhookId, diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts index 278e96ce9..161d705e1 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts @@ -39,7 +39,6 @@ export const paramDef = { required: ["webhookId", "name", "url", "secret", "on", "active"], } as const; - export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.findOneBy({ id: ps.webhookId, diff --git a/packages/backend/src/server/api/endpoints/latest-version.ts b/packages/backend/src/server/api/endpoints/latest-version.ts index a7751234b..fc0ccbc96 100644 --- a/packages/backend/src/server/api/endpoints/latest-version.ts +++ b/packages/backend/src/server/api/endpoints/latest-version.ts @@ -13,7 +13,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { let tag_name; await fetch( diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts index 0c2be6b6d..7d1df6985 100644 --- a/packages/backend/src/server/api/endpoints/messaging/history.ts +++ b/packages/backend/src/server/api/endpoints/messaging/history.ts @@ -36,7 +36,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const mute = await Mutings.findBy({ muterId: user.id, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index 7d409b232..4b5440383 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -79,7 +79,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { if (ps.userId != null) { // Fetch recipient (user) diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index 7311f526b..99d392ce4 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -94,7 +94,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { let recipientUser: User | null; let recipientGroup: UserGroup | null; diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts index 9c6d5af79..42ff050d1 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts @@ -34,7 +34,6 @@ export const paramDef = { required: ["messageId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const message = await MessagingMessages.findOneBy({ id: ps.messageId, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts index 6bbb426c5..0ef013b79 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts @@ -30,7 +30,6 @@ export const paramDef = { required: ["messageId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const message = await MessagingMessages.findOneBy({ id: ps.messageId }); diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 1002b75fe..bb3eb4d57 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -396,7 +396,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts index 0ee5803bf..0525d79a7 100644 --- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts +++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts @@ -42,7 +42,6 @@ export const paramDef = { required: ["session", "permission"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Generate access token const accessToken = secureRndstr(32, true); diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index 8a1d075a4..bacab9b45 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -48,7 +48,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const muter = user; diff --git a/packages/backend/src/server/api/endpoints/mute/delete.ts b/packages/backend/src/server/api/endpoints/mute/delete.ts index aa6078cdc..cc67a44c2 100644 --- a/packages/backend/src/server/api/endpoints/mute/delete.ts +++ b/packages/backend/src/server/api/endpoints/mute/delete.ts @@ -40,7 +40,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const muter = user; diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts index e15296220..7bbe29a4c 100644 --- a/packages/backend/src/server/api/endpoints/mute/list.ts +++ b/packages/backend/src/server/api/endpoints/mute/list.ts @@ -32,7 +32,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Mutings.createQueryBuilder("muting"), diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts index 8cee7042f..8a097c8a0 100644 --- a/packages/backend/src/server/api/endpoints/my/apps.ts +++ b/packages/backend/src/server/api/endpoints/my/apps.ts @@ -28,7 +28,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = { userId: user.id, diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 367f83631..9787740ab 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -34,7 +34,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index 27f042c90..9047fcce1 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -36,7 +36,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts index 90cf2e8d7..34b035add 100644 --- a/packages/backend/src/server/api/endpoints/notes/clips.ts +++ b/packages/backend/src/server/api/endpoints/notes/clips.ts @@ -39,7 +39,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const note = await getNote(ps.noteId, me).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index ad1b0ee75..2e8f5ef73 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -41,7 +41,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index f16474305..41b8ab979 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -186,7 +186,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { if (user.movedToUri != null) throw new ApiError(meta.errors.accountLocked); let visibleUsers: User[] = []; diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts index 79706f2f2..5fc79db7d 100644 --- a/packages/backend/src/server/api/endpoints/notes/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/delete.ts @@ -41,7 +41,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") @@ -49,7 +48,7 @@ export default define(meta, paramDef, async (ps, user) => { throw err; }); - if (!(user.isAdmin || user.isModerator ) && note.userId !== user.id) { + if (!(user.isAdmin || user.isModerator) && note.userId !== user.id) { throw new ApiError(meta.errors.accessDenied); } diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts index 6a377055a..835594f03 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts @@ -34,7 +34,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Get favoritee const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts index 84219d29b..9a0976748 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Get favoritee const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 1c2cd8d9a..cd7e44296 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -31,7 +31,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const max = 30; const day = 1000 * 60 * 60 * 24 * 3; // 3日前まで diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index 8ac2e87a0..e4a38cffb 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -51,11 +51,10 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableGlobalTimeline) { - if (user == null || (!(user.isAdmin || user.isModerator))) { + if (user == null || !(user.isAdmin || user.isModerator)) { throw new ApiError(meta.errors.gtlDisabled); } } diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 5872af6b0..3d6103da8 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -58,7 +58,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableLocalTimeline && !user.isAdmin && !user.isModerator) { diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 93a9bca63..22e5965fc 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -61,11 +61,10 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableLocalTimeline) { - if (user == null || (!(user.isAdmin || user.isModerator))) { + if (user == null || !(user.isAdmin || user.isModerator)) { throw new ApiError(meta.errors.ltlDisabled); } } diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index 72cca273f..3e5c4f18b 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -38,7 +38,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const followingQuery = Followings.createQueryBuilder("following") .select("following.followeeId") diff --git a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts index 347e413cb..fcd24db99 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts @@ -29,7 +29,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = Polls.createQueryBuilder("poll") .where("poll.userHost IS NULL") diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts index 17c40bc7f..0558aa1b8 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts @@ -74,7 +74,6 @@ export const paramDef = { required: ["noteId", "choice"], } as const; - export default define(meta, paramDef, async (ps, user) => { const createdAt = new Date(); diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index 44ea966f9..3c8af119a 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -49,7 +49,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // check note visibility const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts index 93d49681b..2c8671070 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts @@ -46,7 +46,6 @@ export const paramDef = { required: ["noteId", "reaction"], } as const; - export default define(meta, paramDef, async (ps, user) => { if (user.movedToUri != null) throw new ApiError(meta.errors.accountLocked); const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts index 98ea05c45..59096c4c8 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts @@ -40,7 +40,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts index a3c76d0b2..6dacadec2 100644 --- a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts @@ -61,11 +61,10 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableRecommendedTimeline) { - if (user == null || (!(user.isAdmin || user.isModerator))) { + if (user == null || !(user.isAdmin || user.isModerator)) { throw new ApiError(meta.errors.rtlDisabled); } } diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index 226c29c8e..b09243e7e 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -45,7 +45,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index 6a122cf8a..0a8e90949 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -35,7 +35,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index 97b0d575f..8cf9ce8fb 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -69,7 +69,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index df463b972..ce60436db 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -58,7 +58,6 @@ export const paramDef = { required: ["query"], } as const; - export default define(meta, paramDef, async (ps, me) => { if (es == null) { const query = makePaginationQuery( diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index 00181977b..39d128134 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts index 0bad46fb0..630b2a800 100644 --- a/packages/backend/src/server/api/endpoints/notes/state.ts +++ b/packages/backend/src/server/api/endpoints/notes/state.ts @@ -44,7 +44,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user); diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts index 1b9b7bfaa..e4803cc29 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts index 00d11f6f7..c06fd59ba 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 1e1bbdd7b..083f41365 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -48,7 +48,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { const hasFollowing = (await Followings.count({ diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index e3d3ed7a0..c6415ceef 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -38,7 +38,6 @@ export const paramDef = { required: ["noteId", "targetLang"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index 2b19f721b..a30a19f19 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -35,7 +35,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 2a1926a84..c1e535722 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -53,7 +53,6 @@ export const paramDef = { required: ["listId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const list = await UserLists.findOneBy({ id: ps.listId, diff --git a/packages/backend/src/server/api/endpoints/notes/watching/create.ts b/packages/backend/src/server/api/endpoints/notes/watching/create.ts index ecb6f9877..f8921099a 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts index 46ece274e..b441ad74b 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts @@ -27,7 +27,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts index 544ca65cf..bc5723369 100644 --- a/packages/backend/src/server/api/endpoints/notifications/create.ts +++ b/packages/backend/src/server/api/endpoints/notifications/create.ts @@ -21,7 +21,6 @@ export const paramDef = { required: ["body"], } as const; - export default define(meta, paramDef, async (ps, user, token) => { createNotification(user.id, "app", { appAccessTokenId: token ? token.id : null, diff --git a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts index 31c04168b..e0888ad75 100644 --- a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -17,7 +17,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { // Update documents await Notifications.update( diff --git a/packages/backend/src/server/api/endpoints/notifications/read.ts b/packages/backend/src/server/api/endpoints/notifications/read.ts index b1c036bff..9efb2fcc0 100644 --- a/packages/backend/src/server/api/endpoints/notifications/read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/read.ts @@ -42,7 +42,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { if ("notificationId" in ps) return readNotification(user.id, [ps.notificationId]); diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts index ca27a790b..a0f1e912f 100644 --- a/packages/backend/src/server/api/endpoints/page-push.ts +++ b/packages/backend/src/server/api/endpoints/page-push.ts @@ -26,7 +26,6 @@ export const paramDef = { required: ["pageId", "event"], } as const; - export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts index 5b720a229..716d3265c 100644 --- a/packages/backend/src/server/api/endpoints/pages/create.ts +++ b/packages/backend/src/server/api/endpoints/pages/create.ts @@ -76,7 +76,6 @@ export const paramDef = { required: ["title", "name", "content", "variables", "script"], } as const; - export default define(meta, paramDef, async (ps, user) => { let eyeCatchingImage = null; if (ps.eyeCatchingImageId != null) { diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts index 4b94258c1..98b035f7c 100644 --- a/packages/backend/src/server/api/endpoints/pages/delete.ts +++ b/packages/backend/src/server/api/endpoints/pages/delete.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["pageId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts index 55a9b7a18..a76346589 100644 --- a/packages/backend/src/server/api/endpoints/pages/featured.ts +++ b/packages/backend/src/server/api/endpoints/pages/featured.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Pages.createQueryBuilder("page") .where("page.visibility = 'public'") diff --git a/packages/backend/src/server/api/endpoints/pages/like.ts b/packages/backend/src/server/api/endpoints/pages/like.ts index ed3e3f001..f14ed39eb 100644 --- a/packages/backend/src/server/api/endpoints/pages/like.ts +++ b/packages/backend/src/server/api/endpoints/pages/like.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["pageId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index c5d7b4f69..a25eb30b6 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -45,7 +45,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, user) => { let page: Page | null = null; diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts index 309215802..07bf3fbf4 100644 --- a/packages/backend/src/server/api/endpoints/pages/unlike.ts +++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["pageId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/update.ts b/packages/backend/src/server/api/endpoints/pages/update.ts index 298e2e133..65e1b3b2d 100644 --- a/packages/backend/src/server/api/endpoints/pages/update.ts +++ b/packages/backend/src/server/api/endpoints/pages/update.ts @@ -77,7 +77,6 @@ export const paramDef = { required: ["pageId", "title", "name", "content", "variables", "script"], } as const; - export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/patrons.ts b/packages/backend/src/server/api/endpoints/patrons.ts index 545374b6a..99d698881 100644 --- a/packages/backend/src/server/api/endpoints/patrons.ts +++ b/packages/backend/src/server/api/endpoints/patrons.ts @@ -14,7 +14,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { let patrons; await fetch( diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts index 89111b2c0..c1f7e110b 100644 --- a/packages/backend/src/server/api/endpoints/ping.ts +++ b/packages/backend/src/server/api/endpoints/ping.ts @@ -25,7 +25,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { return { pong: Date.now(), diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index 2bffbe116..22020068c 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -30,7 +30,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const meta = await fetchMeta(); diff --git a/packages/backend/src/server/api/endpoints/promo/read.ts b/packages/backend/src/server/api/endpoints/promo/read.ts index de4b12852..09c8cb6fa 100644 --- a/packages/backend/src/server/api/endpoints/promo/read.ts +++ b/packages/backend/src/server/api/endpoints/promo/read.ts @@ -26,7 +26,6 @@ export const paramDef = { required: ["noteId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/recommended-instances.ts b/packages/backend/src/server/api/endpoints/recommended-instances.ts index c7c9cbc26..8407afb1d 100644 --- a/packages/backend/src/server/api/endpoints/recommended-instances.ts +++ b/packages/backend/src/server/api/endpoints/recommended-instances.ts @@ -26,7 +26,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const meta = await fetchMeta(); const instances = await Promise.all(meta.recommendedInstances.map((x) => x)); diff --git a/packages/backend/src/server/api/endpoints/release.ts b/packages/backend/src/server/api/endpoints/release.ts index 19fe6bfd0..6365274b6 100644 --- a/packages/backend/src/server/api/endpoints/release.ts +++ b/packages/backend/src/server/api/endpoints/release.ts @@ -14,7 +14,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { let release; diff --git a/packages/backend/src/server/api/endpoints/request-reset-password.ts b/packages/backend/src/server/api/endpoints/request-reset-password.ts index 559764d38..bac564c1d 100644 --- a/packages/backend/src/server/api/endpoints/request-reset-password.ts +++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts @@ -33,7 +33,6 @@ export const paramDef = { required: ["username", "email"], } as const; - export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ usernameLower: ps.username.toLowerCase(), diff --git a/packages/backend/src/server/api/endpoints/reset-db.ts b/packages/backend/src/server/api/endpoints/reset-db.ts index a343656a8..c64db7bca 100644 --- a/packages/backend/src/server/api/endpoints/reset-db.ts +++ b/packages/backend/src/server/api/endpoints/reset-db.ts @@ -19,7 +19,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, user) => { if (process.env.NODE_ENV !== "test") throw new Error("NODE_ENV is not a test"); diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts index 3a7b64201..51755727a 100644 --- a/packages/backend/src/server/api/endpoints/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/reset-password.ts @@ -23,7 +23,6 @@ export const paramDef = { required: ["token", "password"], } as const; - export default define(meta, paramDef, async (ps, user) => { const req = await PasswordResetRequests.findOneByOrFail({ token: ps.token, diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts index f40df59c6..1ce27e262 100644 --- a/packages/backend/src/server/api/endpoints/server-info.ts +++ b/packages/backend/src/server/api/endpoints/server-info.ts @@ -15,7 +15,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const memStats = await si.mem(); const fsStats = await si.fsSize(); diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts index 7947e54af..8bd559768 100644 --- a/packages/backend/src/server/api/endpoints/stats.ts +++ b/packages/backend/src/server/api/endpoints/stats.ts @@ -59,7 +59,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async () => { const [ notesCount, diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index bff60bc69..7218b0d50 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -40,7 +40,6 @@ export const paramDef = { required: ["endpoint", "auth", "publickey"], } as const; - export default define(meta, paramDef, async (ps, user) => { // if already subscribed const exist = await SwSubscriptions.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts index 9e84bd37e..b025630e4 100644 --- a/packages/backend/src/server/api/endpoints/sw/unregister.ts +++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts @@ -17,7 +17,6 @@ export const paramDef = { required: ["endpoint"], } as const; - export default define(meta, paramDef, async (ps, user) => { await SwSubscriptions.delete({ userId: user.id, diff --git a/packages/backend/src/server/api/endpoints/test.ts b/packages/backend/src/server/api/endpoints/test.ts index 948820a0b..2c43c6115 100644 --- a/packages/backend/src/server/api/endpoints/test.ts +++ b/packages/backend/src/server/api/endpoints/test.ts @@ -20,7 +20,6 @@ export const paramDef = { required: ["required"], } as const; - export default define(meta, paramDef, async (ps, me) => { return ps; }); diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts index 1350085ec..f5aa4ed1e 100644 --- a/packages/backend/src/server/api/endpoints/username/available.ts +++ b/packages/backend/src/server/api/endpoints/username/available.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["username"], } as const; - export default define(meta, paramDef, async (ps) => { // Get exist const exist = await Users.countBy({ diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts index 3f03f0cc9..f0a867090 100644 --- a/packages/backend/src/server/api/endpoints/users.ts +++ b/packages/backend/src/server/api/endpoints/users.ts @@ -58,7 +58,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user"); query.where("user.isExplorable = TRUE"); diff --git a/packages/backend/src/server/api/endpoints/users/clips.ts b/packages/backend/src/server/api/endpoints/users/clips.ts index 497baef88..0dc90b8f9 100644 --- a/packages/backend/src/server/api/endpoints/users/clips.ts +++ b/packages/backend/src/server/api/endpoints/users/clips.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Clips.createQueryBuilder("clip"), diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index b116c369e..138343d9f 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -68,7 +68,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy( ps.userId != null diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index ac1618ba4..967379d0c 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -68,7 +68,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy( ps.userId != null diff --git a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts index ddb547256..5d64fb472 100644 --- a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( GalleryPosts.createQueryBuilder("post"), diff --git a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts index 1d269981f..9722804c8 100644 --- a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -56,7 +56,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/users/groups/create.ts b/packages/backend/src/server/api/endpoints/users/groups/create.ts index 26fd2ca80..76bd78c49 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/create.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["name"], } as const; - export default define(meta, paramDef, async (ps, user) => { const userGroup = await UserGroups.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/users/groups/delete.ts b/packages/backend/src/server/api/endpoints/users/groups/delete.ts index 477704c65..81c15ad38 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts @@ -28,7 +28,6 @@ export const paramDef = { required: ["groupId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const userGroup = await UserGroups.findOneBy({ id: ps.groupId, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts index f7ca6e9ab..5cb3a7bad 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts @@ -30,7 +30,6 @@ export const paramDef = { required: ["invitationId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch the invitation const invitation = await UserGroupInvitations.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts index 705b5fd66..c04ebed23 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts @@ -29,7 +29,6 @@ export const paramDef = { required: ["invitationId"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch the invitation const invitation = await UserGroupInvitations.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/invite.ts b/packages/backend/src/server/api/endpoints/users/groups/invite.ts index c7807fb89..10cc21586 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts @@ -55,7 +55,6 @@ export const paramDef = { required: ["groupId", "userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/joined.ts b/packages/backend/src/server/api/endpoints/users/groups/joined.ts index 3e9c97e2a..8422cf586 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts @@ -30,7 +30,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const ownedGroups = await UserGroups.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/groups/leave.ts b/packages/backend/src/server/api/endpoints/users/groups/leave.ts index 835a9dee1..d963b1826 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts @@ -35,7 +35,6 @@ export const paramDef = { required: ["groupId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/owned.ts b/packages/backend/src/server/api/endpoints/users/groups/owned.ts index a6b7b7b2a..d86185ff0 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts @@ -29,7 +29,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const userGroups = await UserGroups.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/groups/pull.ts b/packages/backend/src/server/api/endpoints/users/groups/pull.ts index fbab19cc7..1f79a2d2b 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts @@ -43,7 +43,6 @@ export const paramDef = { required: ["groupId", "userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/show.ts b/packages/backend/src/server/api/endpoints/users/groups/show.ts index 69e77c6e8..46f4410c8 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/show.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts @@ -35,7 +35,6 @@ export const paramDef = { required: ["groupId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts index 534ad6e31..032244157 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts @@ -50,7 +50,6 @@ export const paramDef = { required: ["groupId", "userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/update.ts b/packages/backend/src/server/api/endpoints/users/groups/update.ts index 4bab9d28e..fa720c9c4 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/update.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts @@ -36,7 +36,6 @@ export const paramDef = { required: ["groupId", "name"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts index 89537e40b..6bbbf603e 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -28,7 +28,6 @@ export const paramDef = { required: ["name"], } as const; - export default define(meta, paramDef, async (ps, user) => { const userList = await UserLists.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts index cf0f081af..49c4cf6f6 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts @@ -24,7 +24,6 @@ export const paramDef = { type: "object", } as const; - export default define(meta, paramDef, async (ps, user) => { while ((await UserLists.findOneBy({ userId: user.id })) != null) { const userList = await UserLists.findOneBy({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete.ts b/packages/backend/src/server/api/endpoints/users/lists/delete.ts index b36bb4aa1..456629567 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts @@ -28,7 +28,6 @@ export const paramDef = { required: ["listId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const userList = await UserLists.findOneBy({ id: ps.listId, diff --git a/packages/backend/src/server/api/endpoints/users/lists/list.ts b/packages/backend/src/server/api/endpoints/users/lists/list.ts index c8464437a..5d590ee0e 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/list.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts @@ -29,7 +29,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const userLists = await UserLists.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/lists/pull.ts b/packages/backend/src/server/api/endpoints/users/lists/pull.ts index ccd14faaf..07fae2067 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts @@ -37,7 +37,6 @@ export const paramDef = { required: ["listId", "userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/push.ts b/packages/backend/src/server/api/endpoints/users/lists/push.ts index 9af5d3157..a14195bbc 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/push.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts @@ -50,7 +50,6 @@ export const paramDef = { required: ["listId", "userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/show.ts b/packages/backend/src/server/api/endpoints/users/lists/show.ts index 12b91d8d1..716fd405d 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/show.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts @@ -35,7 +35,6 @@ export const paramDef = { required: ["listId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/update.ts b/packages/backend/src/server/api/endpoints/users/lists/update.ts index ff074dd81..0ac788fd3 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/update.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts @@ -36,7 +36,6 @@ export const paramDef = { required: ["listId", "name"], } as const; - export default define(meta, paramDef, async (ps, user) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index b2815b39d..724cfc9af 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -58,7 +58,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/users/pages.ts b/packages/backend/src/server/api/endpoints/users/pages.ts index dc6d044d9..c08258b19 100644 --- a/packages/backend/src/server/api/endpoints/users/pages.ts +++ b/packages/backend/src/server/api/endpoints/users/pages.ts @@ -32,7 +32,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Pages.createQueryBuilder("page"), diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index 545f41549..17b7a04a0 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -46,7 +46,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const profile = await UserProfiles.findOneByOrFail({ userId: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts index 57df00e6f..615cca785 100644 --- a/packages/backend/src/server/api/endpoints/users/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts @@ -39,7 +39,6 @@ export const paramDef = { required: [], } as const; - export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user") .where("user.isLocked = FALSE") diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts index ac61bbdd1..01f39396d 100644 --- a/packages/backend/src/server/api/endpoints/users/relation.ts +++ b/packages/backend/src/server/api/endpoints/users/relation.ts @@ -130,7 +130,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const ids = Array.isArray(ps.userId) ? ps.userId : [ps.userId]; diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index 5d76fc8eb..44d3f9b50 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -45,7 +45,6 @@ export const paramDef = { required: ["userId", "comment"], } as const; - export default define(meta, paramDef, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 3b2af8d90..99aa2f1af 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -38,7 +38,6 @@ export const paramDef = { // TODO: avatar,bannerをJOINしたいけどエラーになる - export default define(meta, paramDef, async (ps, me) => { const activeThreshold = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30); // 30日 diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index 39f2bd35e..db687a107 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -40,7 +40,6 @@ export const paramDef = { required: ["query"], } as const; - export default define(meta, paramDef, async (ps, me) => { const activeThreshold = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30); // 30日 diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index fb061a136..49cac81fd 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -85,7 +85,6 @@ export const paramDef = { ], } as const; - export default define(meta, paramDef, async (ps, me) => { let user; diff --git a/packages/backend/src/server/api/endpoints/users/stats.ts b/packages/backend/src/server/api/endpoints/users/stats.ts index 8107151ac..83e821f49 100644 --- a/packages/backend/src/server/api/endpoints/users/stats.ts +++ b/packages/backend/src/server/api/endpoints/users/stats.ts @@ -146,7 +146,6 @@ export const paramDef = { required: ["userId"], } as const; - export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); if (user == null) { diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts index 6ae838d2a..841c84af8 100644 --- a/packages/backend/src/server/api/stream/channels/channel.ts +++ b/packages/backend/src/server/api/stream/channels/channel.ts @@ -57,7 +57,8 @@ export default class extends Channel { // Remove not typing users for (const [userId, date] of Object.entries(this.typers)) { - if (now.getTime() - date.getTime() > 5000) this.typers[userId] = undefined; + if (now.getTime() - date.getTime() > 5000) + this.typers[userId] = undefined; } const users = await Users.packMany(Object.keys(this.typers), null, { diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts index 3837becd2..bea201088 100644 --- a/packages/backend/src/server/api/stream/channels/global-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts @@ -18,7 +18,7 @@ export default class extends Channel { public async init(params: any) { const meta = await fetchMeta(); if (meta.disableGlobalTimeline) { - if (this.user == null || (!(this.user.isAdmin || this.user.isModerator))) + if (this.user == null || !(this.user.isAdmin || this.user.isModerator)) return; } diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts index 253fd29b4..6f8075b7a 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -17,7 +17,7 @@ export default class extends Channel { public async init(params: any) { const meta = await fetchMeta(); if (meta.disableLocalTimeline) { - if (this.user == null || (!(this.user.isAdmin || this.user.isModerator))) + if (this.user == null || !(this.user.isAdmin || this.user.isModerator)) return; } diff --git a/packages/backend/src/server/api/stream/channels/messaging.ts b/packages/backend/src/server/api/stream/channels/messaging.ts index 3ce99400f..dc1825059 100644 --- a/packages/backend/src/server/api/stream/channels/messaging.ts +++ b/packages/backend/src/server/api/stream/channels/messaging.ts @@ -108,7 +108,8 @@ export default class extends Channel { // Remove not typing users for (const [userId, date] of Object.entries(this.typers)) { - if (now.getTime() - date.getTime() > 5000) this.typers[userId] = undefined; + if (now.getTime() - date.getTime() > 5000) + this.typers[userId] = undefined; } const users = await Users.packMany(Object.keys(this.typers), null, { diff --git a/packages/backend/src/server/file/send-drive-file.ts b/packages/backend/src/server/file/send-drive-file.ts index 48b52bf4f..26a755ad2 100644 --- a/packages/backend/src/server/file/send-drive-file.ts +++ b/packages/backend/src/server/file/send-drive-file.ts @@ -32,7 +32,6 @@ const commonReadableHandlerGenerator = ctx.set("Cache-Control", "max-age=300"); }; - export default async function (ctx: Koa.Context) { const key = ctx.params.key; diff --git a/packages/backend/src/server/proxy/proxy-media.ts b/packages/backend/src/server/proxy/proxy-media.ts index 6417433c2..47ede2159 100644 --- a/packages/backend/src/server/proxy/proxy-media.ts +++ b/packages/backend/src/server/proxy/proxy-media.ts @@ -77,7 +77,7 @@ export async function proxyMedia(ctx: Koa.Context) { } else if (mime === "image/svg+xml") { image = await convertToWebp(path, 2048, 2048, 1); } else if ( - !(mime.startsWith("image/") &&FILE_TYPE_BROWSERSAFE.includes(mime)) + !(mime.startsWith("image/") && FILE_TYPE_BROWSERSAFE.includes(mime)) ) { throw new StatusError("Rejected type", 403, "Rejected type"); } else { diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 9c55c24bb..4ae8e5bfd 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -264,7 +264,7 @@ const getFeed = async (acct: string) => { // As the /@user[.json|.rss|.atom]/sub endpoint is complicated, we will use a regex to switch between them. const reUser = new RegExp( - "^/@(?[^/]+?)(?:\.(?json|rss|atom))?(?:/(?[^/]+))?$", + "^/@(?[^/]+?)(?:.(?json|rss|atom))?(?:/(?[^/]+))?$", ); router.get(reUser, async (ctx, next) => { const groups = reUser.exec(ctx.originalUrl)?.groups; @@ -616,8 +616,8 @@ router.get("/cli", async (ctx) => { }); const override = (source: string, target: string, depth = 0) => - [undefined - , + [ + undefined, ...target.split("/").filter((x) => x), ...source .split("/") diff --git a/packages/backend/src/services/fetch-instance-metadata.ts b/packages/backend/src/services/fetch-instance-metadata.ts index 9a1919551..79354448f 100644 --- a/packages/backend/src/services/fetch-instance-metadata.ts +++ b/packages/backend/src/services/fetch-instance-metadata.ts @@ -213,11 +213,7 @@ async function fetchIconUrl( doc: DOMWindow["document"] | null, manifest: Record | null, ): Promise { - if ( - manifest?.icons && - manifest.icons.length > 0 && - manifest.icons[0].src - ) { + if (manifest?.icons && manifest.icons.length > 0 && manifest.icons[0].src) { const url = `https://${instance.host}`; return new URL(manifest.icons[0].src, url).href; } diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index e8f1a53ab..b5be65d90 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -102,10 +102,11 @@ export default defineComponent({ switch (token.props.name) { case "tada": { const speed = validTime(token.props.args.speed) || "1s"; - style = - `font-size: 150%;${(this.$store.state.animatedMfm + style = `font-size: 150%;${ + this.$store.state.animatedMfm ? `animation: tada ${speed} linear infinite both;` - : "")}`; + : "" + }`; break; } case "jelly": { diff --git a/packages/client/src/config.ts b/packages/client/src/config.ts index 40295e0a4..e163a8cb2 100644 --- a/packages/client/src/config.ts +++ b/packages/client/src/config.ts @@ -7,8 +7,9 @@ export const host = address.host; export const hostname = address.hostname; export const url = address.origin; export const apiUrl = `${url}/api`; -export const wsUrl = - `${url.replace("http://", "ws://").replace("https://", "wss://")}/streaming`; +export const wsUrl = `${url + .replace("http://", "ws://") + .replace("https://", "wss://")}/streaming`; export const lang = localStorage.getItem("lang"); export const langs = _LANGS_; export const locale = JSON.parse(localStorage.getItem("locale")); diff --git a/packages/client/src/scripts/extract-avg-color-from-blurhash.ts b/packages/client/src/scripts/extract-avg-color-from-blurhash.ts index 01a42cecf..9f758cd6d 100644 --- a/packages/client/src/scripts/extract-avg-color-from-blurhash.ts +++ b/packages/client/src/scripts/extract-avg-color-from-blurhash.ts @@ -1,13 +1,13 @@ export function extractAvgColorFromBlurhash(hash: string) { return typeof hash === "string" ? `#${[...hash.slice(2, 6)] - .map((x) => - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".indexOf( - x, - ), - ) - .reduce((a, c) => a * 83 + c, 0) - .toString(16) - .padStart(6, "0")}` + .map((x) => + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".indexOf( + x, + ), + ) + .reduce((a, c) => a * 83 + c, 0) + .toString(16) + .padStart(6, "0")}` : undefined; } diff --git a/packages/client/src/scripts/extract-url-from-mfm.ts b/packages/client/src/scripts/extract-url-from-mfm.ts index 14a87e5d2..0c580b6d3 100644 --- a/packages/client/src/scripts/extract-url-from-mfm.ts +++ b/packages/client/src/scripts/extract-url-from-mfm.ts @@ -12,7 +12,7 @@ export function extractUrlFromMfm( const urlNodes = mfm.extract(nodes, (node) => { return ( node.type === "url" || - (node.type === "link" && (!(respectSilentFlag && node.props.silent))) + (node.type === "link" && !(respectSilentFlag && node.props.silent)) ); }); const urls: string[] = unique(urlNodes.map((x) => x.props.url)); diff --git a/packages/client/src/scripts/sound.ts b/packages/client/src/scripts/sound.ts index 331ff3d7d..82233dd6c 100644 --- a/packages/client/src/scripts/sound.ts +++ b/packages/client/src/scripts/sound.ts @@ -23,7 +23,7 @@ export function setVolume( } export function play(type: string) { - const sound = ColdDeviceStorage.get((`sound_${type}`) as any); + const sound = ColdDeviceStorage.get(`sound_${type}` as any); if (sound.type == null) return; playFile(sound.type, sound.volume); } diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index b5d7cdf56..0e23ae1b7 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -83,8 +83,8 @@ export const defaultStore = markRaw( menu: { where: "deviceAccount", default: [ - "notifications", undefined - , + "notifications", + undefined, "followRequests", "messaging", "explore", diff --git a/packages/client/src/widgets/index.ts b/packages/client/src/widgets/index.ts index 613cd5fac..29634ef12 100644 --- a/packages/client/src/widgets/index.ts +++ b/packages/client/src/widgets/index.ts @@ -85,6 +85,10 @@ export default function (app: App) { "MkwAiscript", defineAsyncComponent(() => import("./aiscript.vue")), ); + app.component( + "MkwUserList", + defineAsyncComponent(() => import("./user-list.vue")), + ); } export const widgets = [ @@ -109,4 +113,5 @@ export const widgets = [ "jobQueue", "button", "aiscript", + "userList", ]; From 05235ce843826919a642fe8d22ebb4f1bc269fbb Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 16 Jan 2023 11:26:01 -0800 Subject: [PATCH 80/89] fix user list widget --- locales/en-US.yml | 3 +++ packages/client/src/widgets/index.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index dd76e0c63..e06583f6f 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1330,6 +1330,9 @@ _widgets: serverMetric: "Server metrics" aiscript: "AiScript console" userList: "User list" + userList: "User list" + _userList: + chooseList: "Select a list" _cw: hide: "Hide" show: "Show content" diff --git a/packages/client/src/widgets/index.ts b/packages/client/src/widgets/index.ts index 29634ef12..216afa526 100644 --- a/packages/client/src/widgets/index.ts +++ b/packages/client/src/widgets/index.ts @@ -96,6 +96,7 @@ export const widgets = [ "notifications", "timeline", "calendar", + "userList", "rss", "rssTicker", "trends", @@ -113,5 +114,4 @@ export const widgets = [ "jobQueue", "button", "aiscript", - "userList", ]; From 97c9d1d2eae610c35cc4d836e4f54d43f47b926b Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 16 Jan 2023 11:26:56 -0800 Subject: [PATCH 81/89] fix dup --- locales/en-US.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index e06583f6f..cc741bd60 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1330,7 +1330,6 @@ _widgets: serverMetric: "Server metrics" aiscript: "AiScript console" userList: "User list" - userList: "User list" _userList: chooseList: "Select a list" _cw: From 6f6cedbb10857637f083e181715a72ec656521f3 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 16 Jan 2023 11:31:21 -0800 Subject: [PATCH 82/89] use MkAvatar for user-list widget --- package.json | 2 +- packages/client/src/widgets/user-list.vue | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0a738e18b..0aa06d40a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.0.8-rc", + "version": "13.0.8-rc2", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/widgets/user-list.vue b/packages/client/src/widgets/user-list.vue index 0df60fd84..61cdbe757 100644 --- a/packages/client/src/widgets/user-list.vue +++ b/packages/client/src/widgets/user-list.vue @@ -10,9 +10,7 @@
- - - +
@@ -22,6 +20,7 @@ import { useWidgetPropsManager, Widget, WidgetComponentExpose } from './widget'; import { GetFormResultType } from '@/scripts/form'; import MkContainer from '@/components/MkContainer.vue'; +import MkAvatars from '@/components/MkAvatars.vue'; import * as os from '@/os'; import { useInterval } from '@/scripts/use-interval'; import { i18n } from '@/i18n'; @@ -79,7 +78,7 @@ const fetch = () => { os.api('users/show', { userIds: list.userIds, }).then(_users => { - users = _users; + users = list.userIds; fetching = false; }); }); From 1c67da13c7883429700968756096e7e09c6a1b6f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 16 Jan 2023 11:40:06 -0800 Subject: [PATCH 83/89] display MkAvatars nicer --- package.json | 2 +- packages/client/src/components/MkAvatars.vue | 26 +++++++++++++++++--- packages/client/src/widgets/user-list.vue | 23 +++-------------- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 0aa06d40a..5afab94cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.0.8-rc2", + "version": "13.0.8-rc3", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/components/MkAvatars.vue b/packages/client/src/components/MkAvatars.vue index 958e5db0a..b43edec4a 100644 --- a/packages/client/src/components/MkAvatars.vue +++ b/packages/client/src/components/MkAvatars.vue @@ -1,7 +1,7 @@ @@ -22,3 +22,23 @@ onMounted(async () => { }); }); + + diff --git a/packages/client/src/widgets/user-list.vue b/packages/client/src/widgets/user-list.vue index 61cdbe757..6ee6dc05a 100644 --- a/packages/client/src/widgets/user-list.vue +++ b/packages/client/src/widgets/user-list.vue @@ -1,7 +1,6 @@