From c39fb5401f894bae46793777d8c8e07f1b88e756 Mon Sep 17 00:00:00 2001 From: Cleo Date: Wed, 4 Jan 2023 20:32:36 +0000 Subject: [PATCH 01/53] Fix: Increase rediculously small file size limit for follower imports Signed-off-by: Cleo --- packages/backend/src/server/api/endpoints/i/import-following.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 23414547f8..5f0cf91568 100644 --- a/packages/backend/src/server/api/endpoints/i/import-following.ts +++ b/packages/backend/src/server/api/endpoints/i/import-following.ts @@ -53,7 +53,7 @@ export default define(meta, paramDef, async (ps, user) => { if (file == null) throw new ApiError(meta.errors.noSuchFile); //if (!file.type.endsWith('/csv')) throw new ApiError(meta.errors.unexpectedFileType); - if (file.size > 50000) throw new ApiError(meta.errors.tooBigFile); + if (file.size > 2_000_000) throw new ApiError(meta.errors.tooBigFile); if (file.size === 0) throw new ApiError(meta.errors.emptyFile); createImportFollowingJob(user, file.id); From d8fc3483b7ce3b62c8889ee42b5c1bb71f6d35f0 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 4 Jan 2023 15:06:38 -0800 Subject: [PATCH 02/53] style: outline instance name in ticker --- packages/client/src/components/MkInstanceTicker.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/components/MkInstanceTicker.vue b/packages/client/src/components/MkInstanceTicker.vue index 85c3b90309..ebc02ec630 100644 --- a/packages/client/src/components/MkInstanceTicker.vue +++ b/packages/client/src/components/MkInstanceTicker.vue @@ -54,6 +54,7 @@ const bg = { vertical-align: top; font-weight: bold; text-overflow: clip; + text-shadow: -1px -1px 0 var(--bg), 1px -1px 0 var(--bg), -1px 1px 0 var(--bg), 1px 1px 0 var(--bg); } } From 508b33e503cf2f92ba44a1435e203cb55019176e Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Thu, 5 Jan 2023 04:06:48 +0000 Subject: [PATCH 03/53] 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 379915f41f..6a6faed2fe 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 da4361ef77..fc29623ddc 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 58e03e4ba4..3ed6e53aa6 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 cf9cc7d83b..da470c294e 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 b6118ec292..ba39a1b299 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 92e305d92f..1d35c878c4 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 5c5e7089f7..9f7028d3b1 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 b83a70bc19..bb3904e2e8 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 9e188ae086..185d12d5ac 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 ba29131a55..867331cc94 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 02d9e87bb5..d5c48276f4 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 8b2730a94d..b87a4b06ce 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 ce24665e8a..a7cbec5b64 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 1ccddd1453..8408d4c778 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 6f985a5f67..9d76dc6239 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 38ded0c8f2..ced0d67b7e 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 6f0a28b080..173548e90e 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 053827fa11..63caf22c1a 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 bd0ab3e45f..4f38b80c84 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 e4782914a8..310121c5ae 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 892cdbcf1c..e7528f9a2d 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 0000000000..498a1810d6 --- /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 fefc2781f3..5799fd57dc 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 c24936c034..46cde05054 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 12477d6377..a540951395 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 71a217d935..c6b6a3cd9f 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 61a1338f2f..3efacdf50d 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 f61236fa0b..3e3288d6d8 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 4bf101bb4a..d3f674d6f2 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 5d4778751a..9a0cca414d 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 dfa088d110..e9f5122e98 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 1715908130..83eb127301 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 0b35a22539..7567fa4083 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 6f6fdb8ab8..5374e67c9b 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 1be716335f..593ff6ea32 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 3dca9d07a9aa4a1b68704242788240f461cd4804 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 11:41:58 -0800 Subject: [PATCH 22/53] 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 0000000000..d32dd9c728 --- /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 ac4ef7eace105059eea563670f1bc6df6de3fe4f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 14:03:39 -0800 Subject: [PATCH 23/53] 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 446df15541..ee0359e194 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 db0dab012dfec78944c4cd7c0115ed529c97ceac Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 14:14:40 -0800 Subject: [PATCH 24/53] 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 cb7314de93..ba6a8ca8c7 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 25c2cb38ef..7097295895 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 2e67561e56..fd95f4258d 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 56bb3ac35517717e81e3d5b7a19036d09d9925f5 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 14:18:15 -0800 Subject: [PATCH 25/53] 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 ee0359e194..446df15541 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 98401ff31234b547b3e1385d8fc2dcf79bccce3d Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 16:48:49 -0800 Subject: [PATCH 26/53] 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 0000000000..39e112ff7c --- /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 ba6a8ca8c7..a677f6f391 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 7097295895..b5841883bd 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 9c9d2dbd86..0000000000 --- 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 c9e186625c..d1ac4780c0 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 fd95f4258d..47698dc88e 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 c33b7ac356baf9137301bf8a17c559757007076c Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 16:51:48 -0800 Subject: [PATCH 27/53] 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 a37e6cf0c0..054ce8a1f5 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 e7065fd809dff8e6351e69ac19166023964cf501 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Tue, 10 Jan 2023 00:19:16 +0100 Subject: [PATCH 28/53] 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 1e259649f9..23819135a9 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 a79e5275fea7144a834f8faf39ec9b2680278c9b Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Tue, 10 Jan 2023 01:02:22 +0100 Subject: [PATCH 29/53] 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 446df15541..66ff1b7257 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 b5841883bd..e03aeb157e 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 b1e48f70d03e5c145a39bbf859a9dda3e36ad1ee Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Wed, 11 Jan 2023 16:47:26 +0100 Subject: [PATCH 30/53] 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 66ff1b7257..4e7e0a76eb 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 625be42329012d9b1f3394d4438644fdc8ee9b2c Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Wed, 11 Jan 2023 19:42:04 +0100 Subject: [PATCH 31/53] 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 de711ba19e..87014f1276 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 ffaf783552..0000000000 --- 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 0160c2bcac..0000000000 --- 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 c50225ff93e810374fe81ded3635baa1574e3f1f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 11 Jan 2023 10:44:05 -0800 Subject: [PATCH 32/53] 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 e03aeb157e..b5841883bd 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 a0a3b128b6adcd8ebf995256dfa6f45ab21aa6ff Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 11 Jan 2023 10:48:17 -0800 Subject: [PATCH 33/53] 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 fb7992f43a..c50e057a68 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 2586f899da..86109f600a 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 15c8048ec1..d9b78c7793 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 e512cc6ec0..fad2ae5679 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 47698dc88e..b6ca5d7069 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 5948b2b74cbdce1421062fd896a940a682d674b7 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 11 Jan 2023 10:50:46 -0800 Subject: [PATCH 34/53] 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 d9b78c7793..dfc6a3b667 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 bbbfbc1061fbced2c8ccf4879597305ab0d89157 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Thu, 12 Jan 2023 20:19:12 +0100 Subject: [PATCH 35/53] 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 9f1fad38e3..703e8c66b5 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 af2baf8525..3798ec6f87 100644 --- a/packages/client/src/pages/messaging/index.vue +++ b/packages/client/src/pages/messaging/index.vue @@ -37,7 +37,7 @@