diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-02-03 17:57:40 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-02-03 17:57:40 +0900 |
| commit | ceab34f5f39ba9b102a91910373df95c718019c4 (patch) | |
| tree | 5fffcd104c4af4f2ff75501d0d6ad3c5b7a64bf0 | |
| parent | Merge branch 'develop' (diff) | |
| parent | 13.3.0 (diff) | |
| download | misskey-ceab34f5f39ba9b102a91910373df95c718019c4.tar.gz misskey-ceab34f5f39ba9b102a91910373df95c718019c4.tar.bz2 misskey-ceab34f5f39ba9b102a91910373df95c718019c4.zip | |
Merge branch 'develop'
99 files changed, 2381 insertions, 3687 deletions
diff --git a/.config/docker_example.yml b/.config/docker_example.yml index bd5eab492b..f8124bc9df 100644 --- a/.config/docker_example.yml +++ b/.config/docker_example.yml @@ -114,11 +114,6 @@ id: 'aid' # IP address family used for outgoing request (ipv4, ipv6 or dual) #outgoingAddressFamily: ipv4 -# Syslog option -#syslog: -# host: localhost -# port: 514 - # Proxy for HTTP/HTTPS #proxy: http://127.0.0.1:3128 diff --git a/.config/example.yml b/.config/example.yml index cabf167fba..8fe41da15a 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -114,11 +114,6 @@ id: 'aid' # IP address family used for outgoing request (ipv4, ipv6 or dual) #outgoingAddressFamily: ipv4 -# Syslog option -#syslog: -# host: localhost -# port: 514 - # Proxy for HTTP/HTTPS #proxy: http://127.0.0.1:3128 diff --git a/CHANGELOG.md b/CHANGELOG.md index 436c99a22c..36d9fcc4f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ You should also include the user name that made the change. --> +## 13.3.0 (2023/02/03) +### Changes +- twitter/github/discord連携機能が削除されました +- ハッシュタグごとのチャートが削除されました +- syslogのサポートが削除されました + +### Improvements +- ロールで広告の非表示が有効になっている場合は最初から広告を非表示にするように + ## 13.2.6 (2023/02/01) ### Changes - docker-compose.ymlをdocker-compose.yml.exampleにしました。docker-compose.ymlとしてコピーしてから使用してください。 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4689543d50..811e4219e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ Thank you for your PR! Before creating a PR, please check the following: - Check if there are any documents that need to be created or updated due to this change. - If you have added a feature or fixed a bug, please add a test case if possible. - Please make sure that tests and Lint are passed in advance. - - You can run it with `yarn test` and `yarn lint`. [See more info](#testing) + - You can run it with `pnpm test` and `pnpm lint`. [See more info](#testing) - If this PR includes UI changes, please attach a screenshot in the text. Thanks for your cooperation 🤗 @@ -102,7 +102,7 @@ If your language is not listed in Crowdin, please open an issue. During development, it is useful to use the ``` -yarn dev +pnpm dev ``` command. @@ -112,7 +112,7 @@ command. - Service Worker is watched by esbuild. ## Testing -- Test codes are located in [`/test`](/test). +- Test codes are located in [`/packages/backend/test`](/packages/backend/test). ### Run test Create a config file. @@ -127,12 +127,12 @@ Alternatively, prepare an empty (data can be erased) DB and edit `.config/test.y Run all test. ``` -yarn test +pnpm test ``` #### Run specify test ``` -yarn jest -- foo.ts +pnpm jest -- foo.ts ``` ### e2e tests @@ -177,9 +177,9 @@ vue-routerとの最大の違いは、niraxは複数のルーターが存在す これにより、アプリ内ウィンドウでブラウザとは個別にルーティングすることなどが可能になります。 ## Notes -### How to resolve conflictions occurred at yarn.lock? +### How to resolve conflictions occurred at pnpm-lock.yaml? -Just execute `yarn` to fix it. +Just execute `pnpm` to fix it. ### INSERTするときにはsaveではなくinsertを使用する #6441 @@ -265,7 +265,7 @@ MongoDBは`null`で返してきてたので、その感覚で`if (x === null)` ### Migration作成方法 packages/backendで: ```sh -yarn dlx typeorm migration:generate -d ormconfig.js -o <migration name> +pnpm dlx typeorm migration:generate -d ormconfig.js -o <migration name> ``` - 生成後、ファイルをmigration下に移してください @@ -24,6 +24,8 @@ --- +[](https://codecov.io/gh/misskey-dev/misskey) + </div> <div> diff --git a/chart/files/default.yml b/chart/files/default.yml index 862951d4d5..4061ca3eb6 100644 --- a/chart/files/default.yml +++ b/chart/files/default.yml @@ -133,11 +133,6 @@ id: "aid" # IP address family used for outgoing request (ipv4, ipv6 or dual) #outgoingAddressFamily: ipv4 -# Syslog option -#syslog: -# host: localhost -# port: 514 - # Proxy for HTTP/HTTPS #proxy: http://127.0.0.1:3128 diff --git a/locales/es-ES.yml b/locales/es-ES.yml index 47799a0917..7323494d61 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -509,7 +509,7 @@ objectStorageSetPublicRead: "Seleccionar \"public-read\" al subir " serverLogs: "Registros del servidor" deleteAll: "Eliminar todos" showFixedPostForm: "Mostrar el formulario de las entradas encima de la línea de tiempo" -newNoteRecived: "Tienes una nota nuevo" +newNoteRecived: "Tienes una nota nueva" sounds: "Sonidos" sound: "Sonidos" listen: "Escuchar" @@ -918,14 +918,320 @@ tools: "Utilidades" cannotLoad: "No se puede cargar." numberOfProfileView: "Número de vistas de perfil" like: "¡Muy bien!" +unlike: "Quitar 'me gusta'" +numberOfLikes: "Cantidad de 'Me gusta'" show: "Apariencia" +neverShow: "No mostrar de nuevo" +remindMeLater: "Recordar después" +didYouLikeMisskey: "¿Te gusta Misskey?" +pleaseDonate: "Misskey es software libre, y es usado por {host} . Por favor, ¡considera donar al proyecto principal para que podamos continuar!" +roles: "Roles" +role: "Roles" +normalUser: "Usuario normal" +undefined: "Indefinido" +assign: "Asignar" +unassign: "Quitar" color: "Color" +manageCustomEmojis: "Administrar emojis personalizados" +youCannotCreateAnymore: "Se alcanzó el límite de creación" +cannotPerformTemporary: "Indisponible temporalmente" +cannotPerformTemporaryDescription: "Esta acción no se puede realizar porque se excedió el límite de ejecución. Espera un poco y prueba de nuevo." +preset: "Predefinido" +selectFromPresets: "Escoger desde predefinidos" +achievements: "Logros" +_achievements: + earnedAt: "Desbloqueado el" + _types: + _notes1: + title: "Configurando mis espacio" + description: "Publicar tu primera nota" + flavor: "¡Pasándola bien con Misskey!" + _notes10: + title: "Algunas notas" + description: "10 notas publicadas" + _notes100: + title: "¡Muchas notas!" + description: "100 notas publicadas" + _notes500: + title: "¡Cubierto de notas!" + description: "500 notas publicadas" + _notes1000: + title: "¡Una montaña de notas!" + description: "1000 notas publicadas" + _notes5000: + title: "¡Exceso de notas!" + description: "5000 notas publicadas" + _notes10000: + title: "¡Súpernota!" + description: "10000 notas publicadas" + _notes20000: + title: "Necesito... Más... ¡Notas!" + description: "20000 notas publicadas" + _notes30000: + title: "¡Notas! ¡Notas! ¡Notas!" + description: "30000 notas publicadas" + _notes40000: + title: "Fábrica de notas" + description: "40000 notas publicadas" + _notes50000: + title: "¡Un planeta de notas!" + description: "50000 notas publicadas" + _notes60000: + title: "¡Un cuásar de notas!" + description: "60000 notas publicadas" + _notes70000: + title: "¡Un hoyo negro de notas!" + description: "70000 notas publicadas" + _notes80000: + title: "¡Una galaxia de notas!" + description: "80000 notas publicadas" + _notes90000: + title: "¡Todo un universo de notas!" + description: "90000 notas publicadas" + _notes100000: + title: "ALL YOUR NOTE ARE BELONG TO US" + description: "100000 notas publicadas" + flavor: "¿Tienes tanto para publicar?" + _login3: + title: "Principiante I" + description: "Días desde el inicio de sesión: 3" + flavor: "Desde hoy, soy Misskero" + _login7: + title: "Principiante II" + description: "Días desde el inicio de sesión: 7" + flavor: "¿Ya te acostumbraste?" + _login15: + title: "Principiante III" + description: "Días desde el inicio de sesión: 15" + _login30: + title: "Misskero I" + description: "Días desde el inicio de sesión: 30" + _login60: + title: "Misskero II" + description: "Días desde el inicio de sesión: 60" + _login100: + title: "Misskero III" + description: "Días desde el inicio de sesión: 100" + flavor: "Para este usuario, Misskaína" + _login200: + title: "Regular I" + description: "Días desde el inicio de sesión: 200" + _login300: + title: "Regular II" + description: "Días desde el inicio de sesión: 300" + _login400: + title: "Regular III" + description: "Días desde el inicio de sesión: 400" + _login500: + title: "Veterano I" + description: "Días desde el inicio de sesión: 500" + flavor: "Chicos, me encantan las libretas..." + _login600: + title: "Veterano II" + description: "Días desde el inicio de sesión: 600" + _login700: + title: "Veterano III" + description: "Días desde el inicio de sesión: 700" + _login800: + title: "Maestro I" + description: "Días desde el inicio de sesión: 800" + _login900: + title: "Maestro II" + description: "Días desde el inicio de sesión: 900" + _login1000: + title: "Maestro III" + description: "Días desde el inicio de sesión: 1000" + flavor: "¡Gracias por usar Misskey!" + _noteClipped1: + title: "No puedo evitar clipearte..." + description: "Hacer un clip por primera vez" + _noteFavorited1: + title: "Contemplando las estrellas" + description: "Poner una nota como favorito por primera vez" + _myNoteFavorited1: + title: "¡Quiero una estrella!" + description: "Tu nota ha sido marcada como favorito por primera vez" + _profileFilled: + title: "¡Listo!" + description: "Perfil completado" + _markedAsCat: + title: "Soy un gato" + description: "Configurar la cuenta como cuenta de un gato" + flavor: "Aún no tengo nombre" + _following1: + title: "Primera vez siguiendo a alguien" + description: "Seguir a un usuario" + _following10: + title: "Ahí la llevas, ahí la llevas..." + description: "10 usuarios seguidos" + _following50: + title: "¡Un puñado de amigos!" + description: "50 cuentas seguidas" + _following100: + title: "100 amigos" + description: "100 cuentas seguidas" + _following300: + title: "¡Sobrecarga de amigos!" + description: "300 cuentas seguidas" + _followers1: + title: "¡Tu primer seguidor!" + description: "1 seguidor ganado" + _followers10: + title: "¡Sígueme!" + description: "10 seguidores ganados" + _followers50: + title: "Viniendo en manada" + description: "50 seguidores ganados" + _followers100: + title: "Popular" + description: "100 cuentas seguidas" + _followers300: + title: "Por favor, hagan una fila" + description: "300 seguidores ganados" + _followers500: + title: "¡Toda una torre de radio!" + description: "500 seguidores ganados" + _followers1000: + title: "\"Influyente\"" + description: "1000 seguidores gandos" + _collectAchievements30: + title: "Coleccionista" + description: "30 logros ganados" + _viewAchievements3min: + title: "¡Te gustan los logros!" + description: "Mirando tus logros por 3 minutos" + _iLoveMisskey: + title: "¡AMO Misskey!" + description: "\"I ❤ #Misskey\" Publicado" + flavor: "El equipo de desarrollo de Misskey, en verdad, ¡aprecia tu apoyo!" + _foundTreasure: + title: "Búsqueda del tesoro" + description: "Encontraste un tesoro" + _client30min: + title: "Un descansito" + description: "30 minutos dedicados a Misskey" + _noteDeletedWithin1min: + title: "Ah... Mejor no..." + description: "Borrar una nota antes que de pase 1 minuto" + _postedAtLateNight: + title: "Nocturno" + description: "Una nota publicada por la noche" + flavor: "¡Ya casi es hora de dormir!" + _postedAt0min0sec: + title: "Reloj parlante" + description: "Publicar una nota a las 00:00 de la madrugada" + flavor: "Tic, tic, tic ¡TUUUUUN!" + _selfQuote: + title: "Autoreferencia" + description: "Citar tu propia nota" + _htl20npm: + title: "Línea de tiempo fluyendo" + description: "La velocidad de tu línea de tiempo excede las 20 npm (notas por minuto)" + _viewInstanceChart: + title: "Analista" + description: "Gráficas de la instancia mostradas" + _outputHelloWorldOnScratchpad: + title: "¡Hola mundo!" + description: "Escribir \"hello world\" en el compositor" + _open3windows: + title: "Multiventana" + description: "Tener más de 3 ventanas al mismo tiempo" + _driveFolderCircularReference: + title: "Referencia circular" + description: "Intento de crear carpetas recursivamente" + _reactWithoutRead: + title: "¡Sí lo leíste bien?" + description: "Reaccionar a los 3 segundos de publicación de una nota con más de 100 caracteres" + _clickedClickHere: + title: "Pícale aquí" + description: "Le picó ahí" + _justPlainLucky: + title: "Pura suerte" + description: "Obtenido con una probabilidad del 0.01% cada 10 segundos" + _setNameToSyuilo: + title: "Complejo de superioridad" + description: "Configurar el nombre como 'Syuilo'" + _passedSinceAccountCreated1: + title: "Primer aniversario" + description: "Pasó un año desde la creación de la cuenta" + _passedSinceAccountCreated2: + title: "Segundo aniversario" + description: "Pasaron dos años desde la creación de la cuenta" + _passedSinceAccountCreated3: + title: "Tercer aniversario" + description: "Pasaron tres años desde la creación de la cuenta" + _loggedInOnBirthday: + title: "¡Feliz cumpleaños!" + description: "En linea el día de tu cumpleaños" + _loggedInOnNewYearsDay: + title: "¡Feliz Año Nuevo!" + description: "En linea en año nuevo" + flavor: "¡Gracias por tu apoyo a la instancia durante todo este año!" + _cookieClicked: + title: "Un juego para picarle a una galleta" + description: "Picaste una galleta" + flavor: "¿Está mal este juego?" + _brainDiver: + title: "Brain Diver" + description: "Publicaste un vínculo a \"Brain Diver\"" + flavor: "Misskey-Misskey La-Tu-Ma" _role: + new: "Crear rol" + edit: "Editar rol" + name: "Nombre del rol" + description: "Descripción del rol" + permission: "Permisos del rol" + descriptionOfPermission: "<b>Moderador</b> Te permite ejecutar acciones básicas de moderación.\n<b>Administradores</b> puede cambiar todas las configuraciones de la instancia." + assignTarget: "Asignar objetivo" + descriptionOfAssignTarget: "<b>Manual</b> Para cambiar manualmente lo que se incluye en este rol.\n<b>Condicional</b> configura una condición, y los usuarios que cumplan la condición serán incluídos automáticamente." + manual: "manual" + conditional: "condicional" + condition: "condición" + isConditionalRole: "Esto es un rol condicional" + isPublic: "Publicar rol" + descriptionOfIsPublic: "Cualquiera puede ver los usuarios asignados a este rol. También, el perfil del usuario mostrará este rol." + options: "Opción" + policies: "Política" + baseRole: "Rol base" + useBaseValue: "Usar los valores del rol base" + chooseRoleToAssign: "Selecciona el rol para asignar" + canEditMembersByModerator: "Permitir a los moderadores editar los miembros" + descriptionOfCanEditMembersByModerator: "Si se activa, los moderadores, al igual que los administradores, serán capaces de asignar/quitar usuarios a éste rol. Si se desactiva, sólo los administradores podrán hacerlo." priority: "Prioridad" _priority: low: "Baja" middle: "Mediano" high: "Alta" + _options: + gtlAvailable: "Explorar la línea de tiempo global" + ltlAvailable: "Explorar la línea de tiempo local" + canPublicNote: "Permitir la publicación" + canInvite: "Puede crear códigos de invitación" + canManageCustomEmojis: "Administrar emojis personalizados" + driveCapacity: "Capacidad de almacenamiento" + pinMax: "Máximo de notas fijadas" + antennaMax: "Máximo de antenas" + wordMuteMax: "Máximo de caracteres en palabras silenciadas" + webhookMax: "Máximo de Webhooks" + clipMax: "Máximo de clips" + noteEachClipsMax: "Máximo de notas con clip" + userListMax: "Máximo de listas de usuarios" + userEachUserListsMax: "Máximo de usuarios en una lista" + rateLimitFactor: "Limitador" + descriptionOfRateLimitFactor: "Límites más bajos son menos restrictivos, más altos menos restrictivos" + canHideAds: "Puede ocultar anuncios" + _condition: + isLocal: "Usuario local" + isRemote: "Usuario remoto" + createdLessThan: "Menos de X han pasado desde la creación de la cuenta" + createdMoreThan: "Más de X han pasado desde la creación de la cuenta" + followersLessThanOrEq: "Tiene X o menos seguidores" + followersMoreThanOrEq: "Tiene X o más seguidores" + followingLessThanOrEq: "Sigue X o menos cuentas" + followingMoreThanOrEq: "Sigue X o más cuentas" + and: "Condicional AND" + or: "Condicional OR" + not: "Condicional NOT" _sensitiveMediaDetection: description: "Reduce el esfuerzo de la moderación el el servidor a través del reconocimiento automático de contenido NSFW usando 'Machine Learning'. Esto puede incrementar ligeramente la carga en el servidor." sensitivity: "Sensibilidad de detección" @@ -1328,10 +1634,12 @@ _widgets: jobQueue: "Cola de trabajos" serverMetric: "Estadísticas del servidor" aiscript: "Consola de AiScript" + aiscriptApp: "Aplicación AiScript" aichan: "indigo" userList: "Lista de usuarios" _userList: chooseList: "Seleccione una lista" + clicker: "Cliqueador" _cw: hide: "Ocultar" show: "Ver más" @@ -1434,7 +1742,16 @@ _timelines: social: "Social" global: "Global" _play: + new: "Crear guión" + edit: "Editar guión" + created: "Guión creado" + updated: "Guión editado" + deleted: "Guión eliminado" + pageSetting: "Configuración de guión" + editThisPage: "Editar este guión" viewSource: "Ver la fuente" + my: "Mis guiones" + liked: "Guiones que te gustaron" featured: "Popular" title: "Título" script: "Script" @@ -1507,6 +1824,7 @@ _notification: pollEnded: "Estan disponibles los resultados de la encuesta" unreadAntennaNote: "Antena {name}" emptyPushNotificationMessage: "Se han actualizado las notificaciones push" + achievementEarned: "Logro desbloqueado" _types: all: "Todo" follow: "Siguiendo" diff --git a/locales/uk-UA.yml b/locales/uk-UA.yml index e660635d93..52f3f41fcb 100644 --- a/locales/uk-UA.yml +++ b/locales/uk-UA.yml @@ -529,7 +529,7 @@ state: "Стан" sort: "Сортування" ascendingOrder: "За зростанням" descendingOrder: "За спаданням" -scratchpad: "Чернетка" +scratchpad: "Scratchpad" scratchpadDescription: "Scratchpad надає середовище для експериментів з AiScript. Ви можете писати, виконувати його і тестувати взаємодію з Misskey." output: "Вихід" script: "Скрипт" @@ -1084,22 +1084,32 @@ _achievements: description: "Перевищити швидкість домашньої стрічки 20npm (нотаток на хвилину)" _viewInstanceChart: title: "Аналітик" + _outputHelloWorldOnScratchpad: + title: "Hello, world!" + description: "Вивести \"hello world\" у Скретчпаді" _clickedClickHere: title: "Натисніть тут" description: "Натиснуто тут" + _justPlainLucky: + title: "Просто вдача" + description: "Можна отримати з ймовірністю 0,01% кожні 10 секунд" _setNameToSyuilo: title: "Комплекс бога" description: "Встановлено ім'я \"syuilo\"" _passedSinceAccountCreated1: title: "Перша річниця" + description: "Минув рік з моменту створення акаунта" _passedSinceAccountCreated2: title: "Друга річниця" + description: "Минуло 2 роки з моменту створення акаунта" _passedSinceAccountCreated3: title: "Третя річниця" description: "Минуло 3 роки з моменту створення акаунта" _loggedInOnBirthday: title: "З Днем народження!" + description: "Увійти у свій день народження" _loggedInOnNewYearsDay: + title: "З Новим роком!" description: "Увійшли в перший день року" _brainDiver: title: "Brain Diver" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 651221fe6c..fba04147d9 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1083,7 +1083,7 @@ _achievements: title: "排列成行" description: "关注者超过300人" _followers500: - title: "风向标" + title: "信号塔" description: "关注者超过500人" _collectAchievements30: title: "成就收藏家" @@ -1104,7 +1104,7 @@ _achievements: title: "无话可说" description: "发帖后一分钟内就将其删除" _postedAtLateNight: - title: "夜行者" + title: "夜猫子" description: "深夜发布帖子" flavor: "差不多该去睡了喔。" _postedAt0min0sec: @@ -1114,6 +1114,12 @@ _achievements: _selfQuote: title: "自我提及" description: "引用了自己的帖子" + _htl20npm: + title: "流动的时间线" + description: "在首页时间线的流速超过20npm" + _viewInstanceChart: + title: "分析师" + description: "查看了实例信息中的图表" _outputHelloWorldOnScratchpad: title: "Hello, world!" _open3windows: @@ -1129,7 +1135,7 @@ _achievements: description: "点了这里" _justPlainLucky: title: "超高校级的幸运" - description: "每10秒有0.01的概率获得" + description: "每10秒有0.01的概率自动获得" _setNameToSyuilo: title: "像神一样呐" description: "将名称设定为syuilo" diff --git a/package.json b/package.json index 2cb239641a..09d34690e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "13.2.6", + "version": "13.3.0", "codename": "nasubi", "repository": { "type": "git", @@ -38,8 +38,8 @@ "cleanall": "pnpm clean-all" }, "resolutions": { - "chokidar": "^3.5.3", - "lodash": "^4.17.21" + "chokidar": "3.5.3", + "lodash": "4.17.21" }, "dependencies": { "execa": "5.1.1", @@ -49,19 +49,19 @@ "gulp-replace": "1.1.4", "gulp-terser": "2.1.0", "js-yaml": "4.1.0", - "typescript": "4.9.4" + "typescript": "4.9.5" }, "devDependencies": { "@types/gulp": "4.0.10", "@types/gulp-rename": "2.0.1", - "@typescript-eslint/eslint-plugin": "5.49.0", - "@typescript-eslint/parser": "5.49.0", + "@typescript-eslint/eslint-plugin": "5.50.0", + "@typescript-eslint/parser": "5.50.0", "cross-env": "7.0.3", - "cypress": "12.4.0", - "eslint": "^8.32.0", + "cypress": "12.5.1", + "eslint": "8.33.0", "start-server-and-test": "1.15.3" }, "optionalDependencies": { - "@tensorflow/tfjs-core": "^4.2.0" + "@tensorflow/tfjs-core": "4.2.0" } } diff --git a/packages/backend/migration/1675404035646-cleanup.js b/packages/backend/migration/1675404035646-cleanup.js new file mode 100644 index 0000000000..09b22ee393 --- /dev/null +++ b/packages/backend/migration/1675404035646-cleanup.js @@ -0,0 +1,29 @@ +export class cleanup1675404035646 { + name = 'cleanup1675404035646' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableTwitterIntegration"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableGithubIntegration"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableDiscordIntegration"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "twitterConsumerKey"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "twitterConsumerSecret"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "githubClientId"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "githubClientSecret"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientId"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientSecret"`); + await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "integrations"`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user_profile" ADD "integrations" jsonb NOT NULL DEFAULT '{}'`); + await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientSecret" character varying(128)`); + await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientId" character varying(128)`); + await queryRunner.query(`ALTER TABLE "meta" ADD "githubClientSecret" character varying(128)`); + await queryRunner.query(`ALTER TABLE "meta" ADD "githubClientId" character varying(128)`); + await queryRunner.query(`ALTER TABLE "meta" ADD "twitterConsumerSecret" character varying(128)`); + await queryRunner.query(`ALTER TABLE "meta" ADD "twitterConsumerKey" character varying(128)`); + await queryRunner.query(`ALTER TABLE "meta" ADD "enableDiscordIntegration" boolean NOT NULL DEFAULT false`); + await queryRunner.query(`ALTER TABLE "meta" ADD "enableGithubIntegration" boolean NOT NULL DEFAULT false`); + await queryRunner.query(`ALTER TABLE "meta" ADD "enableTwitterIntegration" boolean NOT NULL DEFAULT false`); + } +} diff --git a/packages/backend/package.json b/packages/backend/package.json index f68fde8b4c..762cb4b4d5 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -19,27 +19,27 @@ "test-and-coverage": "pnpm jest-and-coverage" }, "optionalDependencies": { - "@tensorflow/tfjs": "^4.2.0", + "@tensorflow/tfjs": "4.2.0", "@tensorflow/tfjs-node": "4.2.0" }, "dependencies": { - "@bull-board/api": "^4.11.0", - "@bull-board/fastify": "^4.11.0", - "@bull-board/ui": "^4.11.0", + "@bull-board/api": "4.11.0", + "@bull-board/fastify": "4.11.0", + "@bull-board/ui": "4.11.0", "@discordapp/twemoji": "14.0.2", "@fastify/accepts": "4.1.0", - "@fastify/cookie": "^8.3.0", + "@fastify/cookie": "8.3.0", "@fastify/cors": "8.2.0", - "@fastify/http-proxy": "^8.4.0", + "@fastify/http-proxy": "8.4.0", "@fastify/multipart": "7.4.0", - "@fastify/static": "6.7.0", + "@fastify/static": "6.8.0", "@fastify/view": "7.4.1", - "@nestjs/common": "9.2.1", - "@nestjs/core": "9.2.1", - "@nestjs/testing": "9.2.1", + "@nestjs/common": "9.3.1", + "@nestjs/core": "9.3.1", + "@nestjs/testing": "9.3.1", "@peertube/http-signature": "1.7.0", "@sinonjs/fake-timers": "10.0.2", - "accepts": "^1.3.8", + "accepts": "1.3.8", "ajv": "8.12.0", "archiver": "5.3.1", "autwh": "0.1.0", @@ -62,11 +62,11 @@ "feed": "4.2.2", "file-type": "18.2.0", "fluent-ffmpeg": "2.1.2", - "form-data": "^4.0.0", - "got": "^12.5.3", + "form-data": "4.0.0", + "got": "12.5.3", "hpagent": "1.2.0", "ioredis": "4.28.5", - "ip-cidr": "3.0.11", + "ip-cidr": "3.1.0", "is-svg": "4.3.2", "js-yaml": "4.1.0", "jsdom": "21.1.0", @@ -75,15 +75,16 @@ "jsrsasign": "10.6.1", "mfm-js": "0.23.3", "mime-types": "2.1.35", - "misskey-js": "0.0.14", + "misskey-js": "0.0.15", "ms": "3.0.0-canary.1", "nested-property": "4.0.0", - "nodemailer": "6.9.0", + "node-fetch": "3.3.0", + "nodemailer": "6.9.1", "nsfwjs": "2.4.2", - "oauth": "^0.10.0", + "oauth": "0.10.0", "os-utils": "0.0.14", "parse5": "7.1.2", - "pg": "8.8.0", + "pg": "8.9.0", "private-ip": "3.0.0", "probe-image-size": "7.2.3", "promise-limit": "2.7.0", @@ -101,23 +102,22 @@ "rss-parser": "3.12.0", "rxjs": "7.8.0", "s-age": "1.1.2", - "sanitize-html": "2.8.1", - "seedrandom": "^3.0.5", + "sanitize-html": "2.9.0", + "seedrandom": "3.0.5", "semver": "7.3.8", "sharp": "0.31.3", "speakeasy": "2.0.0", "strict-event-emitter-types": "2.0.0", "stringz": "2.1.0", "summaly": "2.7.0", - "syslog-pro": "git+https://github.com/misskey-dev/SyslogPro#0.2.9-misskey.2", - "systeminformation": "5.17.4", + "systeminformation": "5.17.8", "tinycolor2": "1.5.2", "tmp": "0.2.1", "tsc-alias": "1.8.2", "tsconfig-paths": "4.1.2", "twemoji-parser": "14.0.0", "typeorm": "0.3.11", - "typescript": "4.9.4", + "typescript": "4.9.5", "ulid": "2.3.0", "unzipper": "0.10.11", "uuid": "9.0.0", @@ -125,21 +125,21 @@ "web-push": "3.5.0", "websocket": "1.0.34", "ws": "8.12.0", - "xev": "3.0.2", - "node-fetch": "3.3.0" + "xev": "3.0.2" }, "devDependencies": { - "@redocly/openapi-core": "1.0.0-beta.120", - "@swc/cli": "^0.1.59", - "@swc/core": "1.3.29", + "@jest/globals": "29.4.1", + "@redocly/openapi-core": "1.0.0-beta.123", + "@swc/cli": "0.1.61", + "@swc/core": "1.3.32", "@swc/jest": "0.2.24", "@types/accepts": "1.3.5", "@types/archiver": "5.3.1", "@types/bcryptjs": "2.4.2", "@types/bull": "4.10.0", "@types/cbor": "6.0.0", - "@types/color-convert": "^2.0.0", - "@types/content-disposition": "^0.5.5", + "@types/color-convert": "2.0.0", + "@types/content-disposition": "0.5.5", "@types/escape-regexp": "0.0.1", "@types/fluent-ffmpeg": "2.1.20", "@types/ioredis": "4.28.10", @@ -166,7 +166,6 @@ "@types/sharp": "0.31.1", "@types/sinonjs__fake-timers": "8.1.2", "@types/speakeasy": "2.0.7", - "@types/syslog-pro": "^1.0.0", "@types/tinycolor2": "1.4.3", "@types/tmp": "0.2.3", "@types/unzipper": "0.10.5", @@ -175,13 +174,13 @@ "@types/web-push": "3.3.2", "@types/websocket": "1.0.5", "@types/ws": "8.5.4", - "@typescript-eslint/eslint-plugin": "5.49.0", - "@typescript-eslint/parser": "5.49.0", + "@typescript-eslint/eslint-plugin": "5.50.0", + "@typescript-eslint/parser": "5.50.0", "cross-env": "7.0.3", - "eslint": "8.32.0", + "eslint": "8.33.0", "eslint-plugin-import": "2.27.5", "execa": "6.1.0", "jest": "29.4.1", - "jest-mock": "^29.4.1" + "jest-mock": "29.4.1" } } diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 025d7acdeb..1d4e700656 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -65,11 +65,6 @@ export type Source = { deliverJobMaxAttempts?: number; inboxJobMaxAttempts?: number; - syslog: { - host: string; - port: number; - }; - mediaProxy?: string; proxyRemoteFiles?: boolean; @@ -113,7 +108,7 @@ const path = process.env.NODE_ENV === 'test' export function loadConfig() { const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8')); - const clientManifestExists = fs.existsSync(_dirname + '/../../../built/_vite_/manifest.json') + const clientManifestExists = fs.existsSync(_dirname + '/../../../built/_vite_/manifest.json'); const clientManifest = clientManifestExists ? JSON.parse(fs.readFileSync(`${_dirname}/../../../built/_vite_/manifest.json`, 'utf-8')) : { 'src/init.ts': { file: 'src/init.ts' } }; diff --git a/packages/backend/src/core/CoreModule.ts b/packages/backend/src/core/CoreModule.ts index eddf407940..6a6d1b864a 100644 --- a/packages/backend/src/core/CoreModule.ts +++ b/packages/backend/src/core/CoreModule.ts @@ -62,7 +62,6 @@ import PerUserNotesChart from './chart/charts/per-user-notes.js'; import PerUserPvChart from './chart/charts/per-user-pv.js'; import DriveChart from './chart/charts/drive.js'; import PerUserReactionsChart from './chart/charts/per-user-reactions.js'; -import HashtagChart from './chart/charts/hashtag.js'; import PerUserFollowingChart from './chart/charts/per-user-following.js'; import PerUserDriveChart from './chart/charts/per-user-drive.js'; import ApRequestChart from './chart/charts/ap-request.js'; @@ -187,7 +186,6 @@ const $PerUserNotesChart: Provider = { provide: 'PerUserNotesChart', useExisting const $PerUserPvChart: Provider = { provide: 'PerUserPvChart', useExisting: PerUserPvChart }; const $DriveChart: Provider = { provide: 'DriveChart', useExisting: DriveChart }; const $PerUserReactionsChart: Provider = { provide: 'PerUserReactionsChart', useExisting: PerUserReactionsChart }; -const $HashtagChart: Provider = { provide: 'HashtagChart', useExisting: HashtagChart }; const $PerUserFollowingChart: Provider = { provide: 'PerUserFollowingChart', useExisting: PerUserFollowingChart }; const $PerUserDriveChart: Provider = { provide: 'PerUserDriveChart', useExisting: PerUserDriveChart }; const $ApRequestChart: Provider = { provide: 'ApRequestChart', useExisting: ApRequestChart }; @@ -315,7 +313,6 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting PerUserPvChart, DriveChart, PerUserReactionsChart, - HashtagChart, PerUserFollowingChart, PerUserDriveChart, ApRequestChart, @@ -437,7 +434,6 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting $PerUserPvChart, $DriveChart, $PerUserReactionsChart, - $HashtagChart, $PerUserFollowingChart, $PerUserDriveChart, $ApRequestChart, @@ -559,7 +555,6 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting PerUserPvChart, DriveChart, PerUserReactionsChart, - HashtagChart, PerUserFollowingChart, PerUserDriveChart, ApRequestChart, @@ -680,7 +675,6 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting $PerUserPvChart, $DriveChart, $PerUserReactionsChart, - $HashtagChart, $PerUserFollowingChart, $PerUserDriveChart, $ApRequestChart, diff --git a/packages/backend/src/core/HashtagService.ts b/packages/backend/src/core/HashtagService.ts index 309cfe8c3f..851e42e7ba 100644 --- a/packages/backend/src/core/HashtagService.ts +++ b/packages/backend/src/core/HashtagService.ts @@ -4,7 +4,6 @@ import type { User } from '@/models/entities/User.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js'; import { IdService } from '@/core/IdService.js'; import type { Hashtag } from '@/models/entities/Hashtag.js'; -import HashtagChart from '@/core/chart/charts/hashtag.js'; import type { HashtagsRepository, UsersRepository } from '@/models/index.js'; import { UserEntityService } from '@/core/entities/UserEntityService.js'; import { bindThis } from '@/decorators.js'; @@ -20,7 +19,6 @@ export class HashtagService { private userEntityService: UserEntityService, private idService: IdService, - private hashtagChart: HashtagChart, ) { } @@ -143,9 +141,5 @@ export class HashtagService { } as Hashtag); } } - - if (!isUserAttached) { - this.hashtagChart.update(tag, user); - } } } diff --git a/packages/backend/src/core/HttpRequestService.ts b/packages/backend/src/core/HttpRequestService.ts index baf74acfa6..e32026b04f 100644 --- a/packages/backend/src/core/HttpRequestService.ts +++ b/packages/backend/src/core/HttpRequestService.ts @@ -95,7 +95,7 @@ export class HttpRequestService { } @bindThis - public async getJson(url: string, accept = 'application/json, */*', headers?: Record<string, string>): Promise<unknown> { + public async getJson<T = unknown>(url: string, accept = 'application/json, */*', headers?: Record<string, string>): Promise<T> { const res = await this.send(url, { method: 'GET', headers: Object.assign({ @@ -106,7 +106,7 @@ export class HttpRequestService { size: 1024 * 256, }); - return await res.json(); + return await res.json() as T; } @bindThis diff --git a/packages/backend/src/core/LoggerService.ts b/packages/backend/src/core/LoggerService.ts index 221631f129..441c254f48 100644 --- a/packages/backend/src/core/LoggerService.ts +++ b/packages/backend/src/core/LoggerService.ts @@ -1,5 +1,4 @@ import { Inject, Injectable } from '@nestjs/common'; -import * as SyslogPro from 'syslog-pro'; import { DI } from '@/di-symbols.js'; import type { Config } from '@/config.js'; import Logger from '@/logger.js'; @@ -8,29 +7,14 @@ import type { KEYWORD } from 'color-convert/conversions'; @Injectable() export class LoggerService { - private syslogClient; - constructor( @Inject(DI.config) private config: Config, ) { - if (this.config.syslog) { - this.syslogClient = new SyslogPro.RFC5424({ - applicationName: 'Misskey', - timestamp: true, - includeStructuredData: true, - color: true, - extendedColor: true, - server: { - target: config.syslog.host, - port: config.syslog.port, - }, - }); - } } @bindThis public getLogger(domain: string, color?: KEYWORD | undefined, store?: boolean) { - return new Logger(domain, color, store, this.syslogClient); + return new Logger(domain, color, store); } } diff --git a/packages/backend/src/core/NoteReadService.ts b/packages/backend/src/core/NoteReadService.ts index 82825b8b15..f4395725d6 100644 --- a/packages/backend/src/core/NoteReadService.ts +++ b/packages/backend/src/core/NoteReadService.ts @@ -9,9 +9,9 @@ import { IdService } from '@/core/IdService.js'; import { GlobalEventService } from '@/core/GlobalEventService.js'; import type { UsersRepository, NoteUnreadsRepository, MutingsRepository, NoteThreadMutingsRepository, FollowingsRepository, ChannelFollowingsRepository, AntennaNotesRepository } from '@/models/index.js'; import { UserEntityService } from '@/core/entities/UserEntityService.js'; +import { bindThis } from '@/decorators.js'; import { NotificationService } from './NotificationService.js'; import { AntennaService } from './AntennaService.js'; -import { bindThis } from '@/decorators.js'; import { PushNotificationService } from './PushNotificationService.js'; @Injectable() @@ -107,12 +107,6 @@ export class NoteReadService { followingChannels: Set<Channel['id']>; }, ): Promise<void> { - const following = info?.following ? info.following : new Set<string>((await this.followingsRepository.find({ - where: { - followerId: userId, - }, - select: ['followeeId'], - })).map(x => x.followeeId)); const followingChannels = info?.followingChannels ? info.followingChannels : new Set<string>((await this.channelFollowingsRepository.find({ where: { followerId: userId, @@ -139,7 +133,7 @@ export class NoteReadService { if (note.user != null) { // たぶんnullになることは無いはずだけど一応 for (const antenna of myAntennas) { - if (await this.antennaService.checkHitAntenna(antenna, note, note.user, undefined, Array.from(following))) { + if (await this.antennaService.checkHitAntenna(antenna, note, note.user)) { readAntennaNotes.push(note); } } diff --git a/packages/backend/src/core/WebhookService.ts b/packages/backend/src/core/WebhookService.ts index 36110490a0..30caa9682c 100644 --- a/packages/backend/src/core/WebhookService.ts +++ b/packages/backend/src/core/WebhookService.ts @@ -44,16 +44,25 @@ export class WebhookService implements OnApplicationShutdown { switch (type) { case 'webhookCreated': if (body.active) { - this.webhooks.push(body); + this.webhooks.push({ + ...body, + createdAt: new Date(body.createdAt), + }); } break; case 'webhookUpdated': if (body.active) { const i = this.webhooks.findIndex(a => a.id === body.id); if (i > -1) { - this.webhooks[i] = body; + this.webhooks[i] = { + ...body, + createdAt: new Date(body.createdAt), + }; } else { - this.webhooks.push(body); + this.webhooks.push({ + ...body, + createdAt: new Date(body.createdAt), + }); } } else { this.webhooks = this.webhooks.filter(a => a.id !== body.id); diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index 91a2767e69..648f30229a 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -274,7 +274,7 @@ export class ApRendererService { } as any; if (reaction.startsWith(':')) { - const name = reaction.replace(/:/g, ''); + const name = reaction.replaceAll(':', ''); const emoji = await this.emojisRepository.findOneBy({ name, host: IsNull(), diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index f86b5e6f96..2325bbe093 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -29,6 +29,7 @@ import { UserNotePining } from '@/models/entities/UserNotePining.js'; import { StatusError } from '@/misc/status-error.js'; import type { UtilityService } from '@/core/UtilityService.js'; import type { UserEntityService } from '@/core/entities/UserEntityService.js'; +import { bindThis } from '@/decorators.js'; import { getApId, getApType, getOneApHrefNullable, isActor, isCollection, isCollectionOrOrderedCollection, isPropertyValue } from '../type.js'; import { extractApHashtags } from './tag.js'; import type { OnModuleInit } from '@nestjs/common'; @@ -43,37 +44,6 @@ import type { IActor, IObject, IApPropertyValue } from '../type.js'; const nameLength = 128; const summaryLength = 2048; -const services: { - [x: string]: (id: string, username: string) => any -} = { - 'misskey:authentication:twitter': (userId, screenName) => ({ userId, screenName }), - 'misskey:authentication:github': (id, login) => ({ id, login }), - 'misskey:authentication:discord': (id, name) => $discord(id, name), -}; - -const $discord = (id: string, name: string) => { - if (typeof name !== 'string') { - name = 'unknown#0000'; - } - const [username, discriminator] = name.split('#'); - return { id, username, discriminator }; -}; - -function addService(target: { [x: string]: any }, source: IApPropertyValue) { - const service = services[source.name]; - - if (typeof source.value !== 'string') { - source.value = 'unknown'; - } - - const [id, username] = source.value.split('@'); - - if (service) { - target[source.name.split(':')[2]] = service(id, username); - } -} -import { bindThis } from '@/decorators.js'; - @Injectable() export class ApPersonService implements OnModuleInit { private utilityService: UtilityService; @@ -540,22 +510,16 @@ export class ApPersonService implements OnModuleInit { name: string, value: string }[] = []; - const services: { [x: string]: any } = {}; - if (Array.isArray(attachments)) { for (const attachment of attachments.filter(isPropertyValue)) { - if (isPropertyValue(attachment.identifier)) { - addService(services, attachment.identifier); - } else { - fields.push({ - name: attachment.name, - value: this.mfmService.fromHtml(attachment.value), - }); - } + fields.push({ + name: attachment.name, + value: this.mfmService.fromHtml(attachment.value), + }); } } - return { fields, services }; + return { fields }; } @bindThis diff --git a/packages/backend/src/core/chart/ChartManagementService.ts b/packages/backend/src/core/chart/ChartManagementService.ts index 4fba1b57d0..779a32ac5e 100644 --- a/packages/backend/src/core/chart/ChartManagementService.ts +++ b/packages/backend/src/core/chart/ChartManagementService.ts @@ -10,7 +10,6 @@ import PerUserNotesChart from './charts/per-user-notes.js'; import PerUserPvChart from './charts/per-user-pv.js'; import DriveChart from './charts/drive.js'; import PerUserReactionsChart from './charts/per-user-reactions.js'; -import HashtagChart from './charts/hashtag.js'; import PerUserFollowingChart from './charts/per-user-following.js'; import PerUserDriveChart from './charts/per-user-drive.js'; import ApRequestChart from './charts/ap-request.js'; @@ -31,7 +30,6 @@ export class ChartManagementService implements OnApplicationShutdown { private perUserPvChart: PerUserPvChart, private driveChart: DriveChart, private perUserReactionsChart: PerUserReactionsChart, - private hashtagChart: HashtagChart, private perUserFollowingChart: PerUserFollowingChart, private perUserDriveChart: PerUserDriveChart, private apRequestChart: ApRequestChart, @@ -46,7 +44,6 @@ export class ChartManagementService implements OnApplicationShutdown { this.perUserPvChart, this.driveChart, this.perUserReactionsChart, - this.hashtagChart, this.perUserFollowingChart, this.perUserDriveChart, this.apRequestChart, diff --git a/packages/backend/src/core/chart/charts/entities/hashtag.ts b/packages/backend/src/core/chart/charts/entities/hashtag.ts deleted file mode 100644 index 4d04039047..0000000000 --- a/packages/backend/src/core/chart/charts/entities/hashtag.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Chart from '../../core.js'; - -export const name = 'hashtag'; - -export const schema = { - 'local.users': { uniqueIncrement: true }, - 'remote.users': { uniqueIncrement: true }, -} as const; - -export const entity = Chart.schemaToEntity(name, schema, true); diff --git a/packages/backend/src/core/chart/charts/hashtag.ts b/packages/backend/src/core/chart/charts/hashtag.ts deleted file mode 100644 index 3899b41363..0000000000 --- a/packages/backend/src/core/chart/charts/hashtag.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; -import { DataSource } from 'typeorm'; -import type { User } from '@/models/entities/User.js'; -import { AppLockService } from '@/core/AppLockService.js'; -import { DI } from '@/di-symbols.js'; -import { UserEntityService } from '@/core/entities/UserEntityService.js'; -import { bindThis } from '@/decorators.js'; -import Chart from '../core.js'; -import { ChartLoggerService } from '../ChartLoggerService.js'; -import { name, schema } from './entities/hashtag.js'; -import type { KVs } from '../core.js'; - -/** - * ハッシュタグに関するチャート - */ -// eslint-disable-next-line import/no-default-export -@Injectable() -export default class HashtagChart extends Chart<typeof schema> { - constructor( - @Inject(DI.db) - private db: DataSource, - - private appLockService: AppLockService, - private userEntityService: UserEntityService, - private chartLoggerService: ChartLoggerService, - ) { - super(db, (k) => appLockService.getChartInsertLock(k), chartLoggerService.logger, name, schema, true); - } - - protected async tickMajor(): Promise<Partial<KVs<typeof schema>>> { - return {}; - } - - protected async tickMinor(): Promise<Partial<KVs<typeof schema>>> { - return {}; - } - - @bindThis - public async update(hashtag: string, user: { id: User['id'], host: User['host'] }): Promise<void> { - await this.commit({ - 'local.users': this.userEntityService.isLocalUser(user) ? [user.id] : [], - 'remote.users': this.userEntityService.isLocalUser(user) ? [] : [user.id], - }, hashtag); - } -} diff --git a/packages/backend/src/core/chart/core.ts b/packages/backend/src/core/chart/core.ts index 2092b13b7e..d352adcc1f 100644 --- a/packages/backend/src/core/chart/core.ts +++ b/packages/backend/src/core/chart/core.ts @@ -11,9 +11,9 @@ import type Logger from '@/logger.js'; import { bindThis } from '@/decorators.js'; import type { Repository, DataSource } from 'typeorm'; -const columnPrefix = '___' as const; -const uniqueTempColumnPrefix = 'unique_temp___' as const; -const columnDot = '_' as const; +const COLUMN_PREFIX = '___' as const; +const UNIQUE_TEMP_COLUMN_PREFIX = 'unique_temp___' as const; +const COLUMN_DELIMITER = '_' as const; type Schema = Record<string, { uniqueIncrement?: boolean; @@ -26,14 +26,14 @@ type Schema = Record<string, { accumulate?: boolean; }>; -type KeyToColumnName<T extends string> = T extends `${infer R1}.${infer R2}` ? `${R1}${typeof columnDot}${KeyToColumnName<R2>}` : T; +type KeyToColumnName<T extends string> = T extends `${infer R1}.${infer R2}` ? `${R1}${typeof COLUMN_DELIMITER}${KeyToColumnName<R2>}` : T; type Columns<S extends Schema> = { - [K in keyof S as `${typeof columnPrefix}${KeyToColumnName<string & K>}`]: number; + [K in keyof S as `${typeof COLUMN_PREFIX}${KeyToColumnName<string & K>}`]: number; }; type TempColumnsForUnique<S extends Schema> = { - [K in keyof S as `${typeof uniqueTempColumnPrefix}${KeyToColumnName<string & K>}`]: S[K]['uniqueIncrement'] extends true ? string[] : never; + [K in keyof S as `${typeof UNIQUE_TEMP_COLUMN_PREFIX}${KeyToColumnName<string & K>}`]: S[K]['uniqueIncrement'] extends true ? string[] : never; }; type RawRecord<S extends Schema> = { @@ -138,20 +138,20 @@ export default abstract class Chart<T extends Schema> { private static convertSchemaToColumnDefinitions(schema: Schema): Record<string, { type: string; array?: boolean; default?: any; }> { const columns = {} as Record<string, { type: string; array?: boolean; default?: any; }>; for (const [k, v] of Object.entries(schema)) { - const name = k.replaceAll('.', columnDot); + const name = k.replaceAll('.', COLUMN_DELIMITER); const type = v.range === 'big' ? 'bigint' : v.range === 'small' ? 'smallint' : 'integer'; if (v.uniqueIncrement) { - columns[uniqueTempColumnPrefix + name] = { + columns[UNIQUE_TEMP_COLUMN_PREFIX + name] = { type: 'varchar', array: true, default: '{}', }; - columns[columnPrefix + name] = { + columns[COLUMN_PREFIX + name] = { type, default: 0, }; } else { - columns[columnPrefix + name] = { + columns[COLUMN_PREFIX + name] = { type, default: 0, }; @@ -253,8 +253,8 @@ export default abstract class Chart<T extends Schema> { @bindThis private convertRawRecord(x: RawRecord<T>): KVs<T> { const kvs = {} as Record<string, number>; - for (const k of Object.keys(x).filter((k) => k.startsWith(columnPrefix)) as (keyof Columns<T>)[]) { - kvs[(k as string).substr(columnPrefix.length).split(columnDot).join('.')] = x[k] as unknown as number; + for (const k of Object.keys(x).filter((k) => k.startsWith(COLUMN_PREFIX)) as (keyof Columns<T>)[]) { + kvs[(k as string).substr(COLUMN_PREFIX.length).split(COLUMN_DELIMITER).join('.')] = x[k] as unknown as number; } return kvs as KVs<T>; } @@ -357,8 +357,8 @@ export default abstract class Chart<T extends Schema> { const columns = {} as Record<string, number | unknown[]>; for (const [k, v] of Object.entries(data)) { - const name = k.replaceAll('.', columnDot); - columns[columnPrefix + name] = v; + const name = k.replaceAll('.', COLUMN_DELIMITER); + columns[COLUMN_PREFIX + name] = v; } // 新規ログ挿入 @@ -419,13 +419,13 @@ export default abstract class Chart<T extends Schema> { const queryForDay: Record<keyof RawRecord<T>, number | (() => string)> = {} as any; for (const [k, v] of Object.entries(finalDiffs)) { if (typeof v === 'number') { - const name = columnPrefix + k.replaceAll('.', columnDot) as string & keyof Columns<T>; + const name = COLUMN_PREFIX + k.replaceAll('.', COLUMN_DELIMITER) as string & keyof Columns<T>; if (v > 0) queryForHour[name] = () => `"${name}" + ${v}`; if (v < 0) queryForHour[name] = () => `"${name}" - ${Math.abs(v)}`; if (v > 0) queryForDay[name] = () => `"${name}" + ${v}`; if (v < 0) queryForDay[name] = () => `"${name}" - ${Math.abs(v)}`; } else if (Array.isArray(v) && v.length > 0) { // ユニークインクリメント - const tempColumnName = uniqueTempColumnPrefix + k.replaceAll('.', columnDot) as string & keyof TempColumnsForUnique<T>; + const tempColumnName = UNIQUE_TEMP_COLUMN_PREFIX + k.replaceAll('.', COLUMN_DELIMITER) as string & keyof TempColumnsForUnique<T>; // TODO: item をSQLエスケープ const itemsForHour = v.filter(item => !(logHour[tempColumnName] as unknown as string[]).includes(item)).map(item => `"${item}"`); const itemsForDay = v.filter(item => !(logDay[tempColumnName] as unknown as string[]).includes(item)).map(item => `"${item}"`); @@ -437,8 +437,8 @@ export default abstract class Chart<T extends Schema> { // bake unique count for (const [k, v] of Object.entries(finalDiffs)) { if (this.schema[k].uniqueIncrement) { - const name = columnPrefix + k.replaceAll('.', columnDot) as keyof Columns<T>; - const tempColumnName = uniqueTempColumnPrefix + k.replaceAll('.', columnDot) as keyof TempColumnsForUnique<T>; + const name = COLUMN_PREFIX + k.replaceAll('.', COLUMN_DELIMITER) as keyof Columns<T>; + const tempColumnName = UNIQUE_TEMP_COLUMN_PREFIX + k.replaceAll('.', COLUMN_DELIMITER) as keyof TempColumnsForUnique<T>; queryForHour[name] = new Set([...(v as string[]), ...(logHour[tempColumnName] as unknown as string[])]).size; queryForDay[name] = new Set([...(v as string[]), ...(logDay[tempColumnName] as unknown as string[])]).size; } @@ -449,15 +449,15 @@ export default abstract class Chart<T extends Schema> { for (const [k, v] of Object.entries(this.schema)) { const intersection = v.intersection; if (intersection) { - const name = columnPrefix + k.replaceAll('.', columnDot) as keyof Columns<T>; + const name = COLUMN_PREFIX + k.replaceAll('.', COLUMN_DELIMITER) as keyof Columns<T>; const firstKey = intersection[0]; - const firstTempColumnName = uniqueTempColumnPrefix + firstKey.replaceAll('.', columnDot) as keyof TempColumnsForUnique<T>; + const firstTempColumnName = UNIQUE_TEMP_COLUMN_PREFIX + firstKey.replaceAll('.', COLUMN_DELIMITER) as keyof TempColumnsForUnique<T>; const firstValues = finalDiffs[firstKey] as string[] | undefined; const currentValuesForHour = new Set([...(firstValues ?? []), ...(logHour[firstTempColumnName] as unknown as string[])]); const currentValuesForDay = new Set([...(firstValues ?? []), ...(logDay[firstTempColumnName] as unknown as string[])]); for (let i = 1; i < intersection.length; i++) { const targetKey = intersection[i]; - const targetTempColumnName = uniqueTempColumnPrefix + targetKey.replaceAll('.', columnDot) as keyof TempColumnsForUnique<T>; + const targetTempColumnName = UNIQUE_TEMP_COLUMN_PREFIX + targetKey.replaceAll('.', COLUMN_DELIMITER) as keyof TempColumnsForUnique<T>; const targetValues = finalDiffs[targetKey] as string[] | undefined; const targetValuesForHour = new Set([...(targetValues ?? []), ...(logHour[targetTempColumnName] as unknown as string[])]); const targetValuesForDay = new Set([...(targetValues ?? []), ...(logDay[targetTempColumnName] as unknown as string[])]); @@ -510,7 +510,7 @@ export default abstract class Chart<T extends Schema> { const columns = {} as Record<keyof Columns<T>, number>; for (const [k, v] of Object.entries(data) as ([keyof typeof data, number])[]) { - const name = columnPrefix + (k as string).replaceAll('.', columnDot) as keyof Columns<T>; + const name = COLUMN_PREFIX + (k as string).replaceAll('.', COLUMN_DELIMITER) as keyof Columns<T>; columns[name] = v; } @@ -556,7 +556,7 @@ export default abstract class Chart<T extends Schema> { const columns = {} as Record<keyof TempColumnsForUnique<T>, []>; for (const [k, v] of Object.entries(this.schema)) { if (v.uniqueIncrement) { - const name = uniqueTempColumnPrefix + k.replaceAll('.', columnDot) as keyof TempColumnsForUnique<T>; + const name = UNIQUE_TEMP_COLUMN_PREFIX + k.replaceAll('.', COLUMN_DELIMITER) as keyof TempColumnsForUnique<T>; columns[name] = []; } } diff --git a/packages/backend/src/core/chart/entities.ts b/packages/backend/src/core/chart/entities.ts index c2759e8b3c..b44e2e38b7 100644 --- a/packages/backend/src/core/chart/entities.ts +++ b/packages/backend/src/core/chart/entities.ts @@ -7,7 +7,6 @@ import { entity as PerUserNotesChart } from './charts/entities/per-user-notes.js import { entity as PerUserPvChart } from './charts/entities/per-user-pv.js'; import { entity as DriveChart } from './charts/entities/drive.js'; import { entity as PerUserReactionsChart } from './charts/entities/per-user-reactions.js'; -import { entity as HashtagChart } from './charts/entities/hashtag.js'; import { entity as PerUserFollowingChart } from './charts/entities/per-user-following.js'; import { entity as PerUserDriveChart } from './charts/entities/per-user-drive.js'; import { entity as ApRequestChart } from './charts/entities/ap-request.js'; @@ -27,7 +26,6 @@ export const entities = [ PerUserPvChart.hour, PerUserPvChart.day, DriveChart.hour, DriveChart.day, PerUserReactionsChart.hour, PerUserReactionsChart.day, - HashtagChart.hour, HashtagChart.day, PerUserFollowingChart.hour, PerUserFollowingChart.day, PerUserDriveChart.hour, PerUserDriveChart.day, ApRequestChart.hour, ApRequestChart.day, diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts index ded1b512a1..4140b3f35e 100644 --- a/packages/backend/src/core/entities/NotificationEntityService.ts +++ b/packages/backend/src/core/entities/NotificationEntityService.ts @@ -2,7 +2,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { In } from 'typeorm'; import { ModuleRef } from '@nestjs/core'; import { DI } from '@/di-symbols.js'; -import type { AccessTokensRepository, NoteReactionsRepository, NotificationsRepository } from '@/models/index.js'; +import type { AccessTokensRepository, NoteReactionsRepository, NotificationsRepository, User } from '@/models/index.js'; import { awaitAll } from '@/misc/prelude/await-all.js'; import type { Notification } from '@/models/entities/Notification.js'; import type { NoteReaction } from '@/models/entities/NoteReaction.js'; diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 546e61a26e..aaa80033b3 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -489,7 +489,6 @@ export class UserEntityService implements OnModuleInit { hasUnreadMessagingMessage: this.getHasUnreadMessagingMessage(user.id), hasUnreadNotification: this.getHasUnreadNotification(user.id), hasPendingReceivedFollowRequest: this.getHasPendingReceivedFollowRequest(user.id), - integrations: profile!.integrations, mutedWords: profile!.mutedWords, mutedInstances: profile!.mutedInstances, mutingNotificationTypes: profile!.mutingNotificationTypes, diff --git a/packages/backend/src/logger.ts b/packages/backend/src/logger.ts index 5d275bc7b2..87f9b12313 100644 --- a/packages/backend/src/logger.ts +++ b/packages/backend/src/logger.ts @@ -17,15 +17,13 @@ export default class Logger { private context: Context; private parentLogger: Logger | null = null; private store: boolean; - private syslogClient: any | null = null; - constructor(context: string, color?: KEYWORD, store = true, syslogClient = null) { + constructor(context: string, color?: KEYWORD, store = true) { this.context = { name: context, color: color, }; this.store = store; - this.syslogClient = syslogClient; } @bindThis @@ -69,20 +67,6 @@ export default class Logger { console.log(important ? chalk.bold(log) : log); if (level === 'error' && data) console.log(data); - - if (store) { - if (this.syslogClient) { - const send = - level === 'error' ? this.syslogClient.error : - level === 'warning' ? this.syslogClient.warning : - level === 'success' ? this.syslogClient.info : - level === 'debug' ? this.syslogClient.info : - level === 'info' ? this.syslogClient.info : - null as never; - - send.bind(this.syslogClient)(message).catch(() => {}); - } - } } @bindThis diff --git a/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts b/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts index 8fb3f4b19e..14c25922ad 100644 --- a/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts +++ b/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts @@ -4,7 +4,7 @@ import { unique } from '@/misc/prelude/array.js'; export function extractCustomEmojisFromMfm(nodes: mfm.MfmNode[]): string[] { const emojiNodes = mfm.extract(nodes, (node) => { return (node.type === 'emojiCode' && node.props.name.length <= 100); - }); + }) as mfm.MfmEmojiCode[]; return unique(emojiNodes.map(x => x.props.name)); } diff --git a/packages/backend/src/misc/extract-hashtags.ts b/packages/backend/src/misc/extract-hashtags.ts index f8cabda3d6..d293fd7f52 100644 --- a/packages/backend/src/misc/extract-hashtags.ts +++ b/packages/backend/src/misc/extract-hashtags.ts @@ -2,7 +2,7 @@ import * as mfm from 'mfm-js'; import { unique } from '@/misc/prelude/array.js'; export function extractHashtags(nodes: mfm.MfmNode[]): string[] { - const hashtagNodes = mfm.extract(nodes, (node) => node.type === 'hashtag'); + const hashtagNodes = mfm.extract(nodes, (node) => node.type === 'hashtag') as mfm.MfmHashtag[]; const hashtags = unique(hashtagNodes.map(x => x.props.hashtag)); return hashtags; diff --git a/packages/backend/src/misc/nyaize.ts b/packages/backend/src/misc/nyaize.ts index 500d1db2cb..350f8d2172 100644 --- a/packages/backend/src/misc/nyaize.ts +++ b/packages/backend/src/misc/nyaize.ts @@ -1,14 +1,14 @@ export function nyaize(text: string): string { return text // ja-JP - .replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ') + .replaceAll('な', 'にゃ').replaceAll('ナ', 'ニャ').replaceAll('ナ', 'ニャ') // en-US .replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya') .replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan') .replace(/(?<=every)one/gi, x => x === 'ONE' ? 'NYAN' : 'nyan') // ko-KR .replace(/[나-낳]/g, match => String.fromCharCode( - match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0) + match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0), )) .replace(/(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm, '다냥') .replace(/(야(?=\?))|(야$)|(야(?= ))/gm, '냥'); diff --git a/packages/backend/src/misc/schema.ts b/packages/backend/src/misc/schema.ts index fdecc278d4..7aeb65f296 100644 --- a/packages/backend/src/misc/schema.ts +++ b/packages/backend/src/misc/schema.ts @@ -132,11 +132,27 @@ type NullOrUndefined<p extends Schema, T> = // https://stackoverflow.com/questions/54938141/typescript-convert-union-to-intersection // Get intersection from union type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; +type PartialIntersection<T> = Partial<UnionToIntersection<T>>; // https://github.com/misskey-dev/misskey/pull/8144#discussion_r785287552 // To get union, we use `Foo extends any ? Hoge<Foo> : never` type UnionSchemaType<a extends readonly any[], X extends Schema = a[number]> = X extends any ? SchemaType<X> : never; -type ArrayUnion<T> = T extends any ? Array<T> : never; +type UnionObjectSchemaType<a extends readonly any[], X extends Schema = a[number]> = X extends any ? ObjectSchemaType<X> : never; +type ArrayUnion<T> = T extends any ? Array<T> : never; + +type ObjectSchemaTypeDef<p extends Schema> = + p['ref'] extends keyof typeof refs ? Packed<p['ref']> : + p['properties'] extends NonNullable<Obj> ? + p['anyOf'] extends ReadonlyArray<Schema> ? + ObjType<p['properties'], NonNullable<p['required']>[number]> & UnionObjectSchemaType<p['anyOf']> & PartialIntersection<UnionObjectSchemaType<p['anyOf']>> + : + ObjType<p['properties'], NonNullable<p['required']>[number]> + : + p['anyOf'] extends ReadonlyArray<Schema> ? UnionObjectSchemaType<p['anyOf']> & PartialIntersection<UnionObjectSchemaType<p['anyOf']>> : + p['allOf'] extends ReadonlyArray<Schema> ? UnionToIntersection<UnionSchemaType<p['allOf']>> : + any + +type ObjectSchemaType<p extends Schema> = NullOrUndefined<p, ObjectSchemaTypeDef<p>>; export type SchemaTypeDef<p extends Schema> = p['type'] extends 'null' ? null : @@ -149,13 +165,7 @@ export type SchemaTypeDef<p extends Schema> = string ) : p['type'] extends 'boolean' ? boolean : - p['type'] extends 'object' ? ( - p['ref'] extends keyof typeof refs ? Packed<p['ref']> : - p['properties'] extends NonNullable<Obj> ? ObjType<p['properties'], NonNullable<p['required']>[number]> : - p['anyOf'] extends ReadonlyArray<Schema> ? UnionSchemaType<p['anyOf']> & Partial<UnionToIntersection<UnionSchemaType<p['anyOf']>>> : - p['allOf'] extends ReadonlyArray<Schema> ? UnionToIntersection<UnionSchemaType<p['allOf']>> : - any - ) : + p['type'] extends 'object' ? ObjectSchemaTypeDef<p> : p['type'] extends 'array' ? ( p['items'] extends OfSchema ? ( p['items']['anyOf'] extends ReadonlyArray<Schema> ? UnionSchemaType<NonNullable<p['items']['anyOf']>>[] : @@ -166,6 +176,7 @@ export type SchemaTypeDef<p extends Schema> = p['items'] extends NonNullable<Schema> ? SchemaTypeDef<p['items']>[] : any[] ) : + p['anyOf'] extends ReadonlyArray<Schema> ? UnionSchemaType<p['anyOf']> & PartialIntersection<UnionSchemaType<p['anyOf']>> : p['oneOf'] extends ReadonlyArray<Schema> ? UnionSchemaType<p['oneOf']> : any; diff --git a/packages/backend/src/models/entities/Meta.ts b/packages/backend/src/models/entities/Meta.ts index 5d222a6da1..9d777c6236 100644 --- a/packages/backend/src/models/entities/Meta.ts +++ b/packages/backend/src/models/entities/Meta.ts @@ -279,57 +279,6 @@ export class Meta { }) public swPrivateKey: string | null; - @Column('boolean', { - default: false, - }) - public enableTwitterIntegration: boolean; - - @Column('varchar', { - length: 128, - nullable: true, - }) - public twitterConsumerKey: string | null; - - @Column('varchar', { - length: 128, - nullable: true, - }) - public twitterConsumerSecret: string | null; - - @Column('boolean', { - default: false, - }) - public enableGithubIntegration: boolean; - - @Column('varchar', { - length: 128, - nullable: true, - }) - public githubClientId: string | null; - - @Column('varchar', { - length: 128, - nullable: true, - }) - public githubClientSecret: string | null; - - @Column('boolean', { - default: false, - }) - public enableDiscordIntegration: boolean; - - @Column('varchar', { - length: 128, - nullable: true, - }) - public discordClientId: string | null; - - @Column('varchar', { - length: 128, - nullable: true, - }) - public discordClientSecret: string | null; - @Column('varchar', { length: 128, nullable: true, diff --git a/packages/backend/src/models/entities/UserProfile.ts b/packages/backend/src/models/entities/UserProfile.ts index 86df8d5d98..1ff261cda3 100644 --- a/packages/backend/src/models/entities/UserProfile.ts +++ b/packages/backend/src/models/entities/UserProfile.ts @@ -184,11 +184,6 @@ export class UserProfile { @JoinColumn() public pinnedPage: Page | null; - @Column('jsonb', { - default: {}, - }) - public integrations: Record<string, any>; - @Index() @Column('boolean', { default: false, select: false, diff --git a/packages/backend/src/models/schema/user.ts b/packages/backend/src/models/schema/user.ts index aac5e9332c..1fc9352539 100644 --- a/packages/backend/src/models/schema/user.ts +++ b/packages/backend/src/models/schema/user.ts @@ -323,10 +323,6 @@ export const packedMeDetailedOnlySchema = { type: 'boolean', nullable: false, optional: false, }, - integrations: { - type: 'object', - nullable: true, optional: false, - }, mutedWords: { type: 'array', nullable: false, optional: false, diff --git a/packages/backend/src/queue/processors/CleanChartsProcessorService.ts b/packages/backend/src/queue/processors/CleanChartsProcessorService.ts index 2adf7cbe6d..5254d3c7d8 100644 --- a/packages/backend/src/queue/processors/CleanChartsProcessorService.ts +++ b/packages/backend/src/queue/processors/CleanChartsProcessorService.ts @@ -12,7 +12,6 @@ import PerUserNotesChart from '@/core/chart/charts/per-user-notes.js'; import PerUserPvChart from '@/core/chart/charts/per-user-pv.js'; import DriveChart from '@/core/chart/charts/drive.js'; import PerUserReactionsChart from '@/core/chart/charts/per-user-reactions.js'; -import HashtagChart from '@/core/chart/charts/hashtag.js'; import PerUserFollowingChart from '@/core/chart/charts/per-user-following.js'; import PerUserDriveChart from '@/core/chart/charts/per-user-drive.js'; import ApRequestChart from '@/core/chart/charts/ap-request.js'; @@ -37,7 +36,6 @@ export class CleanChartsProcessorService { private perUserPvChart: PerUserPvChart, private driveChart: DriveChart, private perUserReactionsChart: PerUserReactionsChart, - private hashtagChart: HashtagChart, private perUserFollowingChart: PerUserFollowingChart, private perUserDriveChart: PerUserDriveChart, private apRequestChart: ApRequestChart, @@ -61,7 +59,6 @@ export class CleanChartsProcessorService { this.perUserPvChart.clean(), this.driveChart.clean(), this.perUserReactionsChart.clean(), - this.hashtagChart.clean(), this.perUserFollowingChart.clean(), this.perUserDriveChart.clean(), this.apRequestChart.clean(), diff --git a/packages/backend/src/queue/processors/ResyncChartsProcessorService.ts b/packages/backend/src/queue/processors/ResyncChartsProcessorService.ts index 1a8fe65a4f..74e7c632d5 100644 --- a/packages/backend/src/queue/processors/ResyncChartsProcessorService.ts +++ b/packages/backend/src/queue/processors/ResyncChartsProcessorService.ts @@ -11,13 +11,12 @@ import InstanceChart from '@/core/chart/charts/instance.js'; import PerUserNotesChart from '@/core/chart/charts/per-user-notes.js'; import DriveChart from '@/core/chart/charts/drive.js'; import PerUserReactionsChart from '@/core/chart/charts/per-user-reactions.js'; -import HashtagChart from '@/core/chart/charts/hashtag.js'; import PerUserFollowingChart from '@/core/chart/charts/per-user-following.js'; import PerUserDriveChart from '@/core/chart/charts/per-user-drive.js'; import ApRequestChart from '@/core/chart/charts/ap-request.js'; +import { bindThis } from '@/decorators.js'; import { QueueLoggerService } from '../QueueLoggerService.js'; import type Bull from 'bull'; -import { bindThis } from '@/decorators.js'; @Injectable() export class ResyncChartsProcessorService { @@ -35,7 +34,6 @@ export class ResyncChartsProcessorService { private perUserNotesChart: PerUserNotesChart, private driveChart: DriveChart, private perUserReactionsChart: PerUserReactionsChart, - private hashtagChart: HashtagChart, private perUserFollowingChart: PerUserFollowingChart, private perUserDriveChart: PerUserDriveChart, private apRequestChart: ApRequestChart, diff --git a/packages/backend/src/queue/processors/TickChartsProcessorService.ts b/packages/backend/src/queue/processors/TickChartsProcessorService.ts index 51eff2a155..751e02dc20 100644 --- a/packages/backend/src/queue/processors/TickChartsProcessorService.ts +++ b/packages/backend/src/queue/processors/TickChartsProcessorService.ts @@ -12,7 +12,6 @@ import PerUserNotesChart from '@/core/chart/charts/per-user-notes.js'; import PerUserPvChart from '@/core/chart/charts/per-user-pv.js'; import DriveChart from '@/core/chart/charts/drive.js'; import PerUserReactionsChart from '@/core/chart/charts/per-user-reactions.js'; -import HashtagChart from '@/core/chart/charts/hashtag.js'; import PerUserFollowingChart from '@/core/chart/charts/per-user-following.js'; import PerUserDriveChart from '@/core/chart/charts/per-user-drive.js'; import ApRequestChart from '@/core/chart/charts/ap-request.js'; @@ -37,7 +36,6 @@ export class TickChartsProcessorService { private perUserPvChart: PerUserPvChart, private driveChart: DriveChart, private perUserReactionsChart: PerUserReactionsChart, - private hashtagChart: HashtagChart, private perUserFollowingChart: PerUserFollowingChart, private perUserDriveChart: PerUserDriveChart, private apRequestChart: ApRequestChart, @@ -61,7 +59,6 @@ export class TickChartsProcessorService { this.perUserPvChart.tick(false), this.driveChart.tick(false), this.perUserReactionsChart.tick(false), - this.hashtagChart.tick(false), this.perUserFollowingChart.tick(false), this.perUserDriveChart.tick(false), this.apRequestChart.tick(false), diff --git a/packages/backend/src/server/NodeinfoServerService.ts b/packages/backend/src/server/NodeinfoServerService.ts index 024ddfe632..a43630c041 100644 --- a/packages/backend/src/server/NodeinfoServerService.ts +++ b/packages/backend/src/server/NodeinfoServerService.ts @@ -111,9 +111,6 @@ export class NodeinfoServerService { enableHcaptcha: meta.enableHcaptcha, enableRecaptcha: meta.enableRecaptcha, maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, - enableTwitterIntegration: meta.enableTwitterIntegration, - enableGithubIntegration: meta.enableGithubIntegration, - enableDiscordIntegration: meta.enableDiscordIntegration, enableEmail: meta.enableEmail, enableServiceWorker: meta.enableServiceWorker, proxyAccountName: proxyAccount ? proxyAccount.username : null, diff --git a/packages/backend/src/server/ServerModule.ts b/packages/backend/src/server/ServerModule.ts index 9dc1527698..b605f3c8ab 100644 --- a/packages/backend/src/server/ServerModule.ts +++ b/packages/backend/src/server/ServerModule.ts @@ -7,9 +7,6 @@ import { NodeinfoServerService } from './NodeinfoServerService.js'; import { ServerService } from './ServerService.js'; import { WellKnownServerService } from './WellKnownServerService.js'; import { GetterService } from './api/GetterService.js'; -import { DiscordServerService } from './api/integration/DiscordServerService.js'; -import { GithubServerService } from './api/integration/GithubServerService.js'; -import { TwitterServerService } from './api/integration/TwitterServerService.js'; import { ChannelsService } from './api/stream/ChannelsService.js'; import { ActivityPubServerService } from './ActivityPubServerService.js'; import { ApiLoggerService } from './api/ApiLoggerService.js'; @@ -54,9 +51,6 @@ import { UserListChannelService } from './api/stream/channels/user-list.js'; ServerService, WellKnownServerService, GetterService, - DiscordServerService, - GithubServerService, - TwitterServerService, ChannelsService, ApiCallService, ApiLoggerService, diff --git a/packages/backend/src/server/api/ApiServerService.ts b/packages/backend/src/server/api/ApiServerService.ts index b29c9616cc..e406949cd4 100644 --- a/packages/backend/src/server/api/ApiServerService.ts +++ b/packages/backend/src/server/api/ApiServerService.ts @@ -12,9 +12,6 @@ import endpoints, { IEndpoint } from './endpoints.js'; import { ApiCallService } from './ApiCallService.js'; import { SignupApiService } from './SignupApiService.js'; import { SigninApiService } from './SigninApiService.js'; -import { GithubServerService } from './integration/GithubServerService.js'; -import { DiscordServerService } from './integration/DiscordServerService.js'; -import { TwitterServerService } from './integration/TwitterServerService.js'; import type { FastifyInstance, FastifyPluginOptions } from 'fastify'; @Injectable() @@ -38,9 +35,6 @@ export class ApiServerService { private apiCallService: ApiCallService, private signupApiService: SignupApiService, private signinApiService: SigninApiService, - private githubServerService: GithubServerService, - private discordServerService: DiscordServerService, - private twitterServerService: TwitterServerService, ) { //this.createServer = this.createServer.bind(this); } @@ -133,10 +127,6 @@ export class ApiServerService { fastify.post<{ Body: { code: string; } }>('/signup-pending', (request, reply) => this.signupApiService.signupPending(request, reply)); - fastify.register(this.discordServerService.create); - fastify.register(this.githubServerService.create); - fastify.register(this.twitterServerService.create); - fastify.get('/v1/instance/peers', async (request, reply) => { const instances = await this.instancesRepository.find({ select: ['host'], diff --git a/packages/backend/src/server/api/EndpointsModule.ts b/packages/backend/src/server/api/EndpointsModule.ts index 466651f379..4a55c6cbe3 100644 --- a/packages/backend/src/server/api/EndpointsModule.ts +++ b/packages/backend/src/server/api/EndpointsModule.ts @@ -97,7 +97,6 @@ import * as ep___charts_activeUsers from './endpoints/charts/active-users.js'; import * as ep___charts_apRequest from './endpoints/charts/ap-request.js'; import * as ep___charts_drive from './endpoints/charts/drive.js'; import * as ep___charts_federation from './endpoints/charts/federation.js'; -import * as ep___charts_hashtag from './endpoints/charts/hashtag.js'; import * as ep___charts_instance from './endpoints/charts/instance.js'; import * as ep___charts_notes from './endpoints/charts/notes.js'; import * as ep___charts_user_drive from './endpoints/charts/user/drive.js'; @@ -433,7 +432,6 @@ const $charts_activeUsers: Provider = { provide: 'ep:charts/active-users', useCl const $charts_apRequest: Provider = { provide: 'ep:charts/ap-request', useClass: ep___charts_apRequest.default }; const $charts_drive: Provider = { provide: 'ep:charts/drive', useClass: ep___charts_drive.default }; const $charts_federation: Provider = { provide: 'ep:charts/federation', useClass: ep___charts_federation.default }; -const $charts_hashtag: Provider = { provide: 'ep:charts/hashtag', useClass: ep___charts_hashtag.default }; const $charts_instance: Provider = { provide: 'ep:charts/instance', useClass: ep___charts_instance.default }; const $charts_notes: Provider = { provide: 'ep:charts/notes', useClass: ep___charts_notes.default }; const $charts_user_drive: Provider = { provide: 'ep:charts/user/drive', useClass: ep___charts_user_drive.default }; @@ -773,7 +771,6 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $charts_apRequest, $charts_drive, $charts_federation, - $charts_hashtag, $charts_instance, $charts_notes, $charts_user_drive, @@ -1107,7 +1104,6 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $charts_apRequest, $charts_drive, $charts_federation, - $charts_hashtag, $charts_instance, $charts_notes, $charts_user_drive, diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index 3678fe14e8..55e1900d51 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -96,7 +96,6 @@ import * as ep___charts_activeUsers from './endpoints/charts/active-users.js'; import * as ep___charts_apRequest from './endpoints/charts/ap-request.js'; import * as ep___charts_drive from './endpoints/charts/drive.js'; import * as ep___charts_federation from './endpoints/charts/federation.js'; -import * as ep___charts_hashtag from './endpoints/charts/hashtag.js'; import * as ep___charts_instance from './endpoints/charts/instance.js'; import * as ep___charts_notes from './endpoints/charts/notes.js'; import * as ep___charts_user_drive from './endpoints/charts/user/drive.js'; @@ -430,7 +429,6 @@ const eps = [ ['charts/ap-request', ep___charts_apRequest], ['charts/drive', ep___charts_drive], ['charts/federation', ep___charts_federation], - ['charts/hashtag', ep___charts_hashtag], ['charts/instance', ep___charts_instance], ['charts/notes', ep___charts_notes], ['charts/user/drive', ep___charts_user_drive], diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index b393827054..2b19104ea7 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -138,18 +138,6 @@ export const meta = { type: 'boolean', optional: false, nullable: false, }, - enableTwitterIntegration: { - type: 'boolean', - optional: false, nullable: false, - }, - enableGithubIntegration: { - type: 'boolean', - optional: false, nullable: false, - }, - enableDiscordIntegration: { - type: 'boolean', - optional: false, nullable: false, - }, enableServiceWorker: { type: 'boolean', optional: false, nullable: false, @@ -223,30 +211,6 @@ export const meta = { optional: true, nullable: true, format: 'id', }, - twitterConsumerKey: { - type: 'string', - optional: true, nullable: true, - }, - twitterConsumerSecret: { - type: 'string', - optional: true, nullable: true, - }, - githubClientId: { - type: 'string', - optional: true, nullable: true, - }, - githubClientSecret: { - type: 'string', - optional: true, nullable: true, - }, - discordClientId: { - type: 'string', - optional: true, nullable: true, - }, - discordClientSecret: { - type: 'string', - optional: true, nullable: true, - }, summaryProxy: { type: 'string', optional: true, nullable: true, @@ -389,9 +353,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { defaultLightTheme: instance.defaultLightTheme, defaultDarkTheme: instance.defaultDarkTheme, enableEmail: instance.enableEmail, - enableTwitterIntegration: instance.enableTwitterIntegration, - enableGithubIntegration: instance.enableGithubIntegration, - enableDiscordIntegration: instance.enableDiscordIntegration, enableServiceWorker: instance.enableServiceWorker, translatorAvailable: instance.deeplAuthKey != null, pinnedPages: instance.pinnedPages, @@ -409,12 +370,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { setSensitiveFlagAutomatically: instance.setSensitiveFlagAutomatically, enableSensitiveMediaDetectionForVideos: instance.enableSensitiveMediaDetectionForVideos, proxyAccountId: instance.proxyAccountId, - twitterConsumerKey: instance.twitterConsumerKey, - twitterConsumerSecret: instance.twitterConsumerSecret, - githubClientId: instance.githubClientId, - githubClientSecret: instance.githubClientSecret, - discordClientId: instance.discordClientId, - discordClientSecret: instance.discordClientSecret, summalyProxy: instance.summalyProxy, email: instance.email, smtpSecure: instance.smtpSecure, diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index 94603cc91a..823af6d8be 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -65,11 +65,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { }; } - const maskedKeys = ['accessToken', 'accessTokenSecret', 'refreshToken']; - Object.keys(profile.integrations).forEach(integration => { - maskedKeys.forEach(key => profile.integrations[integration][key] = '<MASKED>'); - }); - const signins = await this.signinsRepository.findBy({ userId: user.id }); const roles = await this.roleService.getUserRoles(user.id); @@ -84,7 +79,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { carefulBot: profile.carefulBot, injectFeaturedNote: profile.injectFeaturedNote, receiveAnnouncementEmail: profile.receiveAnnouncementEmail, - integrations: profile.integrations, mutedWords: profile.mutedWords, mutedInstances: profile.mutedInstances, mutingNotificationTypes: profile.mutingNotificationTypes, 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 aacd634ed8..354ef22aa7 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -68,15 +68,6 @@ export const paramDef = { summalyProxy: { type: 'string', nullable: true }, deeplAuthKey: { type: 'string', nullable: true }, deeplIsPro: { type: 'boolean' }, - enableTwitterIntegration: { type: 'boolean' }, - twitterConsumerKey: { type: 'string', nullable: true }, - twitterConsumerSecret: { type: 'string', nullable: true }, - enableGithubIntegration: { type: 'boolean' }, - githubClientId: { type: 'string', nullable: true }, - githubClientSecret: { type: 'string', nullable: true }, - enableDiscordIntegration: { type: 'boolean' }, - discordClientId: { type: 'string', nullable: true }, - discordClientSecret: { type: 'string', nullable: true }, enableEmail: { type: 'boolean' }, email: { type: 'string', nullable: true }, smtpSecure: { type: 'boolean' }, @@ -270,42 +261,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { set.summalyProxy = ps.summalyProxy; } - if (ps.enableTwitterIntegration !== undefined) { - set.enableTwitterIntegration = ps.enableTwitterIntegration; - } - - if (ps.twitterConsumerKey !== undefined) { - set.twitterConsumerKey = ps.twitterConsumerKey; - } - - if (ps.twitterConsumerSecret !== undefined) { - set.twitterConsumerSecret = ps.twitterConsumerSecret; - } - - if (ps.enableGithubIntegration !== undefined) { - set.enableGithubIntegration = ps.enableGithubIntegration; - } - - if (ps.githubClientId !== undefined) { - set.githubClientId = ps.githubClientId; - } - - if (ps.githubClientSecret !== undefined) { - set.githubClientSecret = ps.githubClientSecret; - } - - if (ps.enableDiscordIntegration !== undefined) { - set.enableDiscordIntegration = ps.enableDiscordIntegration; - } - - if (ps.discordClientId !== undefined) { - set.discordClientId = ps.discordClientId; - } - - if (ps.discordClientSecret !== undefined) { - set.discordClientSecret = ps.discordClientSecret; - } - if (ps.enableEmail !== undefined) { set.enableEmail = ps.enableEmail; } diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts deleted file mode 100644 index 71e5bab766..0000000000 --- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import { getJsonSchema } from '@/core/chart/core.js'; -import { Endpoint } from '@/server/api/endpoint-base.js'; -import HashtagChart from '@/core/chart/charts/hashtag.js'; -import { schema } from '@/core/chart/charts/entities/hashtag.js'; - -export const meta = { - tags: ['charts', 'hashtags'], - - res: getJsonSchema(schema), - - allowGet: true, - cacheSec: 60 * 60, -} as const; - -export const paramDef = { - type: 'object', - properties: { - span: { type: 'string', enum: ['day', 'hour'] }, - limit: { type: 'integer', minimum: 1, maximum: 500, default: 30 }, - offset: { type: 'integer', nullable: true, default: null }, - tag: { type: 'string' }, - }, - required: ['span', 'tag'], -} as const; - -// eslint-disable-next-line import/no-default-export -@Injectable() -export default class extends Endpoint<typeof meta, typeof paramDef> { - constructor( - private hashtagChart: HashtagChart, - ) { - super(meta, paramDef, async (ps, me) => { - return await this.hashtagChart.getChart(ps.span, ps.limit, ps.offset ? new Date(ps.offset) : null, ps.tag); - }); - } -} diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 89fa503173..3baf945323 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -169,18 +169,6 @@ export const meta = { type: 'boolean', optional: false, nullable: false, }, - enableTwitterIntegration: { - type: 'boolean', - optional: false, nullable: false, - }, - enableGithubIntegration: { - type: 'boolean', - optional: false, nullable: false, - }, - enableDiscordIntegration: { - type: 'boolean', - optional: false, nullable: false, - }, enableServiceWorker: { type: 'boolean', optional: false, nullable: false, @@ -225,18 +213,6 @@ export const meta = { type: 'boolean', optional: false, nullable: false, }, - twitter: { - type: 'boolean', - optional: false, nullable: false, - }, - github: { - type: 'boolean', - optional: false, nullable: false, - }, - discord: { - type: 'boolean', - optional: false, nullable: false, - }, serviceWorker: { type: 'boolean', optional: false, nullable: false, @@ -325,11 +301,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { imageUrl: ad.imageUrl, })), enableEmail: instance.enableEmail, - - enableTwitterIntegration: instance.enableTwitterIntegration, - enableGithubIntegration: instance.enableGithubIntegration, - enableDiscordIntegration: instance.enableDiscordIntegration, - enableServiceWorker: instance.enableServiceWorker, translatorAvailable: instance.deeplAuthKey != null, @@ -358,9 +329,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { recaptcha: instance.enableRecaptcha, turnstile: instance.enableTurnstile, objectStorage: instance.useObjectStorage, - twitter: instance.enableTwitterIntegration, - github: instance.enableGithubIntegration, - discord: instance.enableDiscordIntegration, serviceWorker: instance.enableServiceWorker, miauth: true, }; diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 92bc8a7595..a709ab2f7a 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -90,48 +90,13 @@ export const paramDef = { visibleUserIds: { type: 'array', uniqueItems: true, items: { type: 'string', format: 'misskey:id', } }, - text: { type: 'string', maxLength: MAX_NOTE_TEXT_LENGTH, nullable: true }, cw: { type: 'string', nullable: true, maxLength: 100 }, localOnly: { type: 'boolean', default: false }, noExtractMentions: { type: 'boolean', default: false }, noExtractHashtags: { type: 'boolean', default: false }, noExtractEmojis: { type: 'boolean', default: false }, - fileIds: { - type: 'array', - uniqueItems: true, - minItems: 1, - maxItems: 16, - items: { type: 'string', format: 'misskey:id' }, - }, - mediaIds: { - deprecated: true, - description: 'Use `fileIds` instead. If both are specified, this property is discarded.', - type: 'array', - uniqueItems: true, - minItems: 1, - maxItems: 16, - items: { type: 'string', format: 'misskey:id' }, - }, replyId: { type: 'string', format: 'misskey:id', nullable: true }, - renoteId: { type: 'string', format: 'misskey:id', nullable: true }, channelId: { type: 'string', format: 'misskey:id', nullable: true }, - poll: { - type: 'object', - nullable: true, - properties: { - choices: { - type: 'array', - uniqueItems: true, - minItems: 2, - maxItems: 10, - items: { type: 'string', minLength: 1, maxLength: 50 }, - }, - multiple: { type: 'boolean', default: false }, - expiresAt: { type: 'integer', nullable: true }, - expiredAfter: { type: 'integer', nullable: true, minimum: 1 }, - }, - required: ['choices'], - }, }, anyOf: [ { @@ -143,21 +108,60 @@ export const paramDef = { }, { // (re)note with files, text and poll are optional + properties: { + fileIds: { + type: 'array', + uniqueItems: true, + minItems: 1, + maxItems: 16, + items: { type: 'string', format: 'misskey:id' }, + }, + }, required: ['fileIds'], }, { // (re)note with files, text and poll are optional + properties: { + mediaIds: { + deprecated: true, + description: 'Use `fileIds` instead. If both are specified, this property is discarded.', + type: 'array', + uniqueItems: true, + minItems: 1, + maxItems: 16, + items: { type: 'string', format: 'misskey:id' }, + }, + }, required: ['mediaIds'], }, { // (re)note with poll, text and files are optional properties: { - poll: { type: 'object', nullable: false }, + poll: { + type: 'object', + nullable: true, + properties: { + choices: { + type: 'array', + uniqueItems: true, + minItems: 2, + maxItems: 10, + items: { type: 'string', minLength: 1, maxLength: 50 }, + }, + multiple: { type: 'boolean' }, + expiresAt: { type: 'integer', nullable: true }, + expiredAfter: { type: 'integer', nullable: true, minimum: 1 }, + }, + required: ['choices'], + }, }, required: ['poll'], }, { // pure renote + properties: { + renoteId: { type: 'string', format: 'misskey:id', nullable: true }, + }, required: ['renoteId'], }, ], diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 95491211bc..b176e6c65d 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -29,14 +29,22 @@ export const meta = { export const paramDef = { type: 'object', properties: { - username: { type: 'string', nullable: true }, - host: { type: 'string', nullable: true }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, detail: { type: 'boolean', default: true }, }, anyOf: [ - { required: ['username'] }, - { required: ['host'] }, + { + properties: { + username: { type: 'string', nullable: true }, + }, + required: ['username'] + }, + { + properties: { + host: { type: 'string', nullable: true }, + }, + required: ['host'] + }, ], } as const; diff --git a/packages/backend/src/server/api/integration/DiscordServerService.ts b/packages/backend/src/server/api/integration/DiscordServerService.ts deleted file mode 100644 index 0ac2733817..0000000000 --- a/packages/backend/src/server/api/integration/DiscordServerService.ts +++ /dev/null @@ -1,308 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import Redis from 'ioredis'; -import { OAuth2 } from 'oauth'; -import { v4 as uuid } from 'uuid'; -import { IsNull } from 'typeorm'; -import type { Config } from '@/config.js'; -import type { UserProfilesRepository, UsersRepository } from '@/models/index.js'; -import { DI } from '@/di-symbols.js'; -import { HttpRequestService } from '@/core/HttpRequestService.js'; -import type { ILocalUser } from '@/models/entities/User.js'; -import { GlobalEventService } from '@/core/GlobalEventService.js'; -import { MetaService } from '@/core/MetaService.js'; -import { UserEntityService } from '@/core/entities/UserEntityService.js'; -import { FastifyReplyError } from '@/misc/fastify-reply-error.js'; -import { bindThis } from '@/decorators.js'; -import { SigninService } from '../SigninService.js'; -import type { FastifyInstance, FastifyRequest, FastifyPluginOptions } from 'fastify'; - -@Injectable() -export class DiscordServerService { - constructor( - @Inject(DI.config) - private config: Config, - - @Inject(DI.redis) - private redisClient: Redis.Redis, - - @Inject(DI.usersRepository) - private usersRepository: UsersRepository, - - @Inject(DI.userProfilesRepository) - private userProfilesRepository: UserProfilesRepository, - - private userEntityService: UserEntityService, - private httpRequestService: HttpRequestService, - private globalEventService: GlobalEventService, - private metaService: MetaService, - private signinService: SigninService, - ) { - //this.create = this.create.bind(this); - } - - @bindThis - public create(fastify: FastifyInstance, options: FastifyPluginOptions, done: (err?: Error) => void) { - fastify.get('/disconnect/discord', async (request, reply) => { - if (!this.compareOrigin(request)) { - throw new FastifyReplyError(400, 'invalid origin'); - } - - const userToken = this.getUserToken(request); - if (!userToken) { - throw new FastifyReplyError(400, 'signin required'); - } - - const user = await this.usersRepository.findOneByOrFail({ - host: IsNull(), - token: userToken, - }); - - const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); - - delete profile.integrations.discord; - - await this.userProfilesRepository.update(user.id, { - integrations: profile.integrations, - }); - - // Publish i updated event - this.globalEventService.publishMainStream(user.id, 'meUpdated', await this.userEntityService.pack(user, user, { - detail: true, - includeSecrets: true, - })); - - return 'Discordの連携を解除しました :v:'; - }); - - const getOAuth2 = async () => { - const meta = await this.metaService.fetch(true); - - if (meta.enableDiscordIntegration) { - return new OAuth2( - meta.discordClientId!, - meta.discordClientSecret!, - 'https://discord.com/', - 'api/oauth2/authorize', - 'api/oauth2/token'); - } else { - return null; - } - }; - - fastify.get('/connect/discord', async (request, reply) => { - if (!this.compareOrigin(request)) { - throw new FastifyReplyError(400, 'invalid origin'); - } - - const userToken = this.getUserToken(request); - if (!userToken) { - throw new FastifyReplyError(400, 'signin required'); - } - - const params = { - redirect_uri: `${this.config.url}/api/dc/cb`, - scope: ['identify'], - state: uuid(), - response_type: 'code', - }; - - this.redisClient.set(userToken, JSON.stringify(params)); - - const oauth2 = await getOAuth2(); - reply.redirect(oauth2!.getAuthorizeUrl(params)); - }); - - fastify.get('/signin/discord', async (request, reply) => { - const sessid = uuid(); - - const params = { - redirect_uri: `${this.config.url}/api/dc/cb`, - scope: ['identify'], - state: uuid(), - response_type: 'code', - }; - - reply.setCookie('signin_with_discord_sid', sessid, { - path: '/', - secure: this.config.url.startsWith('https'), - httpOnly: true, - }); - - this.redisClient.set(sessid, JSON.stringify(params)); - - const oauth2 = await getOAuth2(); - reply.redirect(oauth2!.getAuthorizeUrl(params)); - }); - - fastify.get('/dc/cb', async (request, reply) => { - const userToken = this.getUserToken(request); - - const oauth2 = await getOAuth2(); - - if (!userToken) { - const sessid = request.cookies['signin_with_discord_sid']; - - if (!sessid) { - throw new FastifyReplyError(400, 'invalid session'); - } - - const code = request.query.code; - - if (!code || typeof code !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { redirect_uri, state } = await new Promise<any>((res, rej) => { - this.redisClient.get(sessid, async (_, state) => { - if (state == null) throw new Error('empty state'); - res(JSON.parse(state)); - }); - }); - - if (request.query.state !== state) { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { accessToken, refreshToken, expiresDate } = await new Promise<any>((res, rej) => - oauth2!.getOAuthAccessToken(code, { - grant_type: 'authorization_code', - redirect_uri, - }, (err, accessToken, refreshToken, result) => { - if (err) { - rej(err); - } else if (result.error) { - rej(result.error); - } else { - res({ - accessToken, - refreshToken, - expiresDate: Date.now() + Number(result.expires_in) * 1000, - }); - } - })); - - const { id, username, discriminator } = (await this.httpRequestService.getJson('https://discord.com/api/users/@me', '*/*', { - 'Authorization': `Bearer ${accessToken}`, - })) as Record<string, unknown>; - - if (typeof id !== 'string' || typeof username !== 'string' || typeof discriminator !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const profile = await this.userProfilesRepository.createQueryBuilder() - .where('"integrations"->\'discord\'->>\'id\' = :id', { id: id }) - .andWhere('"userHost" IS NULL') - .getOne(); - - if (profile == null) { - throw new FastifyReplyError(404, `@${username}#${discriminator}と連携しているMisskeyアカウントはありませんでした...`); - } - - await this.userProfilesRepository.update(profile.userId, { - integrations: { - ...profile.integrations, - discord: { - id: id, - accessToken: accessToken, - refreshToken: refreshToken, - expiresDate: expiresDate, - username: username, - discriminator: discriminator, - }, - }, - }); - - return this.signinService.signin(request, reply, await this.usersRepository.findOneBy({ id: profile.userId }) as ILocalUser, true); - } else { - const code = request.query.code; - - if (!code || typeof code !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { redirect_uri, state } = await new Promise<any>((res, rej) => { - this.redisClient.get(userToken, async (_, state) => { - if (state == null) throw new Error('empty state'); - res(JSON.parse(state)); - }); - }); - - if (request.query.state !== state) { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { accessToken, refreshToken, expiresDate } = await new Promise<any>((res, rej) => - oauth2!.getOAuthAccessToken(code, { - grant_type: 'authorization_code', - redirect_uri, - }, (err, accessToken, refreshToken, result) => { - if (err) { - rej(err); - } else if (result.error) { - rej(result.error); - } else { - res({ - accessToken, - refreshToken, - expiresDate: Date.now() + Number(result.expires_in) * 1000, - }); - } - })); - - const { id, username, discriminator } = (await this.httpRequestService.getJson('https://discord.com/api/users/@me', '*/*', { - 'Authorization': `Bearer ${accessToken}`, - })) as Record<string, unknown>; - if (typeof id !== 'string' || typeof username !== 'string' || typeof discriminator !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const user = await this.usersRepository.findOneByOrFail({ - host: IsNull(), - token: userToken, - }); - - const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); - - await this.userProfilesRepository.update(user.id, { - integrations: { - ...profile.integrations, - discord: { - accessToken: accessToken, - refreshToken: refreshToken, - expiresDate: expiresDate, - id: id, - username: username, - discriminator: discriminator, - }, - }, - }); - - // Publish i updated event - this.globalEventService.publishMainStream(user.id, 'meUpdated', await this.userEntityService.pack(user, user, { - detail: true, - includeSecrets: true, - })); - - return `Discord: @${username}#${discriminator} を、Misskey: @${user.username} に接続しました!`; - } - }); - - done(); - } - - @bindThis - private getUserToken(request: FastifyRequest): string | null { - return ((request.headers['cookie'] ?? '').match(/igi=(\w+)/) ?? [null, null])[1]; - } - - @bindThis - private compareOrigin(request: FastifyRequest): boolean { - function normalizeUrl(url?: string): string { - return url ? url.endsWith('/') ? url.substr(0, url.length - 1) : url : ''; - } - - const referer = request.headers['referer']; - - return (normalizeUrl(referer) === normalizeUrl(this.config.url)); - } -} diff --git a/packages/backend/src/server/api/integration/GithubServerService.ts b/packages/backend/src/server/api/integration/GithubServerService.ts deleted file mode 100644 index a8c745d2dc..0000000000 --- a/packages/backend/src/server/api/integration/GithubServerService.ts +++ /dev/null @@ -1,280 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import Redis from 'ioredis'; -import { OAuth2 } from 'oauth'; -import { v4 as uuid } from 'uuid'; -import { IsNull } from 'typeorm'; -import type { Config } from '@/config.js'; -import type { UserProfilesRepository, UsersRepository } from '@/models/index.js'; -import { DI } from '@/di-symbols.js'; -import { HttpRequestService } from '@/core/HttpRequestService.js'; -import type { ILocalUser } from '@/models/entities/User.js'; -import { GlobalEventService } from '@/core/GlobalEventService.js'; -import { MetaService } from '@/core/MetaService.js'; -import { UserEntityService } from '@/core/entities/UserEntityService.js'; -import { FastifyReplyError } from '@/misc/fastify-reply-error.js'; -import { bindThis } from '@/decorators.js'; -import { SigninService } from '../SigninService.js'; -import type { FastifyInstance, FastifyRequest, FastifyPluginOptions } from 'fastify'; - -@Injectable() -export class GithubServerService { - constructor( - @Inject(DI.config) - private config: Config, - - @Inject(DI.redis) - private redisClient: Redis.Redis, - - @Inject(DI.usersRepository) - private usersRepository: UsersRepository, - - @Inject(DI.userProfilesRepository) - private userProfilesRepository: UserProfilesRepository, - - private userEntityService: UserEntityService, - private httpRequestService: HttpRequestService, - private globalEventService: GlobalEventService, - private metaService: MetaService, - private signinService: SigninService, - ) { - //this.create = this.create.bind(this); - } - - @bindThis - public create(fastify: FastifyInstance, options: FastifyPluginOptions, done: (err?: Error) => void) { - fastify.get('/disconnect/github', async (request, reply) => { - if (!this.compareOrigin(request)) { - throw new FastifyReplyError(400, 'invalid origin'); - } - - const userToken = this.getUserToken(request); - if (!userToken) { - throw new FastifyReplyError(400, 'signin required'); - } - - const user = await this.usersRepository.findOneByOrFail({ - host: IsNull(), - token: userToken, - }); - - const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); - - delete profile.integrations.github; - - await this.userProfilesRepository.update(user.id, { - integrations: profile.integrations, - }); - - // Publish i updated event - this.globalEventService.publishMainStream(user.id, 'meUpdated', await this.userEntityService.pack(user, user, { - detail: true, - includeSecrets: true, - })); - - return 'GitHubの連携を解除しました :v:'; - }); - - const getOath2 = async () => { - const meta = await this.metaService.fetch(true); - - if (meta.enableGithubIntegration && meta.githubClientId && meta.githubClientSecret) { - return new OAuth2( - meta.githubClientId, - meta.githubClientSecret, - 'https://github.com/', - 'login/oauth/authorize', - 'login/oauth/access_token'); - } else { - return null; - } - }; - - fastify.get('/connect/github', async (request, reply) => { - if (!this.compareOrigin(request)) { - throw new FastifyReplyError(400, 'invalid origin'); - } - - const userToken = this.getUserToken(request); - if (!userToken) { - throw new FastifyReplyError(400, 'signin required'); - } - - const params = { - redirect_uri: `${this.config.url}/api/gh/cb`, - scope: ['read:user'], - state: uuid(), - }; - - this.redisClient.set(userToken, JSON.stringify(params)); - - const oauth2 = await getOath2(); - reply.redirect(oauth2!.getAuthorizeUrl(params)); - }); - - fastify.get('/signin/github', async (request, reply) => { - const sessid = uuid(); - - const params = { - redirect_uri: `${this.config.url}/api/gh/cb`, - scope: ['read:user'], - state: uuid(), - }; - - reply.setCookie('signin_with_github_sid', sessid, { - path: '/', - secure: this.config.url.startsWith('https'), - httpOnly: true, - }); - - this.redisClient.set(sessid, JSON.stringify(params)); - - const oauth2 = await getOath2(); - reply.redirect(oauth2!.getAuthorizeUrl(params)); - }); - - fastify.get('/gh/cb', async (request, reply) => { - const userToken = this.getUserToken(request); - - const oauth2 = await getOath2(); - - if (!userToken) { - const sessid = request.cookies['signin_with_github_sid']; - - if (!sessid) { - throw new FastifyReplyError(400, 'invalid session'); - } - - const code = request.query.code; - - if (!code || typeof code !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { redirect_uri, state } = await new Promise<any>((res, rej) => { - this.redisClient.get(sessid, async (_, state) => { - if (state == null) throw new Error('empty state'); - res(JSON.parse(state)); - }); - }); - - if (request.query.state !== state) { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { accessToken } = await new Promise<{ accessToken: string }>((res, rej) => - oauth2!.getOAuthAccessToken(code, { - redirect_uri, - }, (err, accessToken, refresh, result) => { - if (err) { - rej(err); - } else if (result.error) { - rej(result.error); - } else { - res({ accessToken }); - } - })); - - const { login, id } = (await this.httpRequestService.getJson('https://api.github.com/user', 'application/vnd.github.v3+json', { - 'Authorization': `bearer ${accessToken}`, - })) as Record<string, unknown>; - if (typeof login !== 'string' || typeof id !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const link = await this.userProfilesRepository.createQueryBuilder() - .where('"integrations"->\'github\'->>\'id\' = :id', { id: id }) - .andWhere('"userHost" IS NULL') - .getOne(); - - if (link == null) { - throw new FastifyReplyError(404, `@${login}と連携しているMisskeyアカウントはありませんでした...`); - } - - return this.signinService.signin(request, reply, await this.usersRepository.findOneBy({ id: link.userId }) as ILocalUser, true); - } else { - const code = request.query.code; - - if (!code || typeof code !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { redirect_uri, state } = await new Promise<any>((res, rej) => { - this.redisClient.get(userToken, async (_, state) => { - if (state == null) throw new Error('empty state'); - res(JSON.parse(state)); - }); - }); - - if (request.query.state !== state) { - throw new FastifyReplyError(400, 'invalid session'); - } - - const { accessToken } = await new Promise<{ accessToken: string }>((res, rej) => - oauth2!.getOAuthAccessToken( - code, - { redirect_uri }, - (err, accessToken, refresh, result) => { - if (err) { - rej(err); - } else if (result.error) { - rej(result.error); - } else { - res({ accessToken }); - } - })); - - const { login, id } = (await this.httpRequestService.getJson('https://api.github.com/user', 'application/vnd.github.v3+json', { - 'Authorization': `bearer ${accessToken}`, - })) as Record<string, unknown>; - - if (typeof login !== 'string' || typeof id !== 'number') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const user = await this.usersRepository.findOneByOrFail({ - host: IsNull(), - token: userToken, - }); - - const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); - - await this.userProfilesRepository.update(user.id, { - integrations: { - ...profile.integrations, - github: { - accessToken: accessToken, - id: id, - login: login, - }, - }, - }); - - // Publish i updated event - this.globalEventService.publishMainStream(user.id, 'meUpdated', await this.userEntityService.pack(user, user, { - detail: true, - includeSecrets: true, - })); - - return `GitHub: @${login} を、Misskey: @${user.username} に接続しました!`; - } - }); - - done(); - } - - @bindThis - private getUserToken(request: FastifyRequest): string | null { - return ((request.headers['cookie'] ?? '').match(/igi=(\w+)/) ?? [null, null])[1]; - } - - @bindThis - private compareOrigin(request: FastifyRequest): boolean { - function normalizeUrl(url?: string): string { - return url ? url.endsWith('/') ? url.substr(0, url.length - 1) : url : ''; - } - - const referer = request.headers['referer']; - - return (normalizeUrl(referer) === normalizeUrl(this.config.url)); - } -} diff --git a/packages/backend/src/server/api/integration/TwitterServerService.ts b/packages/backend/src/server/api/integration/TwitterServerService.ts deleted file mode 100644 index f31a788d31..0000000000 --- a/packages/backend/src/server/api/integration/TwitterServerService.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import Redis from 'ioredis'; -import { v4 as uuid } from 'uuid'; -import { IsNull } from 'typeorm'; -import * as autwh from 'autwh'; -import type { Config } from '@/config.js'; -import type { UserProfilesRepository, UsersRepository } from '@/models/index.js'; -import { DI } from '@/di-symbols.js'; -import { HttpRequestService } from '@/core/HttpRequestService.js'; -import type { ILocalUser } from '@/models/entities/User.js'; -import { GlobalEventService } from '@/core/GlobalEventService.js'; -import { MetaService } from '@/core/MetaService.js'; -import { UserEntityService } from '@/core/entities/UserEntityService.js'; -import { FastifyReplyError } from '@/misc/fastify-reply-error.js'; -import { bindThis } from '@/decorators.js'; -import { SigninService } from '../SigninService.js'; -import type { FastifyInstance, FastifyRequest, FastifyPluginOptions } from 'fastify'; - -@Injectable() -export class TwitterServerService { - constructor( - @Inject(DI.config) - private config: Config, - - @Inject(DI.redis) - private redisClient: Redis.Redis, - - @Inject(DI.usersRepository) - private usersRepository: UsersRepository, - - @Inject(DI.userProfilesRepository) - private userProfilesRepository: UserProfilesRepository, - - private userEntityService: UserEntityService, - private httpRequestService: HttpRequestService, - private globalEventService: GlobalEventService, - private metaService: MetaService, - private signinService: SigninService, - ) { - //this.create = this.create.bind(this); - } - - @bindThis - public create(fastify: FastifyInstance, options: FastifyPluginOptions, done: (err?: Error) => void) { - fastify.get('/disconnect/twitter', async (request, reply) => { - if (!this.compareOrigin(request)) { - throw new FastifyReplyError(400, 'invalid origin'); - } - - const userToken = this.getUserToken(request); - if (userToken == null) { - throw new FastifyReplyError(400, 'signin required'); - } - - const user = await this.usersRepository.findOneByOrFail({ - host: IsNull(), - token: userToken, - }); - - const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); - - delete profile.integrations.twitter; - - await this.userProfilesRepository.update(user.id, { - integrations: profile.integrations, - }); - - // Publish i updated event - this.globalEventService.publishMainStream(user.id, 'meUpdated', await this.userEntityService.pack(user, user, { - detail: true, - includeSecrets: true, - })); - - return 'Twitterの連携を解除しました :v:'; - }); - - const getTwAuth = async () => { - const meta = await this.metaService.fetch(true); - - if (meta.enableTwitterIntegration && meta.twitterConsumerKey && meta.twitterConsumerSecret) { - return autwh({ - consumerKey: meta.twitterConsumerKey, - consumerSecret: meta.twitterConsumerSecret, - callbackUrl: `${this.config.url}/api/tw/cb`, - }); - } else { - return null; - } - }; - - fastify.get('/connect/twitter', async (request, reply) => { - if (!this.compareOrigin(request)) { - throw new FastifyReplyError(400, 'invalid origin'); - } - - const userToken = this.getUserToken(request); - if (userToken == null) { - throw new FastifyReplyError(400, 'signin required'); - } - - const twAuth = await getTwAuth(); - const twCtx = await twAuth!.begin(); - this.redisClient.set(userToken, JSON.stringify(twCtx)); - reply.redirect(twCtx.url); - }); - - fastify.get('/signin/twitter', async (request, reply) => { - const twAuth = await getTwAuth(); - const twCtx = await twAuth!.begin(); - - const sessid = uuid(); - - this.redisClient.set(sessid, JSON.stringify(twCtx)); - - reply.setCookie('signin_with_twitter_sid', sessid, { - path: '/', - secure: this.config.url.startsWith('https'), - httpOnly: true, - }); - - reply.redirect(twCtx.url); - }); - - fastify.get('/tw/cb', async (request, reply) => { - const userToken = this.getUserToken(request); - - const twAuth = await getTwAuth(); - - if (userToken == null) { - const sessid = request.cookies['signin_with_twitter_sid']; - - if (sessid == null) { - throw new FastifyReplyError(400, 'invalid session'); - } - - const get = new Promise<any>((res, rej) => { - this.redisClient.get(sessid, async (_, twCtx) => { - res(twCtx); - }); - }); - - const twCtx = await get; - - const verifier = request.query.oauth_verifier; - if (!verifier || typeof verifier !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const result = await twAuth!.done(JSON.parse(twCtx), verifier); - - const link = await this.userProfilesRepository.createQueryBuilder() - .where('"integrations"->\'twitter\'->>\'userId\' = :id', { id: result.userId }) - .andWhere('"userHost" IS NULL') - .getOne(); - - if (link == null) { - throw new FastifyReplyError(404, `@${result.screenName}と連携しているMisskeyアカウントはありませんでした...`); - } - - return this.signinService.signin(request, reply, await this.usersRepository.findOneBy({ id: link.userId }) as ILocalUser, true); - } else { - const verifier = request.query.oauth_verifier; - - if (!verifier || typeof verifier !== 'string') { - throw new FastifyReplyError(400, 'invalid session'); - } - - const get = new Promise<any>((res, rej) => { - this.redisClient.get(userToken, async (_, twCtx) => { - res(twCtx); - }); - }); - - const twCtx = await get; - - const result = await twAuth!.done(JSON.parse(twCtx), verifier); - - const user = await this.usersRepository.findOneByOrFail({ - host: IsNull(), - token: userToken, - }); - - const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); - - await this.userProfilesRepository.update(user.id, { - integrations: { - ...profile.integrations, - twitter: { - accessToken: result.accessToken, - accessTokenSecret: result.accessTokenSecret, - userId: result.userId, - screenName: result.screenName, - }, - }, - }); - - // Publish i updated event - this.globalEventService.publishMainStream(user.id, 'meUpdated', await this.userEntityService.pack(user, user, { - detail: true, - includeSecrets: true, - })); - - return `Twitter: @${result.screenName} を、Misskey: @${user.username} に接続しました!`; - } - }); - - done(); - } - - @bindThis - private getUserToken(request: FastifyRequest): string | null { - return ((request.headers['cookie'] ?? '').match(/igi=(\w+)/) ?? [null, null])[1]; - } - - @bindThis - private compareOrigin(request: FastifyRequest): boolean { - function normalizeUrl(url?: string): string { - return url ? url.endsWith('/') ? url.substr(0, url.length - 1) : url : ''; - } - - const referer = request.headers['referer']; - - return (normalizeUrl(referer) === normalizeUrl(this.config.url)); - } -} diff --git a/packages/backend/src/server/api/stream/types.ts b/packages/backend/src/server/api/stream/types.ts index fc145cf0ee..36bfa78363 100644 --- a/packages/backend/src/server/api/stream/types.ts +++ b/packages/backend/src/server/api/stream/types.ts @@ -18,31 +18,26 @@ import { Following, Role, RoleAssignment } from '@/models'; import type Emitter from 'strict-event-emitter-types'; import type { EventEmitter } from 'events'; -// redis通すとDateのインスタンスはstringに変換されるので -type Serialized<T> = { - [K in keyof T]: T[K] extends Date ? string : T[K]; -}; - //#region Stream type-body definitions export interface InternalStreamTypes { - userChangeSuspendedState: Serialized<{ id: User['id']; isSuspended: User['isSuspended']; }>; - userTokenRegenerated: Serialized<{ id: User['id']; oldToken: User['token']; newToken: User['token']; }>; - remoteUserUpdated: Serialized<{ id: User['id']; }>; - follow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>; - unfollow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>; - policiesUpdated: Serialized<Role['policies']>; - roleCreated: Serialized<Role>; - roleDeleted: Serialized<Role>; - roleUpdated: Serialized<Role>; - userRoleAssigned: Serialized<RoleAssignment>; - userRoleUnassigned: Serialized<RoleAssignment>; - webhookCreated: Serialized<Webhook>; - webhookDeleted: Serialized<Webhook>; - webhookUpdated: Serialized<Webhook>; - antennaCreated: Serialized<Antenna>; - antennaDeleted: Serialized<Antenna>; - antennaUpdated: Serialized<Antenna>; - metaUpdated: Serialized<Meta>; + userChangeSuspendedState: { id: User['id']; isSuspended: User['isSuspended']; }; + userTokenRegenerated: { id: User['id']; oldToken: User['token']; newToken: User['token']; }; + remoteUserUpdated: { id: User['id']; }; + follow: { followerId: User['id']; followeeId: User['id']; }; + unfollow: { followerId: User['id']; followeeId: User['id']; }; + policiesUpdated: Role['policies']; + roleCreated: Role; + roleDeleted: Role; + roleUpdated: Role; + userRoleAssigned: RoleAssignment; + userRoleUnassigned: RoleAssignment; + webhookCreated: Webhook; + webhookDeleted: Webhook; + webhookUpdated: Webhook; + antennaCreated: Antenna; + antennaDeleted: Antenna; + antennaUpdated: Antenna; + metaUpdated: Meta; } export interface BroadcastTypes { @@ -210,63 +205,72 @@ type EventUnionFromDictionary< U = Events<T> > = U[keyof U]; +// redis通すとDateのインスタンスはstringに変換されるので +type Serialized<T> = { + [K in keyof T]: T[K] extends Date ? string : T[K] extends Record<string, any> ? Serialized<T[K]> : T[K]; +}; + +type SerializedAll<T> = { + [K in keyof T]: Serialized<T[K]>; +}; + // name/messages(spec) pairs dictionary export type StreamMessages = { internal: { name: 'internal'; - payload: EventUnionFromDictionary<InternalStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<InternalStreamTypes>>; }; broadcast: { name: 'broadcast'; - payload: EventUnionFromDictionary<BroadcastTypes>; + payload: EventUnionFromDictionary<SerializedAll<BroadcastTypes>>; }; user: { name: `user:${User['id']}`; - payload: EventUnionFromDictionary<UserStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<UserStreamTypes>>; }; main: { name: `mainStream:${User['id']}`; - payload: EventUnionFromDictionary<MainStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<MainStreamTypes>>; }; drive: { name: `driveStream:${User['id']}`; - payload: EventUnionFromDictionary<DriveStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<DriveStreamTypes>>; }; note: { name: `noteStream:${Note['id']}`; - payload: EventUnionFromDictionary<NoteStreamEventTypes>; + payload: EventUnionFromDictionary<SerializedAll<NoteStreamEventTypes>>; }; channel: { name: `channelStream:${Channel['id']}`; - payload: EventUnionFromDictionary<ChannelStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<ChannelStreamTypes>>; }; userList: { name: `userListStream:${UserList['id']}`; - payload: EventUnionFromDictionary<UserListStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<UserListStreamTypes>>; }; antenna: { name: `antennaStream:${Antenna['id']}`; - payload: EventUnionFromDictionary<AntennaStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<AntennaStreamTypes>>; }; messaging: { name: `messagingStream:${User['id']}-${User['id']}`; - payload: EventUnionFromDictionary<MessagingStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<MessagingStreamTypes>>; }; groupMessaging: { name: `messagingStream:${UserGroup['id']}`; - payload: EventUnionFromDictionary<GroupMessagingStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<GroupMessagingStreamTypes>>; }; messagingIndex: { name: `messagingIndexStream:${User['id']}`; - payload: EventUnionFromDictionary<MessagingIndexStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<MessagingIndexStreamTypes>>; }; admin: { name: `adminStream:${User['id']}`; - payload: EventUnionFromDictionary<AdminStreamTypes>; + payload: EventUnionFromDictionary<SerializedAll<AdminStreamTypes>>; }; notes: { name: 'notesStream'; - payload: Packed<'Note'>; + payload: Serialized<Packed<'Note'>>; }; }; diff --git a/packages/backend/test/_e2e/api-visibility.ts b/packages/backend/test/_e2e/api-visibility.ts index 9c21840844..d29b9acb3d 100644 --- a/packages/backend/test/_e2e/api-visibility.ts +++ b/packages/backend/test/_e2e/api-visibility.ts @@ -100,90 +100,90 @@ describe('API visibility', () => { //#region show post // public - it('[show] public-postを自分が見れる', async () => { + test('[show] public-postを自分が見れる', async () => { const res = await show(pub.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] public-postをフォロワーが見れる', async () => { + test('[show] public-postをフォロワーが見れる', async () => { const res = await show(pub.id, follower); assert.strictEqual(res.body.text, 'x'); }); - it('[show] public-postを非フォロワーが見れる', async () => { + test('[show] public-postを非フォロワーが見れる', async () => { const res = await show(pub.id, other); assert.strictEqual(res.body.text, 'x'); }); - it('[show] public-postを未認証が見れる', async () => { + test('[show] public-postを未認証が見れる', async () => { const res = await show(pub.id, null); assert.strictEqual(res.body.text, 'x'); }); // home - it('[show] home-postを自分が見れる', async () => { + test('[show] home-postを自分が見れる', async () => { const res = await show(home.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] home-postをフォロワーが見れる', async () => { + test('[show] home-postをフォロワーが見れる', async () => { const res = await show(home.id, follower); assert.strictEqual(res.body.text, 'x'); }); - it('[show] home-postを非フォロワーが見れる', async () => { + test('[show] home-postを非フォロワーが見れる', async () => { const res = await show(home.id, other); assert.strictEqual(res.body.text, 'x'); }); - it('[show] home-postを未認証が見れる', async () => { + test('[show] home-postを未認証が見れる', async () => { const res = await show(home.id, null); assert.strictEqual(res.body.text, 'x'); }); // followers - it('[show] followers-postを自分が見れる', async () => { + test('[show] followers-postを自分が見れる', async () => { const res = await show(fol.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] followers-postをフォロワーが見れる', async () => { + test('[show] followers-postをフォロワーが見れる', async () => { const res = await show(fol.id, follower); assert.strictEqual(res.body.text, 'x'); }); - it('[show] followers-postを非フォロワーが見れない', async () => { + test('[show] followers-postを非フォロワーが見れない', async () => { const res = await show(fol.id, other); assert.strictEqual(res.body.isHidden, true); }); - it('[show] followers-postを未認証が見れない', async () => { + test('[show] followers-postを未認証が見れない', async () => { const res = await show(fol.id, null); assert.strictEqual(res.body.isHidden, true); }); // specified - it('[show] specified-postを自分が見れる', async () => { + test('[show] specified-postを自分が見れる', async () => { const res = await show(spe.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] specified-postを指定ユーザーが見れる', async () => { + test('[show] specified-postを指定ユーザーが見れる', async () => { const res = await show(spe.id, target); assert.strictEqual(res.body.text, 'x'); }); - it('[show] specified-postをフォロワーが見れない', async () => { + test('[show] specified-postをフォロワーが見れない', async () => { const res = await show(spe.id, follower); assert.strictEqual(res.body.isHidden, true); }); - it('[show] specified-postを非フォロワーが見れない', async () => { + test('[show] specified-postを非フォロワーが見れない', async () => { const res = await show(spe.id, other); assert.strictEqual(res.body.isHidden, true); }); - it('[show] specified-postを未認証が見れない', async () => { + test('[show] specified-postを未認証が見れない', async () => { const res = await show(spe.id, null); assert.strictEqual(res.body.isHidden, true); }); @@ -191,110 +191,110 @@ describe('API visibility', () => { //#region show reply // public - it('[show] public-replyを自分が見れる', async () => { + test('[show] public-replyを自分が見れる', async () => { const res = await show(pubR.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] public-replyをされた人が見れる', async () => { + test('[show] public-replyをされた人が見れる', async () => { const res = await show(pubR.id, target); assert.strictEqual(res.body.text, 'x'); }); - it('[show] public-replyをフォロワーが見れる', async () => { + test('[show] public-replyをフォロワーが見れる', async () => { const res = await show(pubR.id, follower); assert.strictEqual(res.body.text, 'x'); }); - it('[show] public-replyを非フォロワーが見れる', async () => { + test('[show] public-replyを非フォロワーが見れる', async () => { const res = await show(pubR.id, other); assert.strictEqual(res.body.text, 'x'); }); - it('[show] public-replyを未認証が見れる', async () => { + test('[show] public-replyを未認証が見れる', async () => { const res = await show(pubR.id, null); assert.strictEqual(res.body.text, 'x'); }); // home - it('[show] home-replyを自分が見れる', async () => { + test('[show] home-replyを自分が見れる', async () => { const res = await show(homeR.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] home-replyをされた人が見れる', async () => { + test('[show] home-replyをされた人が見れる', async () => { const res = await show(homeR.id, target); assert.strictEqual(res.body.text, 'x'); }); - it('[show] home-replyをフォロワーが見れる', async () => { + test('[show] home-replyをフォロワーが見れる', async () => { const res = await show(homeR.id, follower); assert.strictEqual(res.body.text, 'x'); }); - it('[show] home-replyを非フォロワーが見れる', async () => { + test('[show] home-replyを非フォロワーが見れる', async () => { const res = await show(homeR.id, other); assert.strictEqual(res.body.text, 'x'); }); - it('[show] home-replyを未認証が見れる', async () => { + test('[show] home-replyを未認証が見れる', async () => { const res = await show(homeR.id, null); assert.strictEqual(res.body.text, 'x'); }); // followers - it('[show] followers-replyを自分が見れる', async () => { + test('[show] followers-replyを自分が見れる', async () => { const res = await show(folR.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] followers-replyを非フォロワーでもリプライされていれば見れる', async () => { + test('[show] followers-replyを非フォロワーでもリプライされていれば見れる', async () => { const res = await show(folR.id, target); assert.strictEqual(res.body.text, 'x'); }); - it('[show] followers-replyをフォロワーが見れる', async () => { + test('[show] followers-replyをフォロワーが見れる', async () => { const res = await show(folR.id, follower); assert.strictEqual(res.body.text, 'x'); }); - it('[show] followers-replyを非フォロワーが見れない', async () => { + test('[show] followers-replyを非フォロワーが見れない', async () => { const res = await show(folR.id, other); assert.strictEqual(res.body.isHidden, true); }); - it('[show] followers-replyを未認証が見れない', async () => { + test('[show] followers-replyを未認証が見れない', async () => { const res = await show(folR.id, null); assert.strictEqual(res.body.isHidden, true); }); // specified - it('[show] specified-replyを自分が見れる', async () => { + test('[show] specified-replyを自分が見れる', async () => { const res = await show(speR.id, alice); assert.strictEqual(res.body.text, 'x'); }); - it('[show] specified-replyを指定ユーザーが見れる', async () => { + test('[show] specified-replyを指定ユーザーが見れる', async () => { const res = await show(speR.id, target); assert.strictEqual(res.body.text, 'x'); }); - it('[show] specified-replyをされた人が指定されてなくても見れる', async () => { + test('[show] specified-replyをされた人が指定されてなくても見れる', async () => { const res = await show(speR.id, target); assert.strictEqual(res.body.text, 'x'); }); - it('[show] specified-replyをフォロワーが見れない', async () => { + test('[show] specified-replyをフォロワーが見れない', async () => { const res = await show(speR.id, follower); assert.strictEqual(res.body.isHidden, true); }); - it('[show] specified-replyを非フォロワーが見れない', async () => { + test('[show] specified-replyを非フォロワーが見れない', async () => { const res = await show(speR.id, other); assert.strictEqual(res.body.isHidden, true); }); - it('[show] specified-replyを未認証が見れない', async () => { + test('[show] specified-replyを未認証が見れない', async () => { const res = await show(speR.id, null); assert.strictEqual(res.body.isHidden, true); }); @@ -302,131 +302,131 @@ describe('API visibility', () => { //#region show mention // public - it('[show] public-mentionを自分が見れる', async () => { + test('[show] public-mentionを自分が見れる', async () => { const res = await show(pubM.id, alice); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] public-mentionをされた人が見れる', async () => { + test('[show] public-mentionをされた人が見れる', async () => { const res = await show(pubM.id, target); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] public-mentionをフォロワーが見れる', async () => { + test('[show] public-mentionをフォロワーが見れる', async () => { const res = await show(pubM.id, follower); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] public-mentionを非フォロワーが見れる', async () => { + test('[show] public-mentionを非フォロワーが見れる', async () => { const res = await show(pubM.id, other); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] public-mentionを未認証が見れる', async () => { + test('[show] public-mentionを未認証が見れる', async () => { const res = await show(pubM.id, null); assert.strictEqual(res.body.text, '@target x'); }); // home - it('[show] home-mentionを自分が見れる', async () => { + test('[show] home-mentionを自分が見れる', async () => { const res = await show(homeM.id, alice); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] home-mentionをされた人が見れる', async () => { + test('[show] home-mentionをされた人が見れる', async () => { const res = await show(homeM.id, target); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] home-mentionをフォロワーが見れる', async () => { + test('[show] home-mentionをフォロワーが見れる', async () => { const res = await show(homeM.id, follower); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] home-mentionを非フォロワーが見れる', async () => { + test('[show] home-mentionを非フォロワーが見れる', async () => { const res = await show(homeM.id, other); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] home-mentionを未認証が見れる', async () => { + test('[show] home-mentionを未認証が見れる', async () => { const res = await show(homeM.id, null); assert.strictEqual(res.body.text, '@target x'); }); // followers - it('[show] followers-mentionを自分が見れる', async () => { + test('[show] followers-mentionを自分が見れる', async () => { const res = await show(folM.id, alice); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] followers-mentionをメンションされていれば非フォロワーでも見れる', async () => { + test('[show] followers-mentionをメンションされていれば非フォロワーでも見れる', async () => { const res = await show(folM.id, target); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] followers-mentionをフォロワーが見れる', async () => { + test('[show] followers-mentionをフォロワーが見れる', async () => { const res = await show(folM.id, follower); assert.strictEqual(res.body.text, '@target x'); }); - it('[show] followers-mentionを非フォロワーが見れない', async () => { + test('[show] followers-mentionを非フォロワーが見れない', async () => { const res = await show(folM.id, other); assert.strictEqual(res.body.isHidden, true); }); - it('[show] followers-mentionを未認証が見れない', async () => { + test('[show] followers-mentionを未認証が見れない', async () => { const res = await show(folM.id, null); assert.strictEqual(res.body.isHidden, true); }); // specified - it('[show] specified-mentionを自分が見れる', async () => { + test('[show] specified-mentionを自分が見れる', async () => { const res = await show(speM.id, alice); assert.strictEqual(res.body.text, '@target2 x'); }); - it('[show] specified-mentionを指定ユーザーが見れる', async () => { + test('[show] specified-mentionを指定ユーザーが見れる', async () => { const res = await show(speM.id, target); assert.strictEqual(res.body.text, '@target2 x'); }); - it('[show] specified-mentionをされた人が指定されてなかったら見れない', async () => { + test('[show] specified-mentionをされた人が指定されてなかったら見れない', async () => { const res = await show(speM.id, target2); assert.strictEqual(res.body.isHidden, true); }); - it('[show] specified-mentionをフォロワーが見れない', async () => { + test('[show] specified-mentionをフォロワーが見れない', async () => { const res = await show(speM.id, follower); assert.strictEqual(res.body.isHidden, true); }); - it('[show] specified-mentionを非フォロワーが見れない', async () => { + test('[show] specified-mentionを非フォロワーが見れない', async () => { const res = await show(speM.id, other); assert.strictEqual(res.body.isHidden, true); }); - it('[show] specified-mentionを未認証が見れない', async () => { + test('[show] specified-mentionを未認証が見れない', async () => { const res = await show(speM.id, null); assert.strictEqual(res.body.isHidden, true); }); //#endregion //#region HTL - it('[HTL] public-post が 自分が見れる', async () => { + test('[HTL] public-post が 自分が見れる', async () => { const res = await request('/notes/timeline', { limit: 100 }, alice); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === pub.id); assert.strictEqual(notes[0].text, 'x'); }); - it('[HTL] public-post が 非フォロワーから見れない', async () => { + test('[HTL] public-post が 非フォロワーから見れない', async () => { const res = await request('/notes/timeline', { limit: 100 }, other); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === pub.id); assert.strictEqual(notes.length, 0); }); - it('[HTL] followers-post が フォロワーから見れる', async () => { + test('[HTL] followers-post が フォロワーから見れる', async () => { const res = await request('/notes/timeline', { limit: 100 }, follower); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === fol.id); @@ -435,21 +435,21 @@ describe('API visibility', () => { //#endregion //#region RTL - it('[replies] followers-reply が フォロワーから見れる', async () => { + test('[replies] followers-reply が フォロワーから見れる', async () => { const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, follower); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === folR.id); assert.strictEqual(notes[0].text, 'x'); }); - it('[replies] followers-reply が 非フォロワー (リプライ先ではない) から見れない', async () => { + test('[replies] followers-reply が 非フォロワー (リプライ先ではない) から見れない', async () => { const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, other); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === folR.id); assert.strictEqual(notes.length, 0); }); - it('[replies] followers-reply が 非フォロワー (リプライ先である) から見れる', async () => { + test('[replies] followers-reply が 非フォロワー (リプライ先である) から見れる', async () => { const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, target); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === folR.id); @@ -458,14 +458,14 @@ describe('API visibility', () => { //#endregion //#region MTL - it('[mentions] followers-reply が 非フォロワー (リプライ先である) から見れる', async () => { + test('[mentions] followers-reply が 非フォロワー (リプライ先である) から見れる', async () => { const res = await request('/notes/mentions', { limit: 100 }, target); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === folR.id); assert.strictEqual(notes[0].text, 'x'); }); - it('[mentions] followers-mention が 非フォロワー (メンション先である) から見れる', async () => { + test('[mentions] followers-mention が 非フォロワー (メンション先である) から見れる', async () => { const res = await request('/notes/mentions', { limit: 100 }, target); assert.strictEqual(res.status, 200); const notes = res.body.filter((n: any) => n.id === folM.id); diff --git a/packages/backend/test/_e2e/api.ts b/packages/backend/test/_e2e/api.ts index 3c08022031..7542c34db0 100644 --- a/packages/backend/test/_e2e/api.ts +++ b/packages/backend/test/_e2e/api.ts @@ -22,7 +22,7 @@ describe('API', () => { }); describe('General validation', () => { - it('wrong type', async(async () => { + test('wrong type', async(async () => { const res = await request('/test', { required: true, string: 42, @@ -30,14 +30,14 @@ describe('API', () => { assert.strictEqual(res.status, 400); })); - it('missing require param', async(async () => { + test('missing require param', async(async () => { const res = await request('/test', { string: 'a', }); assert.strictEqual(res.status, 400); })); - it('invalid misskey:id (empty string)', async(async () => { + test('invalid misskey:id (empty string)', async(async () => { const res = await request('/test', { required: true, id: '', @@ -45,7 +45,7 @@ describe('API', () => { assert.strictEqual(res.status, 400); })); - it('valid misskey:id', async(async () => { + test('valid misskey:id', async(async () => { const res = await request('/test', { required: true, id: '8wvhjghbxu', @@ -53,7 +53,7 @@ describe('API', () => { assert.strictEqual(res.status, 200); })); - it('default value', async(async () => { + test('default value', async(async () => { const res = await request('/test', { required: true, string: 'a', @@ -62,7 +62,7 @@ describe('API', () => { assert.strictEqual(res.body.default, 'hello'); })); - it('can set null even if it has default value', async(async () => { + test('can set null even if it has default value', async(async () => { const res = await request('/test', { required: true, nullableDefault: null, @@ -71,7 +71,7 @@ describe('API', () => { assert.strictEqual(res.body.nullableDefault, null); })); - it('cannot set undefined if it has default value', async(async () => { + test('cannot set undefined if it has default value', async(async () => { const res = await request('/test', { required: true, nullableDefault: undefined, diff --git a/packages/backend/test/_e2e/block.ts b/packages/backend/test/_e2e/block.ts index bb31983a32..c5f43e153c 100644 --- a/packages/backend/test/_e2e/block.ts +++ b/packages/backend/test/_e2e/block.ts @@ -23,7 +23,7 @@ describe('Block', () => { await shutdownServer(p); }); - it('Block作成', async () => { + test('Block作成', async () => { const res = await request('/blocking/create', { userId: bob.id, }, alice); @@ -31,14 +31,14 @@ describe('Block', () => { assert.strictEqual(res.status, 200); }); - it('ブロックされているユーザーをフォローできない', async () => { + test('ブロックされているユーザーをフォローできない', async () => { const res = await request('/following/create', { userId: alice.id }, bob); assert.strictEqual(res.status, 400); assert.strictEqual(res.body.error.id, 'c4ab57cc-4e41-45e9-bfd9-584f61e35ce0'); }); - it('ブロックされているユーザーにリアクションできない', async () => { + test('ブロックされているユーザーにリアクションできない', async () => { const note = await post(alice, { text: 'hello' }); const res = await request('/notes/reactions/create', { noteId: note.id, reaction: '👍' }, bob); @@ -47,7 +47,7 @@ describe('Block', () => { assert.strictEqual(res.body.error.id, '20ef5475-9f38-4e4c-bd33-de6d979498ec'); }); - it('ブロックされているユーザーに返信できない', async () => { + test('ブロックされているユーザーに返信できない', async () => { const note = await post(alice, { text: 'hello' }); const res = await request('/notes/create', { replyId: note.id, text: 'yo' }, bob); @@ -56,7 +56,7 @@ describe('Block', () => { assert.strictEqual(res.body.error.id, 'b390d7e1-8a5e-46ed-b625-06271cafd3d3'); }); - it('ブロックされているユーザーのノートをRenoteできない', async () => { + test('ブロックされているユーザーのノートをRenoteできない', async () => { const note = await post(alice, { text: 'hello' }); const res = await request('/notes/create', { renoteId: note.id, text: 'yo' }, bob); @@ -69,7 +69,7 @@ describe('Block', () => { // TODO: ユーザーリストから除外されるテスト - it('タイムライン(LTL)にブロックされているユーザーの投稿が含まれない', async () => { + test('タイムライン(LTL)にブロックされているユーザーの投稿が含まれない', async () => { const aliceNote = await post(alice); const bobNote = await post(bob); const carolNote = await post(carol); diff --git a/packages/backend/test/_e2e/endpoints.ts b/packages/backend/test/_e2e/endpoints.ts index 05b74a65d4..ea8433dfa2 100644 --- a/packages/backend/test/_e2e/endpoints.ts +++ b/packages/backend/test/_e2e/endpoints.ts @@ -22,7 +22,7 @@ describe('Endpoints', () => { }); describe('signup', () => { - it('不正なユーザー名でアカウントが作成できない', async () => { + test('不正なユーザー名でアカウントが作成できない', async () => { const res = await request('api/signup', { username: 'test.', password: 'test', @@ -30,7 +30,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('空のパスワードでアカウントが作成できない', async () => { + test('空のパスワードでアカウントが作成できない', async () => { const res = await request('api/signup', { username: 'test', password: '', @@ -38,7 +38,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('正しくアカウントが作成できる', async () => { + test('正しくアカウントが作成できる', async () => { const me = { username: 'test1', password: 'test1', @@ -51,7 +51,7 @@ describe('Endpoints', () => { assert.strictEqual(res.body.username, me.username); }); - it('同じユーザー名のアカウントは作成できない', async () => { + test('同じユーザー名のアカウントは作成できない', async () => { const res = await request('api/signup', { username: 'test1', password: 'test1', @@ -62,7 +62,7 @@ describe('Endpoints', () => { }); describe('signin', () => { - it('間違ったパスワードでサインインできない', async () => { + test('間違ったパスワードでサインインできない', async () => { const res = await request('api/signin', { username: 'test1', password: 'bar', @@ -71,7 +71,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 403); }); - it('クエリをインジェクションできない', async () => { + test('クエリをインジェクションできない', async () => { const res = await request('api/signin', { username: 'test1', password: { @@ -82,7 +82,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('正しい情報でサインインできる', async () => { + test('正しい情報でサインインできる', async () => { const res = await request('api/signin', { username: 'test1', password: 'test1', @@ -93,7 +93,7 @@ describe('Endpoints', () => { }); describe('i/update', () => { - it('アカウント設定を更新できる', async () => { + test('アカウント設定を更新できる', async () => { const myName = '大室櫻子'; const myLocation = '七森中'; const myBirthday = '2000-09-07'; @@ -111,14 +111,14 @@ describe('Endpoints', () => { assert.strictEqual(res.body.birthday, myBirthday); }); - it('名前を空白にできない', async () => { + test('名前を空白にできない', async () => { const res = await api('/i/update', { name: ' ', }, alice); assert.strictEqual(res.status, 400); }); - it('誕生日の設定を削除できる', async () => { + test('誕生日の設定を削除できる', async () => { await api('/i/update', { birthday: '2000-09-07', }, alice); @@ -132,7 +132,7 @@ describe('Endpoints', () => { assert.strictEqual(res.body.birthday, null); }); - it('不正な誕生日の形式で怒られる', async () => { + test('不正な誕生日の形式で怒られる', async () => { const res = await api('/i/update', { birthday: '2000/09/07', }, alice); @@ -141,7 +141,7 @@ describe('Endpoints', () => { }); describe('users/show', () => { - it('ユーザーが取得できる', async () => { + test('ユーザーが取得できる', async () => { const res = await api('/users/show', { userId: alice.id, }, alice); @@ -151,14 +151,14 @@ describe('Endpoints', () => { assert.strictEqual(res.body.id, alice.id); }); - it('ユーザーが存在しなかったら怒る', async () => { + test('ユーザーが存在しなかったら怒る', async () => { const res = await api('/users/show', { userId: '000000000000000000000000', }); assert.strictEqual(res.status, 400); }); - it('間違ったIDで怒られる', async () => { + test('間違ったIDで怒られる', async () => { const res = await api('/users/show', { userId: 'kyoppie', }); @@ -167,7 +167,7 @@ describe('Endpoints', () => { }); describe('notes/show', () => { - it('投稿が取得できる', async () => { + test('投稿が取得できる', async () => { const myPost = await post(alice, { text: 'test', }); @@ -182,14 +182,14 @@ describe('Endpoints', () => { assert.strictEqual(res.body.text, myPost.text); }); - it('投稿が存在しなかったら怒る', async () => { + test('投稿が存在しなかったら怒る', async () => { const res = await api('/notes/show', { noteId: '000000000000000000000000', }); assert.strictEqual(res.status, 400); }); - it('間違ったIDで怒られる', async () => { + test('間違ったIDで怒られる', async () => { const res = await api('/notes/show', { noteId: 'kyoppie', }); @@ -198,7 +198,7 @@ describe('Endpoints', () => { }); describe('notes/reactions/create', () => { - it('リアクションできる', async () => { + test('リアクションできる', async () => { const bobPost = await post(bob); const alice = await signup({ username: 'alice' }); @@ -217,7 +217,7 @@ describe('Endpoints', () => { assert.strictEqual(resNote.body.reactions['🚀'], [alice.id]); }); - it('自分の投稿にもリアクションできる', async () => { + test('自分の投稿にもリアクションできる', async () => { const myPost = await post(alice); const res = await api('/notes/reactions/create', { @@ -228,7 +228,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 204); }); - it('二重にリアクションできない', async () => { + test('二重にリアクションできない', async () => { const bobPost = await post(bob); await api('/notes/reactions/create', { @@ -244,7 +244,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('存在しない投稿にはリアクションできない', async () => { + test('存在しない投稿にはリアクションできない', async () => { const res = await api('/notes/reactions/create', { noteId: '000000000000000000000000', reaction: '🚀', @@ -253,13 +253,13 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('空のパラメータで怒られる', async () => { + test('空のパラメータで怒られる', async () => { const res = await api('/notes/reactions/create', {}, alice); assert.strictEqual(res.status, 400); }); - it('間違ったIDで怒られる', async () => { + test('間違ったIDで怒られる', async () => { const res = await api('/notes/reactions/create', { noteId: 'kyoppie', reaction: '🚀', @@ -270,7 +270,7 @@ describe('Endpoints', () => { }); describe('following/create', () => { - it('フォローできる', async () => { + test('フォローできる', async () => { const res = await api('/following/create', { userId: alice.id, }, bob); @@ -278,7 +278,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 200); }); - it('既にフォローしている場合は怒る', async () => { + test('既にフォローしている場合は怒る', async () => { const res = await api('/following/create', { userId: alice.id, }, bob); @@ -286,7 +286,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('存在しないユーザーはフォローできない', async () => { + test('存在しないユーザーはフォローできない', async () => { const res = await api('/following/create', { userId: '000000000000000000000000', }, alice); @@ -294,7 +294,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('自分自身はフォローできない', async () => { + test('自分自身はフォローできない', async () => { const res = await api('/following/create', { userId: alice.id, }, alice); @@ -302,13 +302,13 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('空のパラメータで怒られる', async () => { + test('空のパラメータで怒られる', async () => { const res = await api('/following/create', {}, alice); assert.strictEqual(res.status, 400); }); - it('間違ったIDで怒られる', async () => { + test('間違ったIDで怒られる', async () => { const res = await api('/following/create', { userId: 'foo', }, alice); @@ -318,7 +318,7 @@ describe('Endpoints', () => { }); describe('following/delete', () => { - it('フォロー解除できる', async () => { + test('フォロー解除できる', async () => { await api('/following/create', { userId: alice.id, }, bob); @@ -330,7 +330,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 200); }); - it('フォローしていない場合は怒る', async () => { + test('フォローしていない場合は怒る', async () => { const res = await api('/following/delete', { userId: alice.id, }, bob); @@ -338,7 +338,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('存在しないユーザーはフォロー解除できない', async () => { + test('存在しないユーザーはフォロー解除できない', async () => { const res = await api('/following/delete', { userId: '000000000000000000000000', }, alice); @@ -346,7 +346,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('自分自身はフォロー解除できない', async () => { + test('自分自身はフォロー解除できない', async () => { const res = await api('/following/delete', { userId: alice.id, }, alice); @@ -354,13 +354,13 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 400); }); - it('空のパラメータで怒られる', async () => { + test('空のパラメータで怒られる', async () => { const res = await api('/following/delete', {}, alice); assert.strictEqual(res.status, 400); }); - it('間違ったIDで怒られる', async () => { + test('間違ったIDで怒られる', async () => { const res = await api('/following/delete', { userId: 'kyoppie', }, alice); @@ -371,7 +371,7 @@ describe('Endpoints', () => { /* describe('/i', () => { - it('', async () => { + test('', async () => { }); }); */ @@ -402,7 +402,7 @@ describe('API: Endpoints', () => { }); describe('drive', () => { - it('ドライブ情報を取得できる', async () => { + test('ドライブ情報を取得できる', async () => { await uploadFile({ userId: alice.id, size: 256 @@ -423,7 +423,7 @@ describe('API: Endpoints', () => { }); describe('drive/files/create', () => { - it('ファイルを作成できる', async () => { + test('ファイルを作成できる', async () => { const res = await uploadFile(alice); assert.strictEqual(res.status, 200); @@ -431,7 +431,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.name, 'Lenna.png'); })); - it('ファイルに名前を付けられる', async () => { + test('ファイルに名前を付けられる', async () => { const res = await assert.request(server) .post('/drive/files/create') .field('i', alice.token) @@ -443,13 +443,13 @@ describe('API: Endpoints', () => { expect(res.body).have.property('name').eql('Belmond.png'); })); - it('ファイル無しで怒られる', async () => { + test('ファイル無しで怒られる', async () => { const res = await api('/drive/files/create', {}, alice); assert.strictEqual(res.status, 400); })); - it('SVGファイルを作成できる', async () => { + test('SVGファイルを作成できる', async () => { const res = await uploadFile(alice, __dirname + '/resources/image.svg'); assert.strictEqual(res.status, 200); @@ -460,7 +460,7 @@ describe('API: Endpoints', () => { }); describe('drive/files/update', () => { - it('名前を更新できる', async () => { + test('名前を更新できる', async () => { const file = await uploadFile(alice); const newName = 'いちごパスタ.png'; @@ -474,7 +474,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.name, newName); })); - it('他人のファイルは更新できない', async () => { + test('他人のファイルは更新できない', async () => { const file = await uploadFile(bob); const res = await api('/drive/files/update', { @@ -485,7 +485,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('親フォルダを更新できる', async () => { + test('親フォルダを更新できる', async () => { const file = await uploadFile(alice); const folder = (await api('/drive/folders/create', { name: 'test' @@ -501,7 +501,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.folderId, folder.id); })); - it('親フォルダを無しにできる', async () => { + test('親フォルダを無しにできる', async () => { const file = await uploadFile(alice); const folder = (await api('/drive/folders/create', { @@ -523,7 +523,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.folderId, null); })); - it('他人のフォルダには入れられない', async () => { + test('他人のフォルダには入れられない', async () => { const file = await uploadFile(alice); const folder = (await api('/drive/folders/create', { name: 'test' @@ -537,7 +537,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('存在しないフォルダで怒られる', async () => { + test('存在しないフォルダで怒られる', async () => { const file = await uploadFile(alice); const res = await api('/drive/files/update', { @@ -548,7 +548,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('不正なフォルダIDで怒られる', async () => { + test('不正なフォルダIDで怒られる', async () => { const file = await uploadFile(alice); const res = await api('/drive/files/update', { @@ -559,7 +559,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('ファイルが存在しなかったら怒る', async () => { + test('ファイルが存在しなかったら怒る', async () => { const res = await api('/drive/files/update', { fileId: '000000000000000000000000', name: 'いちごパスタ.png' @@ -568,7 +568,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('間違ったIDで怒られる', async () => { + test('間違ったIDで怒られる', async () => { const res = await api('/drive/files/update', { fileId: 'kyoppie', name: 'いちごパスタ.png' @@ -579,7 +579,7 @@ describe('API: Endpoints', () => { }); describe('drive/folders/create', () => { - it('フォルダを作成できる', async () => { + test('フォルダを作成できる', async () => { const res = await api('/drive/folders/create', { name: 'test' }, alice); @@ -591,7 +591,7 @@ describe('API: Endpoints', () => { }); describe('drive/folders/update', () => { - it('名前を更新できる', async () => { + test('名前を更新できる', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -606,7 +606,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.name, 'new name'); })); - it('他人のフォルダを更新できない', async () => { + test('他人のフォルダを更新できない', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, bob)).body; @@ -619,7 +619,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('親フォルダを更新できる', async () => { + test('親フォルダを更新できる', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -637,7 +637,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.parentId, parentFolder.id); })); - it('親フォルダを無しに更新できる', async () => { + test('親フォルダを無しに更新できる', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -659,7 +659,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.parentId, null); })); - it('他人のフォルダを親フォルダに設定できない', async () => { + test('他人のフォルダを親フォルダに設定できない', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -675,7 +675,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('フォルダが循環するような構造にできない', async () => { + test('フォルダが循環するような構造にできない', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -695,7 +695,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('フォルダが循環するような構造にできない(再帰的)', async () => { + test('フォルダが循環するような構造にできない(再帰的)', async () => { const folderA = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -722,7 +722,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('フォルダが循環するような構造にできない(自身)', async () => { + test('フォルダが循環するような構造にできない(自身)', async () => { const folderA = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -735,7 +735,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('存在しない親フォルダを設定できない', async () => { + test('存在しない親フォルダを設定できない', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -748,7 +748,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('不正な親フォルダIDで怒られる', async () => { + test('不正な親フォルダIDで怒られる', async () => { const folder = (await api('/drive/folders/create', { name: 'test' }, alice)).body; @@ -761,7 +761,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('存在しないフォルダを更新できない', async () => { + test('存在しないフォルダを更新できない', async () => { const res = await api('/drive/folders/update', { folderId: '000000000000000000000000' }, alice); @@ -769,7 +769,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('不正なフォルダIDで怒られる', async () => { + test('不正なフォルダIDで怒られる', async () => { const res = await api('/drive/folders/update', { folderId: 'foo' }, alice); @@ -779,7 +779,7 @@ describe('API: Endpoints', () => { }); describe('messaging/messages/create', () => { - it('メッセージを送信できる', async () => { + test('メッセージを送信できる', async () => { const res = await api('/messaging/messages/create', { userId: bob.id, text: 'test' @@ -790,7 +790,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.body.text, 'test'); })); - it('自分自身にはメッセージを送信できない', async () => { + test('自分自身にはメッセージを送信できない', async () => { const res = await api('/messaging/messages/create', { userId: alice.id, text: 'Yo' @@ -799,7 +799,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('存在しないユーザーにはメッセージを送信できない', async () => { + test('存在しないユーザーにはメッセージを送信できない', async () => { const res = await api('/messaging/messages/create', { userId: '000000000000000000000000', text: 'test' @@ -808,7 +808,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('不正なユーザーIDで怒られる', async () => { + test('不正なユーザーIDで怒られる', async () => { const res = await api('/messaging/messages/create', { userId: 'foo', text: 'test' @@ -817,7 +817,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('テキストが無くて怒られる', async () => { + test('テキストが無くて怒られる', async () => { const res = await api('/messaging/messages/create', { userId: bob.id }, alice); @@ -825,7 +825,7 @@ describe('API: Endpoints', () => { assert.strictEqual(res.status, 400); })); - it('文字数オーバーで怒られる', async () => { + test('文字数オーバーで怒られる', async () => { const res = await api('/messaging/messages/create', { userId: bob.id, text: '!'.repeat(1001) @@ -836,7 +836,7 @@ describe('API: Endpoints', () => { }); describe('notes/replies', () => { - it('自分に閲覧権限のない投稿は含まれない', async () => { + test('自分に閲覧権限のない投稿は含まれない', async () => { const alicePost = await post(alice, { text: 'foo' }); @@ -859,7 +859,7 @@ describe('API: Endpoints', () => { }); describe('notes/timeline', () => { - it('フォロワー限定投稿が含まれる', async () => { + test('フォロワー限定投稿が含まれる', async () => { await api('/following/create', { userId: alice.id }, bob); diff --git a/packages/backend/test/_e2e/fetch-resource.ts b/packages/backend/test/_e2e/fetch-resource.ts index 344022dec7..7ae133496a 100644 --- a/packages/backend/test/_e2e/fetch-resource.ts +++ b/packages/backend/test/_e2e/fetch-resource.ts @@ -35,38 +35,38 @@ describe('Fetch resource', () => { }); describe('Common', () => { - it('meta', async () => { + test('meta', async () => { const res = await request('/meta', { }); assert.strictEqual(res.status, 200); }); - it('GET root', async () => { + test('GET root', async () => { const res = await simpleGet('/'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, HTML); }); - it('GET docs', async () => { + test('GET docs', async () => { const res = await simpleGet('/docs/ja-JP/about'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, HTML); }); - it('GET api-doc', async () => { + test('GET api-doc', async () => { const res = await simpleGet('/api-doc'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, HTML); }); - it('GET api.json', async () => { + test('GET api.json', async () => { const res = await simpleGet('/api.json'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, JSON); }); - it('Validate api.json', async () => { + test('Validate api.json', async () => { const config = await openapi.loadConfig(); const result = await openapi.bundle({ config, @@ -80,25 +80,25 @@ describe('Fetch resource', () => { assert.strictEqual(result.problems.length, 0); }); - it('GET favicon.ico', async () => { + test('GET favicon.ico', async () => { const res = await simpleGet('/favicon.ico'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, 'image/x-icon'); }); - it('GET apple-touch-icon.png', async () => { + test('GET apple-touch-icon.png', async () => { const res = await simpleGet('/apple-touch-icon.png'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, 'image/png'); }); - it('GET twemoji svg', async () => { + test('GET twemoji svg', async () => { const res = await simpleGet('/twemoji/2764.svg'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, 'image/svg+xml'); }); - it('GET twemoji svg with hyphen', async () => { + test('GET twemoji svg with hyphen', async () => { const res = await simpleGet('/twemoji/2764-fe0f-200d-1f525.svg'); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, 'image/svg+xml'); @@ -106,25 +106,25 @@ describe('Fetch resource', () => { }); describe('/@:username', () => { - it('Only AP => AP', async () => { + test('Only AP => AP', async () => { const res = await simpleGet(`/@${alice.username}`, ONLY_AP); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, AP); }); - it('Prefer AP => AP', async () => { + test('Prefer AP => AP', async () => { const res = await simpleGet(`/@${alice.username}`, PREFER_AP); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, AP); }); - it('Prefer HTML => HTML', async () => { + test('Prefer HTML => HTML', async () => { const res = await simpleGet(`/@${alice.username}`, PREFER_HTML); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, HTML); }); - it('Unspecified => HTML', async () => { + test('Unspecified => HTML', async () => { const res = await simpleGet(`/@${alice.username}`, UNSPECIFIED); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, HTML); @@ -132,25 +132,25 @@ describe('Fetch resource', () => { }); describe('/users/:id', () => { - it('Only AP => AP', async () => { + test('Only AP => AP', async () => { const res = await simpleGet(`/users/${alice.id}`, ONLY_AP); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, AP); }); - it('Prefer AP => AP', async () => { + test('Prefer AP => AP', async () => { const res = await simpleGet(`/users/${alice.id}`, PREFER_AP); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, AP); }); - it('Prefer HTML => Redirect to /@:username', async () => { + test('Prefer HTML => Redirect to /@:username', async () => { const res = await simpleGet(`/users/${alice.id}`, PREFER_HTML); assert.strictEqual(res.status, 302); assert.strictEqual(res.location, `/@${alice.username}`); }); - it('Undecided => HTML', async () => { + test('Undecided => HTML', async () => { const res = await simpleGet(`/users/${alice.id}`, UNSPECIFIED); assert.strictEqual(res.status, 302); assert.strictEqual(res.location, `/@${alice.username}`); @@ -158,25 +158,25 @@ describe('Fetch resource', () => { }); describe('/notes/:id', () => { - it('Only AP => AP', async () => { + test('Only AP => AP', async () => { const res = await simpleGet(`/notes/${alicesPost.id}`, ONLY_AP); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, AP); }); - it('Prefer AP => AP', async () => { + test('Prefer AP => AP', async () => { const res = await simpleGet(`/notes/${alicesPost.id}`, PREFER_AP); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, AP); }); - it('Prefer HTML => HTML', async () => { + test('Prefer HTML => HTML', async () => { const res = await simpleGet(`/notes/${alicesPost.id}`, PREFER_HTML); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, HTML); }); - it('Unspecified => HTML', async () => { + test('Unspecified => HTML', async () => { const res = await simpleGet(`/notes/${alicesPost.id}`, UNSPECIFIED); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, HTML); @@ -184,19 +184,19 @@ describe('Fetch resource', () => { }); describe('Feeds', () => { - it('RSS', async () => { + test('RSS', async () => { const res = await simpleGet(`/@${alice.username}.rss`, UNSPECIFIED); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, 'application/rss+xml; charset=utf-8'); }); - it('ATOM', async () => { + test('ATOM', async () => { const res = await simpleGet(`/@${alice.username}.atom`, UNSPECIFIED); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, 'application/atom+xml; charset=utf-8'); }); - it('JSON', async () => { + test('JSON', async () => { const res = await simpleGet(`/@${alice.username}.json`, UNSPECIFIED); assert.strictEqual(res.status, 200); assert.strictEqual(res.type, 'application/json; charset=utf-8'); diff --git a/packages/backend/test/_e2e/ff-visibility.ts b/packages/backend/test/_e2e/ff-visibility.ts index 38be0eba24..84a5b5ef28 100644 --- a/packages/backend/test/_e2e/ff-visibility.ts +++ b/packages/backend/test/_e2e/ff-visibility.ts @@ -22,7 +22,7 @@ describe('FF visibility', () => { await shutdownServer(p); }); - it('ffVisibility が public なユーザーのフォロー/フォロワーを誰でも見れる', async () => { + test('ffVisibility が public なユーザーのフォロー/フォロワーを誰でも見れる', async () => { await request('/i/update', { ffVisibility: 'public', }, alice); @@ -40,7 +40,7 @@ describe('FF visibility', () => { assert.strictEqual(Array.isArray(followersRes.body), true); }); - it('ffVisibility が followers なユーザーのフォロー/フォロワーを自分で見れる', async () => { + test('ffVisibility が followers なユーザーのフォロー/フォロワーを自分で見れる', async () => { await request('/i/update', { ffVisibility: 'followers', }, alice); @@ -58,7 +58,7 @@ describe('FF visibility', () => { assert.strictEqual(Array.isArray(followersRes.body), true); }); - it('ffVisibility が followers なユーザーのフォロー/フォロワーを非フォロワーが見れない', async () => { + test('ffVisibility が followers なユーザーのフォロー/フォロワーを非フォロワーが見れない', async () => { await request('/i/update', { ffVisibility: 'followers', }, alice); @@ -74,7 +74,7 @@ describe('FF visibility', () => { assert.strictEqual(followersRes.status, 400); }); - it('ffVisibility が followers なユーザーのフォロー/フォロワーをフォロワーが見れる', async () => { + test('ffVisibility が followers なユーザーのフォロー/フォロワーをフォロワーが見れる', async () => { await request('/i/update', { ffVisibility: 'followers', }, alice); @@ -96,7 +96,7 @@ describe('FF visibility', () => { assert.strictEqual(Array.isArray(followersRes.body), true); }); - it('ffVisibility が private なユーザーのフォロー/フォロワーを自分で見れる', async () => { + test('ffVisibility が private なユーザーのフォロー/フォロワーを自分で見れる', async () => { await request('/i/update', { ffVisibility: 'private', }, alice); @@ -114,7 +114,7 @@ describe('FF visibility', () => { assert.strictEqual(Array.isArray(followersRes.body), true); }); - it('ffVisibility が private なユーザーのフォロー/フォロワーを他人が見れない', async () => { + test('ffVisibility が private なユーザーのフォロー/フォロワーを他人が見れない', async () => { await request('/i/update', { ffVisibility: 'private', }, alice); @@ -131,7 +131,7 @@ describe('FF visibility', () => { }); describe('AP', () => { - it('ffVisibility が public 以外ならばAPからは取得できない', async () => { + test('ffVisibility が public 以外ならばAPからは取得できない', async () => { { await request('/i/update', { ffVisibility: 'public', diff --git a/packages/backend/test/_e2e/mute.ts b/packages/backend/test/_e2e/mute.ts index 2313773678..8f7f72bb97 100644 --- a/packages/backend/test/_e2e/mute.ts +++ b/packages/backend/test/_e2e/mute.ts @@ -23,7 +23,7 @@ describe('Mute', () => { await shutdownServer(p); }); - it('ミュート作成', async () => { + test('ミュート作成', async () => { const res = await request('/mute/create', { userId: carol.id, }, alice); @@ -31,7 +31,7 @@ describe('Mute', () => { assert.strictEqual(res.status, 204); }); - it('「自分宛ての投稿」にミュートしているユーザーの投稿が含まれない', async () => { + test('「自分宛ての投稿」にミュートしているユーザーの投稿が含まれない', async () => { const bobNote = await post(bob, { text: '@alice hi' }); const carolNote = await post(carol, { text: '@alice hi' }); @@ -43,7 +43,7 @@ describe('Mute', () => { assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false); }); - it('ミュートしているユーザーからメンションされても、hasUnreadMentions が true にならない', async () => { + test('ミュートしているユーザーからメンションされても、hasUnreadMentions が true にならない', async () => { // 状態リセット await request('/i/read-all-unread-notes', {}, alice); @@ -55,7 +55,7 @@ describe('Mute', () => { assert.strictEqual(res.body.hasUnreadMentions, false); }); - it('ミュートしているユーザーからメンションされても、ストリームに unreadMention イベントが流れてこない', async () => { + test('ミュートしているユーザーからメンションされても、ストリームに unreadMention イベントが流れてこない', async () => { // 状態リセット await request('/i/read-all-unread-notes', {}, alice); @@ -64,7 +64,7 @@ describe('Mute', () => { assert.strictEqual(fired, false); }); - it('ミュートしているユーザーからメンションされても、ストリームに unreadNotification イベントが流れてこない', async () => { + test('ミュートしているユーザーからメンションされても、ストリームに unreadNotification イベントが流れてこない', async () => { // 状態リセット await request('/i/read-all-unread-notes', {}, alice); await request('/notifications/mark-all-as-read', {}, alice); @@ -75,7 +75,7 @@ describe('Mute', () => { }); describe('Timeline', () => { - it('タイムラインにミュートしているユーザーの投稿が含まれない', async () => { + test('タイムラインにミュートしているユーザーの投稿が含まれない', async () => { const aliceNote = await post(alice); const bobNote = await post(bob); const carolNote = await post(carol); @@ -89,7 +89,7 @@ describe('Mute', () => { assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false); }); - it('タイムラインにミュートしているユーザーの投稿のRenoteが含まれない', async () => { + test('タイムラインにミュートしているユーザーの投稿のRenoteが含まれない', async () => { const aliceNote = await post(alice); const carolNote = await post(carol); const bobNote = await post(bob, { @@ -107,7 +107,7 @@ describe('Mute', () => { }); describe('Notification', () => { - it('通知にミュートしているユーザーの通知が含まれない(リアクション)', async () => { + test('通知にミュートしているユーザーの通知が含まれない(リアクション)', async () => { const aliceNote = await post(alice); await react(bob, aliceNote, 'like'); await react(carol, aliceNote, 'like'); diff --git a/packages/backend/test/_e2e/note.ts b/packages/backend/test/_e2e/note.ts index d75a5c8285..47af6808f6 100644 --- a/packages/backend/test/_e2e/note.ts +++ b/packages/backend/test/_e2e/note.ts @@ -24,7 +24,7 @@ describe('Note', () => { await shutdownServer(p); }); - it('投稿できる', async () => { + test('投稿できる', async () => { const post = { text: 'test', }; @@ -36,7 +36,7 @@ describe('Note', () => { assert.strictEqual(res.body.createdNote.text, post.text); }); - it('ファイルを添付できる', async () => { + test('ファイルを添付できる', async () => { const file = await uploadUrl(alice, 'https://raw.githubusercontent.com/misskey-dev/misskey/develop/packages/backend/test/resources/Lenna.jpg'); const res = await request('/notes/create', { @@ -48,7 +48,7 @@ describe('Note', () => { assert.deepStrictEqual(res.body.createdNote.fileIds, [file.id]); }, 1000 * 10); - it('他人のファイルは無視', async () => { + test('他人のファイルは無視', async () => { const file = await uploadUrl(bob, 'https://raw.githubusercontent.com/misskey-dev/misskey/develop/packages/backend/test/resources/Lenna.jpg'); const res = await request('/notes/create', { @@ -61,7 +61,7 @@ describe('Note', () => { assert.deepStrictEqual(res.body.createdNote.fileIds, []); }, 1000 * 10); - it('存在しないファイルは無視', async () => { + test('存在しないファイルは無視', async () => { const res = await request('/notes/create', { text: 'test', fileIds: ['000000000000000000000000'], @@ -72,7 +72,7 @@ describe('Note', () => { assert.deepStrictEqual(res.body.createdNote.fileIds, []); }); - it('不正なファイルIDは無視', async () => { + test('不正なファイルIDは無視', async () => { const res = await request('/notes/create', { fileIds: ['kyoppie'], }, alice); @@ -81,7 +81,7 @@ describe('Note', () => { assert.deepStrictEqual(res.body.createdNote.fileIds, []); }); - it('返信できる', async () => { + test('返信できる', async () => { const bobPost = await post(bob, { text: 'foo', }); @@ -100,7 +100,7 @@ describe('Note', () => { assert.strictEqual(res.body.createdNote.reply.text, bobPost.text); }); - it('renoteできる', async () => { + test('renoteできる', async () => { const bobPost = await post(bob, { text: 'test', }); @@ -117,7 +117,7 @@ describe('Note', () => { assert.strictEqual(res.body.createdNote.renote.text, bobPost.text); }); - it('引用renoteできる', async () => { + test('引用renoteできる', async () => { const bobPost = await post(bob, { text: 'test', }); @@ -136,7 +136,7 @@ describe('Note', () => { assert.strictEqual(res.body.createdNote.renote.text, bobPost.text); }); - it('文字数ぎりぎりで怒られない', async () => { + test('文字数ぎりぎりで怒られない', async () => { const post = { text: '!'.repeat(3000), }; @@ -144,7 +144,7 @@ describe('Note', () => { assert.strictEqual(res.status, 200); }); - it('文字数オーバーで怒られる', async () => { + test('文字数オーバーで怒られる', async () => { const post = { text: '!'.repeat(3001), }; @@ -152,7 +152,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('存在しないリプライ先で怒られる', async () => { + test('存在しないリプライ先で怒られる', async () => { const post = { text: 'test', replyId: '000000000000000000000000', @@ -161,7 +161,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('存在しないrenote対象で怒られる', async () => { + test('存在しないrenote対象で怒られる', async () => { const post = { renoteId: '000000000000000000000000', }; @@ -169,7 +169,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('不正なリプライ先IDで怒られる', async () => { + test('不正なリプライ先IDで怒られる', async () => { const post = { text: 'test', replyId: 'foo', @@ -178,7 +178,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('不正なrenote対象IDで怒られる', async () => { + test('不正なrenote対象IDで怒られる', async () => { const post = { renoteId: 'foo', }; @@ -186,7 +186,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('存在しないユーザーにメンションできる', async () => { + test('存在しないユーザーにメンションできる', async () => { const post = { text: '@ghost yo', }; @@ -198,7 +198,7 @@ describe('Note', () => { assert.strictEqual(res.body.createdNote.text, post.text); }); - it('同じユーザーに複数メンションしても内部的にまとめられる', async () => { + test('同じユーザーに複数メンションしても内部的にまとめられる', async () => { const post = { text: '@bob @bob @bob yo', }; @@ -214,7 +214,7 @@ describe('Note', () => { }); describe('notes/create', () => { - it('投票を添付できる', async () => { + test('投票を添付できる', async () => { const res = await request('/notes/create', { text: 'test', poll: { @@ -227,14 +227,14 @@ describe('Note', () => { assert.strictEqual(res.body.createdNote.poll != null, true); }); - it('投票の選択肢が無くて怒られる', async () => { + test('投票の選択肢が無くて怒られる', async () => { const res = await request('/notes/create', { poll: {}, }, alice); assert.strictEqual(res.status, 400); }); - it('投票の選択肢が無くて怒られる (空の配列)', async () => { + test('投票の選択肢が無くて怒られる (空の配列)', async () => { const res = await request('/notes/create', { poll: { choices: [], @@ -243,7 +243,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('投票の選択肢が1つで怒られる', async () => { + test('投票の選択肢が1つで怒られる', async () => { const res = await request('/notes/create', { poll: { choices: ['Strawberry Pasta'], @@ -252,7 +252,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('投票できる', async () => { + test('投票できる', async () => { const { body } = await request('/notes/create', { text: 'test', poll: { @@ -268,7 +268,7 @@ describe('Note', () => { assert.strictEqual(res.status, 204); }); - it('複数投票できない', async () => { + test('複数投票できない', async () => { const { body } = await request('/notes/create', { text: 'test', poll: { @@ -289,7 +289,7 @@ describe('Note', () => { assert.strictEqual(res.status, 400); }); - it('許可されている場合は複数投票できる', async () => { + test('許可されている場合は複数投票できる', async () => { const { body } = await request('/notes/create', { text: 'test', poll: { @@ -316,7 +316,7 @@ describe('Note', () => { assert.strictEqual(res.status, 204); }); - it('締め切られている場合は投票できない', async () => { + test('締め切られている場合は投票できない', async () => { const { body } = await request('/notes/create', { text: 'test', poll: { @@ -337,7 +337,7 @@ describe('Note', () => { }); describe('notes/delete', () => { - it('delete a reply', async () => { + test('delete a reply', async () => { const mainNoteRes = await api('notes/create', { text: 'main post', }, alice); diff --git a/packages/backend/test/_e2e/streaming.ts b/packages/backend/test/_e2e/streaming.ts index 4dad322e99..790451d9b4 100644 --- a/packages/backend/test/_e2e/streaming.ts +++ b/packages/backend/test/_e2e/streaming.ts @@ -78,7 +78,7 @@ describe('Streaming', () => { }); describe('Events', () => { - it('mention event', async () => { + test('mention event', async () => { const fired = await waitFire( kyoko, 'main', // kyoko:main () => post(ayano, { text: 'foo @kyoko bar' }), // ayano mention => kyoko @@ -88,7 +88,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('renote event', async () => { + test('renote event', async () => { const fired = await waitFire( kyoko, 'main', // kyoko:main () => post(ayano, { renoteId: kyokoNote.id }), // ayano renote @@ -100,7 +100,7 @@ describe('Streaming', () => { }); describe('Home Timeline', () => { - it('自分の投稿が流れる', async () => { + test('自分の投稿が流れる', async () => { const fired = await waitFire( ayano, 'homeTimeline', // ayano:Home () => api('notes/create', { text: 'foo' }, ayano), // ayano posts @@ -110,7 +110,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしているユーザーの投稿が流れる', async () => { + test('フォローしているユーザーの投稿が流れる', async () => { const fired = await waitFire( ayano, 'homeTimeline', // ayano:home () => api('notes/create', { text: 'foo' }, kyoko), // kyoko posts @@ -120,7 +120,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしていないユーザーの投稿は流れない', async () => { + test('フォローしていないユーザーの投稿は流れない', async () => { const fired = await waitFire( kyoko, 'homeTimeline', // kyoko:home () => api('notes/create', { text: 'foo' }, ayano), // ayano posts @@ -130,7 +130,7 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); - it('フォローしているユーザーのダイレクト投稿が流れる', async () => { + test('フォローしているユーザーのダイレクト投稿が流れる', async () => { const fired = await waitFire( ayano, 'homeTimeline', // ayano:home () => api('notes/create', { text: 'foo', visibility: 'specified', visibleUserIds: [ayano.id] }, kyoko), // kyoko dm => ayano @@ -140,7 +140,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしているユーザーでも自分が指定されていないダイレクト投稿は流れない', async () => { + test('フォローしているユーザーでも自分が指定されていないダイレクト投稿は流れない', async () => { const fired = await waitFire( ayano, 'homeTimeline', // ayano:home () => api('notes/create', { text: 'foo', visibility: 'specified', visibleUserIds: [chitose.id] }, kyoko), // kyoko dm => chitose @@ -152,7 +152,7 @@ describe('Streaming', () => { }); // Home describe('Local Timeline', () => { - it('自分の投稿が流れる', async () => { + test('自分の投稿が流れる', async () => { const fired = await waitFire( ayano, 'localTimeline', // ayano:Local () => api('notes/create', { text: 'foo' }, ayano), // ayano posts @@ -162,7 +162,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしていないローカルユーザーの投稿が流れる', async () => { + test('フォローしていないローカルユーザーの投稿が流れる', async () => { const fired = await waitFire( ayano, 'localTimeline', // ayano:Local () => api('notes/create', { text: 'foo' }, chitose), // chitose posts @@ -172,7 +172,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('リモートユーザーの投稿は流れない', async () => { + test('リモートユーザーの投稿は流れない', async () => { const fired = await waitFire( ayano, 'localTimeline', // ayano:Local () => api('notes/create', { text: 'foo' }, chinatsu), // chinatsu posts @@ -182,7 +182,7 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); - it('フォローしてたとしてもリモートユーザーの投稿は流れない', async () => { + test('フォローしてたとしてもリモートユーザーの投稿は流れない', async () => { const fired = await waitFire( ayano, 'localTimeline', // ayano:Local () => api('notes/create', { text: 'foo' }, akari), // akari posts @@ -192,7 +192,7 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); - it('ホーム指定の投稿は流れない', async () => { + test('ホーム指定の投稿は流れない', async () => { const fired = await waitFire( ayano, 'localTimeline', // ayano:Local () => api('notes/create', { text: 'foo', visibility: 'home' }, kyoko), // kyoko home posts @@ -202,7 +202,7 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); - it('フォローしているローカルユーザーのダイレクト投稿は流れない', async () => { + test('フォローしているローカルユーザーのダイレクト投稿は流れない', async () => { const fired = await waitFire( ayano, 'localTimeline', // ayano:Local () => api('notes/create', { text: 'foo', visibility: 'specified', visibleUserIds: [ayano.id] }, kyoko), // kyoko DM => ayano @@ -212,7 +212,7 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); - it('フォローしていないローカルユーザーのフォロワー宛て投稿は流れない', async () => { + test('フォローしていないローカルユーザーのフォロワー宛て投稿は流れない', async () => { const fired = await waitFire( ayano, 'localTimeline', // ayano:Local () => api('notes/create', { text: 'foo', visibility: 'followers' }, chitose), @@ -224,7 +224,7 @@ describe('Streaming', () => { }); describe('Hybrid Timeline', () => { - it('自分の投稿が流れる', async () => { + test('自分の投稿が流れる', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo' }, ayano), // ayano posts @@ -234,7 +234,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしていないローカルユーザーの投稿が流れる', async () => { + test('フォローしていないローカルユーザーの投稿が流れる', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo' }, chitose), // chitose posts @@ -244,7 +244,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしているリモートユーザーの投稿が流れる', async () => { + test('フォローしているリモートユーザーの投稿が流れる', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo' }, akari), // akari posts @@ -254,7 +254,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしていないリモートユーザーの投稿は流れない', async () => { + test('フォローしていないリモートユーザーの投稿は流れない', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo' }, chinatsu), // chinatsu posts @@ -264,7 +264,7 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); - it('フォローしているユーザーのダイレクト投稿が流れる', async () => { + test('フォローしているユーザーのダイレクト投稿が流れる', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo', visibility: 'specified', visibleUserIds: [ayano.id] }, kyoko), @@ -274,7 +274,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしているユーザーのホーム投稿が流れる', async () => { + test('フォローしているユーザーのホーム投稿が流れる', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo', visibility: 'home' }, kyoko), @@ -284,7 +284,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしていないローカルユーザーのホーム投稿は流れない', async () => { + test('フォローしていないローカルユーザーのホーム投稿は流れない', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo', visibility: 'home' }, chitose), @@ -294,7 +294,7 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); - it('フォローしていないローカルユーザーのフォロワー宛て投稿は流れない', async () => { + test('フォローしていないローカルユーザーのフォロワー宛て投稿は流れない', async () => { const fired = await waitFire( ayano, 'hybridTimeline', // ayano:Hybrid () => api('notes/create', { text: 'foo', visibility: 'followers' }, chitose), @@ -306,7 +306,7 @@ describe('Streaming', () => { }); describe('Global Timeline', () => { - it('フォローしていないローカルユーザーの投稿が流れる', async () => { + test('フォローしていないローカルユーザーの投稿が流れる', async () => { const fired = await waitFire( ayano, 'globalTimeline', // ayano:Global () => api('notes/create', { text: 'foo' }, chitose), // chitose posts @@ -316,7 +316,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('フォローしていないリモートユーザーの投稿が流れる', async () => { + test('フォローしていないリモートユーザーの投稿が流れる', async () => { const fired = await waitFire( ayano, 'globalTimeline', // ayano:Global () => api('notes/create', { text: 'foo' }, chinatsu), // chinatsu posts @@ -326,7 +326,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('ホーム投稿は流れない', async () => { + test('ホーム投稿は流れない', async () => { const fired = await waitFire( ayano, 'globalTimeline', // ayano:Global () => api('notes/create', { text: 'foo', visibility: 'home' }, kyoko), // kyoko posts @@ -338,7 +338,7 @@ describe('Streaming', () => { }); describe('UserList Timeline', () => { - it('リストに入れているユーザーの投稿が流れる', async () => { + test('リストに入れているユーザーの投稿が流れる', async () => { const fired = await waitFire( chitose, 'userList', () => api('notes/create', { text: 'foo' }, ayano), @@ -349,7 +349,7 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); - it('リストに入れていないユーザーの投稿は流れない', async () => { + test('リストに入れていないユーザーの投稿は流れない', async () => { const fired = await waitFire( chitose, 'userList', () => api('notes/create', { text: 'foo' }, chinatsu), @@ -361,7 +361,7 @@ describe('Streaming', () => { }); // #4471 - it('リストに入れているユーザーのダイレクト投稿が流れる', async () => { + test('リストに入れているユーザーのダイレクト投稿が流れる', async () => { const fired = await waitFire( chitose, 'userList', () => api('notes/create', { text: 'foo', visibility: 'specified', visibleUserIds: [chitose.id] }, ayano), @@ -373,7 +373,7 @@ describe('Streaming', () => { }); // #4335 - it('リストに入れているがフォローはしてないユーザーのフォロワー宛て投稿は流れない', async () => { + test('リストに入れているがフォローはしてないユーザーのフォロワー宛て投稿は流れない', async () => { const fired = await waitFire( chitose, 'userList', () => api('notes/create', { text: 'foo', visibility: 'followers' }, kyoko), @@ -386,7 +386,7 @@ describe('Streaming', () => { }); describe('Hashtag Timeline', () => { - it('指定したハッシュタグの投稿が流れる', () => new Promise<void>(async done => { + test('指定したハッシュタグの投稿が流れる', () => new Promise<void>(async done => { const ws = await connectStream(chitose, 'hashtag', ({ type, body }) => { if (type === 'note') { assert.deepStrictEqual(body.text, '#foo'); @@ -404,7 +404,7 @@ describe('Streaming', () => { }); })); - it('指定したハッシュタグの投稿が流れる (AND)', () => new Promise<void>(async done => { + test('指定したハッシュタグの投稿が流れる (AND)', () => new Promise<void>(async done => { let fooCount = 0; let barCount = 0; let fooBarCount = 0; @@ -442,7 +442,7 @@ describe('Streaming', () => { }, 3000); })); - it('指定したハッシュタグの投稿が流れる (OR)', () => new Promise<void>(async done => { + test('指定したハッシュタグの投稿が流れる (OR)', () => new Promise<void>(async done => { let fooCount = 0; let barCount = 0; let fooBarCount = 0; @@ -488,7 +488,7 @@ describe('Streaming', () => { }, 3000); })); - it('指定したハッシュタグの投稿が流れる (AND + OR)', () => new Promise<void>(async done => { + test('指定したハッシュタグの投稿が流れる (AND + OR)', () => new Promise<void>(async done => { let fooCount = 0; let barCount = 0; let fooBarCount = 0; diff --git a/packages/backend/test/_e2e/thread-mute.ts b/packages/backend/test/_e2e/thread-mute.ts index 0ed9aa0666..890b52a8c1 100644 --- a/packages/backend/test/_e2e/thread-mute.ts +++ b/packages/backend/test/_e2e/thread-mute.ts @@ -22,7 +22,7 @@ describe('Note thread mute', () => { await shutdownServer(p); }); - it('notes/mentions にミュートしているスレッドの投稿が含まれない', async () => { + test('notes/mentions にミュートしているスレッドの投稿が含まれない', async () => { const bobNote = await post(bob, { text: '@alice @carol root note' }); const aliceReply = await post(alice, { replyId: bobNote.id, text: '@bob @carol child note' }); @@ -40,7 +40,7 @@ describe('Note thread mute', () => { assert.strictEqual(res.body.some((note: any) => note.id === carolReplyWithoutMention.id), false); }); - it('ミュートしているスレッドからメンションされても、hasUnreadMentions が true にならない', async () => { + test('ミュートしているスレッドからメンションされても、hasUnreadMentions が true にならない', async () => { // 状態リセット await request('/i/read-all-unread-notes', {}, alice); @@ -56,7 +56,7 @@ describe('Note thread mute', () => { assert.strictEqual(res.body.hasUnreadMentions, false); }); - it('ミュートしているスレッドからメンションされても、ストリームに unreadMention イベントが流れてこない', () => new Promise(async done => { + test('ミュートしているスレッドからメンションされても、ストリームに unreadMention イベントが流れてこない', () => new Promise(async done => { // 状態リセット await request('/i/read-all-unread-notes', {}, alice); @@ -82,7 +82,7 @@ describe('Note thread mute', () => { }, 5000); })); - it('i/notifications にミュートしているスレッドの通知が含まれない', async () => { + test('i/notifications にミュートしているスレッドの通知が含まれない', async () => { const bobNote = await post(bob, { text: '@alice @carol root note' }); const aliceReply = await post(alice, { replyId: bobNote.id, text: '@bob @carol child note' }); diff --git a/packages/backend/test/_e2e/user-notes.ts b/packages/backend/test/_e2e/user-notes.ts index 353875634c..a6cc1057f9 100644 --- a/packages/backend/test/_e2e/user-notes.ts +++ b/packages/backend/test/_e2e/user-notes.ts @@ -32,7 +32,7 @@ describe('users/notes', () => { await shutdownServer(p); }); - it('ファイルタイプ指定 (jpg)', async () => { + test('ファイルタイプ指定 (jpg)', async () => { const res = await request('/users/notes', { userId: alice.id, fileType: ['image/jpeg'], @@ -45,7 +45,7 @@ describe('users/notes', () => { assert.strictEqual(res.body.some((note: any) => note.id === jpgPngNote.id), true); }); - it('ファイルタイプ指定 (jpg or png)', async () => { + test('ファイルタイプ指定 (jpg or png)', async () => { const res = await request('/users/notes', { userId: alice.id, fileType: ['image/jpeg', 'image/png'], diff --git a/packages/backend/test/prelude/maybe.ts b/packages/backend/test/prelude/maybe.ts index c1ff63eada..b8679c1071 100644 --- a/packages/backend/test/prelude/maybe.ts +++ b/packages/backend/test/prelude/maybe.ts @@ -2,17 +2,17 @@ import * as assert from 'assert'; import { just, nothing } from '../../src/misc/prelude/maybe.js'; describe('just', () => { - it('has a value', () => { + test('has a value', () => { assert.deepStrictEqual(just(3).isJust(), true); }); - it('has the inverse called get', () => { + test('has the inverse called get', () => { assert.deepStrictEqual(just(3).get(), 3); }); }); describe('nothing', () => { - it('has no value', () => { + test('has no value', () => { assert.deepStrictEqual(nothing().isJust(), false); }); }); diff --git a/packages/backend/test/prelude/url.ts b/packages/backend/test/prelude/url.ts index 574f2fffdb..23b6b22bb0 100644 --- a/packages/backend/test/prelude/url.ts +++ b/packages/backend/test/prelude/url.ts @@ -2,7 +2,7 @@ import * as assert from 'assert'; import { query } from '../../src/misc/prelude/url.js'; describe('url', () => { - it('query', () => { + test('query', () => { const s = query({ foo: 'ふぅ', bar: 'b a r', diff --git a/packages/backend/test/tests/activitypub.ts b/packages/backend/test/tests/activitypub.ts index 08ec0a59ea..19fb5d90d7 100644 --- a/packages/backend/test/tests/activitypub.ts +++ b/packages/backend/test/tests/activitypub.ts @@ -27,7 +27,7 @@ describe('ActivityPub', () => { content: 'あ', }; - it('Minimum Actor', async () => { + test('Minimum Actor', async () => { const { MockResolver } = await import('../misc/mock-resolver.js'); const { createPerson } = await import('../../src/activitypub/models/person.js'); @@ -41,7 +41,7 @@ describe('ActivityPub', () => { assert.deepStrictEqual(user.inbox, actor.inbox); }); - it('Minimum Note', async () => { + test('Minimum Note', async () => { const { MockResolver } = await import('../misc/mock-resolver.js'); const { createNote } = await import('../../src/activitypub/models/note.js'); @@ -74,7 +74,7 @@ describe('ActivityPub', () => { outbox: `${actorId}/outbox`, }; - it('Actor', async () => { + test('Actor', async () => { const { MockResolver } = await import('../misc/mock-resolver.js'); const { createPerson } = await import('../../src/activitypub/models/person.js'); diff --git a/packages/backend/test/tests/ap-request.ts b/packages/backend/test/tests/ap-request.ts index d628f03f44..8c586861ad 100644 --- a/packages/backend/test/tests/ap-request.ts +++ b/packages/backend/test/tests/ap-request.ts @@ -19,7 +19,7 @@ export const buildParsedSignature = (signingString: string, signature: string, a }; describe('ap-request', () => { - it('createSignedPost with verify', async () => { + test('createSignedPost with verify', async () => { const keypair = await genRsaKeyPair(); const key = { keyId: 'x', 'privateKeyPem': keypair.privateKey }; const url = 'https://example.com/inbox'; @@ -37,7 +37,7 @@ describe('ap-request', () => { assert.deepStrictEqual(result, true); }); - it('createSignedGet with verify', async () => { + test('createSignedGet with verify', async () => { const keypair = await genRsaKeyPair(); const key = { keyId: 'x', 'privateKeyPem': keypair.privateKey }; const url = 'https://example.com/outbox'; diff --git a/packages/backend/test/tests/extract-mentions.ts b/packages/backend/test/tests/extract-mentions.ts index 4f9cb68763..e81d04c2db 100644 --- a/packages/backend/test/tests/extract-mentions.ts +++ b/packages/backend/test/tests/extract-mentions.ts @@ -4,7 +4,7 @@ import { parse } from 'mfm-js'; import { extractMentions } from '../../src/misc/extract-mentions.js'; describe('Extract mentions', () => { - it('simple', () => { + test('simple', () => { const ast = parse('@foo @bar @baz')!; const mentions = extractMentions(ast); assert.deepStrictEqual(mentions, [{ @@ -22,7 +22,7 @@ describe('Extract mentions', () => { }]); }); - it('nested', () => { + test('nested', () => { const ast = parse('@foo **@bar** @baz')!; const mentions = extractMentions(ast); assert.deepStrictEqual(mentions, [{ diff --git a/packages/backend/test/tests/mfm.ts b/packages/backend/test/tests/mfm.ts index 5087e84a1a..884f39d7fb 100644 --- a/packages/backend/test/tests/mfm.ts +++ b/packages/backend/test/tests/mfm.ts @@ -5,13 +5,13 @@ import { toHtml } from '../../src/mfm/to-html.js'; import { fromHtml } from '../../src/mfm/from-html.js'; describe('toHtml', () => { - it('br', () => { + test('br', () => { const input = 'foo\nbar\nbaz'; const output = '<p><span>foo<br>bar<br>baz</span></p>'; assert.equal(toHtml(mfm.parse(input)), output); }); - it('br alt', () => { + test('br alt', () => { const input = 'foo\r\nbar\rbaz'; const output = '<p><span>foo<br>bar<br>baz</span></p>'; assert.equal(toHtml(mfm.parse(input)), output); @@ -19,71 +19,71 @@ describe('toHtml', () => { }); describe('fromHtml', () => { - it('p', () => { + test('p', () => { assert.deepStrictEqual(fromHtml('<p>a</p><p>b</p>'), 'a\n\nb'); }); - it('block element', () => { + test('block element', () => { assert.deepStrictEqual(fromHtml('<div>a</div><div>b</div>'), 'a\nb'); }); - it('inline element', () => { + test('inline element', () => { assert.deepStrictEqual(fromHtml('<ul><li>a</li><li>b</li></ul>'), 'a\nb'); }); - it('block code', () => { + test('block code', () => { assert.deepStrictEqual(fromHtml('<pre><code>a\nb</code></pre>'), '```\na\nb\n```'); }); - it('inline code', () => { + test('inline code', () => { assert.deepStrictEqual(fromHtml('<code>a</code>'), '`a`'); }); - it('quote', () => { + test('quote', () => { assert.deepStrictEqual(fromHtml('<blockquote>a\nb</blockquote>'), '> a\n> b'); }); - it('br', () => { + test('br', () => { assert.deepStrictEqual(fromHtml('<p>abc<br><br/>d</p>'), 'abc\n\nd'); }); - it('link with different text', () => { + test('link with different text', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="https://example.com/b">c</a> d</p>'), 'a [c](https://example.com/b) d'); }); - it('link with different text, but not encoded', () => { + test('link with different text, but not encoded', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="https://example.com/ä">c</a> d</p>'), 'a [c](<https://example.com/ä>) d'); }); - it('link with same text', () => { + test('link with same text', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="https://example.com/b">https://example.com/b</a> d</p>'), 'a https://example.com/b d'); }); - it('link with same text, but not encoded', () => { + test('link with same text, but not encoded', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="https://example.com/ä">https://example.com/ä</a> d</p>'), 'a <https://example.com/ä> d'); }); - it('link with no url', () => { + test('link with no url', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="b">c</a> d</p>'), 'a [c](b) d'); }); - it('link without href', () => { + test('link without href', () => { assert.deepStrictEqual(fromHtml('<p>a <a>c</a> d</p>'), 'a c d'); }); - it('link without text', () => { + test('link without text', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="https://example.com/b"></a> d</p>'), 'a https://example.com/b d'); }); - it('link without both', () => { + test('link without both', () => { assert.deepStrictEqual(fromHtml('<p>a <a></a> d</p>'), 'a d'); }); - it('mention', () => { + test('mention', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="https://example.com/@user" class="u-url mention">@user</a> d</p>'), 'a @user@example.com d'); }); - it('hashtag', () => { + test('hashtag', () => { assert.deepStrictEqual(fromHtml('<p>a <a href="https://example.com/tags/a">#a</a> d</p>', ['#a']), 'a #a d'); }); }); diff --git a/packages/backend/test/tests/reaction-lib.ts b/packages/backend/test/tests/reaction-lib.ts index 7c61dc76c2..2e767f7697 100644 --- a/packages/backend/test/tests/reaction-lib.ts +++ b/packages/backend/test/tests/reaction-lib.ts @@ -4,79 +4,79 @@ import * as assert from 'assert'; import { toDbReaction } from '../src/misc/reaction-lib.js'; describe('toDbReaction', async () => { - it('既存の文字列リアクションはそのまま', async () => { + test('既存の文字列リアクションはそのまま', async () => { assert.strictEqual(await toDbReaction('like'), 'like'); }); - it('Unicodeプリンは寿司化不能とするため文字列化しない', async () => { + test('Unicodeプリンは寿司化不能とするため文字列化しない', async () => { assert.strictEqual(await toDbReaction('🍮'), '🍮'); }); - it('プリン以外の既存のリアクションは文字列化する like', async () => { + test('プリン以外の既存のリアクションは文字列化する like', async () => { assert.strictEqual(await toDbReaction('👍'), 'like'); }); - it('プリン以外の既存のリアクションは文字列化する love', async () => { + test('プリン以外の既存のリアクションは文字列化する love', async () => { assert.strictEqual(await toDbReaction('❤️'), 'love'); }); - it('プリン以外の既存のリアクションは文字列化する love 異体字セレクタなし', async () => { + test('プリン以外の既存のリアクションは文字列化する love 異体字セレクタなし', async () => { assert.strictEqual(await toDbReaction('❤'), 'love'); }); - it('プリン以外の既存のリアクションは文字列化する laugh', async () => { + test('プリン以外の既存のリアクションは文字列化する laugh', async () => { assert.strictEqual(await toDbReaction('😆'), 'laugh'); }); - it('プリン以外の既存のリアクションは文字列化する hmm', async () => { + test('プリン以外の既存のリアクションは文字列化する hmm', async () => { assert.strictEqual(await toDbReaction('🤔'), 'hmm'); }); - it('プリン以外の既存のリアクションは文字列化する surprise', async () => { + test('プリン以外の既存のリアクションは文字列化する surprise', async () => { assert.strictEqual(await toDbReaction('😮'), 'surprise'); }); - it('プリン以外の既存のリアクションは文字列化する congrats', async () => { + test('プリン以外の既存のリアクションは文字列化する congrats', async () => { assert.strictEqual(await toDbReaction('🎉'), 'congrats'); }); - it('プリン以外の既存のリアクションは文字列化する angry', async () => { + test('プリン以外の既存のリアクションは文字列化する angry', async () => { assert.strictEqual(await toDbReaction('💢'), 'angry'); }); - it('プリン以外の既存のリアクションは文字列化する confused', async () => { + test('プリン以外の既存のリアクションは文字列化する confused', async () => { assert.strictEqual(await toDbReaction('😥'), 'confused'); }); - it('プリン以外の既存のリアクションは文字列化する rip', async () => { + test('プリン以外の既存のリアクションは文字列化する rip', async () => { assert.strictEqual(await toDbReaction('😇'), 'rip'); }); - it('それ以外はUnicodeのまま', async () => { + test('それ以外はUnicodeのまま', async () => { assert.strictEqual(await toDbReaction('🍅'), '🍅'); }); - it('異体字セレクタ除去', async () => { + test('異体字セレクタ除去', async () => { assert.strictEqual(await toDbReaction('㊗️'), '㊗'); }); - it('異体字セレクタ除去 必要なし', async () => { + test('異体字セレクタ除去 必要なし', async () => { assert.strictEqual(await toDbReaction('㊗'), '㊗'); }); - it('fallback - undefined', async () => { + test('fallback - undefined', async () => { assert.strictEqual(await toDbReaction(undefined), 'like'); }); - it('fallback - null', async () => { + test('fallback - null', async () => { assert.strictEqual(await toDbReaction(null), 'like'); }); - it('fallback - empty', async () => { + test('fallback - empty', async () => { assert.strictEqual(await toDbReaction(''), 'like'); }); - it('fallback - unknown', async () => { + test('fallback - unknown', async () => { assert.strictEqual(await toDbReaction('unknown'), 'like'); }); }); diff --git a/packages/backend/test/unit/FileInfoService.ts b/packages/backend/test/unit/FileInfoService.ts index b876deb545..d05833560d 100644 --- a/packages/backend/test/unit/FileInfoService.ts +++ b/packages/backend/test/unit/FileInfoService.ts @@ -54,7 +54,7 @@ describe('FileInfoService', () => { await app.close(); }); - it('Empty file', async () => { + test('Empty file', async () => { const path = `${resources}/emptyfile`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; @@ -74,7 +74,7 @@ describe('FileInfoService', () => { }); }); - it('Generic JPEG', async () => { + test('Generic JPEG', async () => { const path = `${resources}/Lenna.jpg`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; @@ -94,7 +94,7 @@ describe('FileInfoService', () => { }); }); - it('Generic APNG', async () => { + test('Generic APNG', async () => { const path = `${resources}/anime.png`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; @@ -114,7 +114,7 @@ describe('FileInfoService', () => { }); }); - it('Generic AGIF', async () => { + test('Generic AGIF', async () => { const path = `${resources}/anime.gif`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; @@ -134,7 +134,7 @@ describe('FileInfoService', () => { }); }); - it('PNG with alpha', async () => { + test('PNG with alpha', async () => { const path = `${resources}/with-alpha.png`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; @@ -154,7 +154,7 @@ describe('FileInfoService', () => { }); }); - it('Generic SVG', async () => { + test('Generic SVG', async () => { const path = `${resources}/image.svg`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; @@ -174,7 +174,7 @@ describe('FileInfoService', () => { }); }); - it('SVG with XML definition', async () => { + test('SVG with XML definition', async () => { // https://github.com/misskey-dev/misskey/issues/4413 const path = `${resources}/with-xml-def.svg`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; @@ -195,7 +195,7 @@ describe('FileInfoService', () => { }); }); - it('Dimension limit', async () => { + test('Dimension limit', async () => { const path = `${resources}/25000x25000.png`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; @@ -215,7 +215,7 @@ describe('FileInfoService', () => { }); }); - it('Rotate JPEG', async () => { + test('Rotate JPEG', async () => { const path = `${resources}/rotate.jpg`; const info = await fileInfoService.getFileInfo(path, { skipSensitiveDetection: true }) as any; delete info.warnings; diff --git a/packages/backend/test/unit/MetaService.ts b/packages/backend/test/unit/MetaService.ts index 26649d92a4..9efd8bbe70 100644 --- a/packages/backend/test/unit/MetaService.ts +++ b/packages/backend/test/unit/MetaService.ts @@ -35,7 +35,7 @@ describe('MetaService', () => { await app.close(); }); - it('fetch (cache)', async () => { + test('fetch (cache)', async () => { const db = app.get<DataSource>(DI.db); const spy = jest.spyOn(db, 'transaction'); @@ -45,7 +45,7 @@ describe('MetaService', () => { expect(spy).toHaveBeenCalledTimes(0); }); - it('fetch (force)', async () => { + test('fetch (force)', async () => { const db = app.get<DataSource>(DI.db); const spy = jest.spyOn(db, 'transaction'); diff --git a/packages/backend/test/unit/RelayService.ts b/packages/backend/test/unit/RelayService.ts index 5f87fea7aa..529e923b2c 100644 --- a/packages/backend/test/unit/RelayService.ts +++ b/packages/backend/test/unit/RelayService.ts @@ -57,7 +57,7 @@ describe('RelayService', () => { await app.close(); }); - it('addRelay', async () => { + test('addRelay', async () => { const result = await relayService.addRelay('https://example.com'); expect(result.inbox).toBe('https://example.com'); @@ -68,7 +68,7 @@ describe('RelayService', () => { //expect(queueService.deliver.mock.lastCall![0].username).toBe('relay.actor'); }); - it('listRelay', async () => { + test('listRelay', async () => { const result = await relayService.listRelay(); expect(result.length).toBe(1); @@ -76,7 +76,7 @@ describe('RelayService', () => { expect(result[0].status).toBe('requesting'); }); - it('removeRelay: succ', async () => { + test('removeRelay: succ', async () => { await relayService.removeRelay('https://example.com'); expect(queueService.deliver).toHaveBeenCalled(); @@ -89,7 +89,7 @@ describe('RelayService', () => { expect(list.length).toBe(0); }); - it('removeRelay: fail', async () => { + test('removeRelay: fail', async () => { await expect(relayService.removeRelay('https://x.example.com')) .rejects.toThrow('relay not found'); }); diff --git a/packages/backend/test/unit/RoleService.ts b/packages/backend/test/unit/RoleService.ts new file mode 100644 index 0000000000..221f743d3a --- /dev/null +++ b/packages/backend/test/unit/RoleService.ts @@ -0,0 +1,232 @@ +process.env.NODE_ENV = 'test'; + +import { jest } from '@jest/globals'; +import { ModuleMocker } from 'jest-mock'; +import { Test } from '@nestjs/testing'; +import { DataSource } from 'typeorm'; +import rndstr from 'rndstr'; +import { GlobalModule } from '@/GlobalModule.js'; +import { RoleService } from '@/core/RoleService.js'; +import type { Role, RolesRepository, RoleAssignmentsRepository, UsersRepository, User } from '@/models/index.js'; +import { DI } from '@/di-symbols.js'; +import { CoreModule } from '@/core/CoreModule.js'; +import { MetaService } from '@/core/MetaService.js'; +import { genAid } from '@/misc/id/aid.js'; +import { UserCacheService } from '@/core/UserCacheService.js'; +import type { TestingModule } from '@nestjs/testing'; +import type { MockFunctionMetadata } from 'jest-mock'; + +const moduleMocker = new ModuleMocker(global); + +describe('RoleService', () => { + let app: TestingModule; + let roleService: RoleService; + let usersRepository: UsersRepository; + let rolesRepository: RolesRepository; + let roleAssignmentsRepository: RoleAssignmentsRepository; + let metaService: jest.Mocked<MetaService>; + + function createUser(data: Partial<User> = {}) { + const un = rndstr('a-z0-9', 16); + return usersRepository.insert({ + id: genAid(new Date()), + createdAt: new Date(), + username: un, + usernameLower: un, + ...data, + }) + .then(x => usersRepository.findOneByOrFail(x.identifiers[0])); + } + + function createRole(data: Partial<Role> = {}) { + return rolesRepository.insert({ + id: genAid(new Date()), + createdAt: new Date(), + updatedAt: new Date(), + lastUsedAt: new Date(), + description: '', + ...data, + }) + .then(x => rolesRepository.findOneByOrFail(x.identifiers[0])); + } + + async function assign(roleId: Role['id'], userId: User['id']) { + await roleAssignmentsRepository.insert({ + id: genAid(new Date()), + createdAt: new Date(), + roleId, + userId, + }); + } + + beforeEach(async () => { + app = await Test.createTestingModule({ + imports: [ + GlobalModule, + ], + providers: [ + RoleService, + UserCacheService, + ], + }) + .useMocker((token) => { + if (token === MetaService) { + return { fetch: jest.fn() }; + } + if (typeof token === 'function') { + const mockMetadata = moduleMocker.getMetadata(token) as MockFunctionMetadata<any, any>; + const Mock = moduleMocker.generateFromMetadata(mockMetadata); + return new Mock(); + } + }) + .compile(); + + app.enableShutdownHooks(); + + roleService = app.get<RoleService>(RoleService); + usersRepository = app.get<UsersRepository>(DI.usersRepository); + rolesRepository = app.get<RolesRepository>(DI.rolesRepository); + roleAssignmentsRepository = app.get<RoleAssignmentsRepository>(DI.roleAssignmentsRepository); + + metaService = app.get<MetaService>(MetaService) as jest.Mocked<MetaService>; + }); + + afterEach(async () => { + await Promise.all([ + app.get(DI.metasRepository).delete({}), + usersRepository.delete({}), + rolesRepository.delete({}), + roleAssignmentsRepository.delete({}), + ]); + await app.close(); + }); + + describe('getUserPolicies', () => { + test('instance default policies', async () => { + const user = await createUser(); + metaService.fetch.mockResolvedValue({ + policies: { + canManageCustomEmojis: false, + }, + } as any); + + const result = await roleService.getUserPolicies(user.id); + + expect(result.canManageCustomEmojis).toBe(false); + }); + + test('instance default policies 2', async () => { + const user = await createUser(); + metaService.fetch.mockResolvedValue({ + policies: { + canManageCustomEmojis: true, + }, + } as any); + + const result = await roleService.getUserPolicies(user.id); + + expect(result.canManageCustomEmojis).toBe(true); + }); + + test('with role', async () => { + const user = await createUser(); + const role = await createRole({ + name: 'a', + policies: { + canManageCustomEmojis: { + useDefault: false, + priority: 0, + value: true, + }, + }, + }); + await assign(role.id, user.id); + metaService.fetch.mockResolvedValue({ + policies: { + canManageCustomEmojis: false, + }, + } as any); + + const result = await roleService.getUserPolicies(user.id); + + expect(result.canManageCustomEmojis).toBe(true); + }); + + test('priority', async () => { + const user = await createUser(); + const role1 = await createRole({ + name: 'role1', + policies: { + driveCapacityMb: { + useDefault: false, + priority: 0, + value: 200, + }, + }, + }); + const role2 = await createRole({ + name: 'role2', + policies: { + driveCapacityMb: { + useDefault: false, + priority: 1, + value: 100, + }, + }, + }); + await assign(role1.id, user.id); + await assign(role2.id, user.id); + metaService.fetch.mockResolvedValue({ + policies: { + driveCapacityMb: 50, + }, + } as any); + + const result = await roleService.getUserPolicies(user.id); + + expect(result.driveCapacityMb).toBe(100); + }); + + test('conditional role', async () => { + const user1 = await createUser({ + createdAt: new Date(Date.now() - (1000 * 60 * 60 * 24 * 365)), + }); + const user2 = await createUser({ + createdAt: new Date(Date.now() - (1000 * 60 * 60 * 24 * 365)), + followersCount: 10, + }); + const role = await createRole({ + name: 'a', + policies: { + canManageCustomEmojis: { + useDefault: false, + priority: 0, + value: true, + }, + }, + target: 'conditional', + condFormula: { + type: 'and', + values: [{ + type: 'followersMoreThanOrEq', + value: 10, + }, { + type: 'createdMoreThan', + sec: 60 * 60 * 24 * 7, + }], + }, + }); + + metaService.fetch.mockResolvedValue({ + policies: { + canManageCustomEmojis: false, + }, + } as any); + + const user1Policies = await roleService.getUserPolicies(user1.id); + const user2Policies = await roleService.getUserPolicies(user2.id); + expect(user1Policies.canManageCustomEmojis).toBe(false); + expect(user2Policies.canManageCustomEmojis).toBe(true); + }); + }); +}); diff --git a/packages/backend/test/unit/chart.ts b/packages/backend/test/unit/chart.ts index 036d0e19fd..1e9a51bc88 100644 --- a/packages/backend/test/unit/chart.ts +++ b/packages/backend/test/unit/chart.ts @@ -78,7 +78,7 @@ describe('Chart', () => { if (db) await db.destroy(); }); - it('Can updates', async () => { + test('Can updates', async () => { await testChart.increment(); await testChart.save(); @@ -102,7 +102,7 @@ describe('Chart', () => { }); }); - it('Can updates (dec)', async () => { + test('Can updates (dec)', async () => { await testChart.decrement(); await testChart.save(); @@ -126,7 +126,7 @@ describe('Chart', () => { }); }); - it('Empty chart', async () => { + test('Empty chart', async () => { const chartHours = await testChart.getChart('hour', 3, null); const chartDays = await testChart.getChart('day', 3, null); @@ -147,7 +147,7 @@ describe('Chart', () => { }); }); - it('Can updates at multiple times at same time', async () => { + test('Can updates at multiple times at same time', async () => { await testChart.increment(); await testChart.increment(); await testChart.increment(); @@ -173,7 +173,7 @@ describe('Chart', () => { }); }); - it('複数回saveされてもデータの更新は一度だけ', async () => { + test('複数回saveされてもデータの更新は一度だけ', async () => { await testChart.increment(); await testChart.save(); await testChart.save(); @@ -199,7 +199,7 @@ describe('Chart', () => { }); }); - it('Can updates at different times', async () => { + test('Can updates at different times', async () => { await testChart.increment(); await testChart.save(); @@ -230,7 +230,7 @@ describe('Chart', () => { // 仕様上はこうなってほしいけど、実装は難しそうなのでskip /* - it('Can updates at different times without save', async () => { + test('Can updates at different times without save', async () => { await testChart.increment(); clock.tick('01:00:00'); @@ -259,7 +259,7 @@ describe('Chart', () => { }); */ - it('Can padding', async () => { + test('Can padding', async () => { await testChart.increment(); await testChart.save(); @@ -289,7 +289,7 @@ describe('Chart', () => { }); // 要求された範囲にログがひとつもない場合でもパディングできる - it('Can padding from past range', async () => { + test('Can padding from past range', async () => { await testChart.increment(); await testChart.save(); @@ -317,7 +317,7 @@ describe('Chart', () => { // 要求された範囲の最も古い箇所に位置するログが存在しない場合でもパディングできる // Issue #3190 - it('Can padding from past range 2', async () => { + test('Can padding from past range 2', async () => { await testChart.increment(); await testChart.save(); @@ -346,7 +346,7 @@ describe('Chart', () => { }); }); - it('Can specify offset', async () => { + test('Can specify offset', async () => { await testChart.increment(); await testChart.save(); @@ -375,7 +375,7 @@ describe('Chart', () => { }); }); - it('Can specify offset (floor time)', async () => { + test('Can specify offset (floor time)', async () => { clock.tick('00:30:00'); await testChart.increment(); @@ -407,7 +407,7 @@ describe('Chart', () => { }); describe('Grouped', () => { - it('Can updates', async () => { + test('Can updates', async () => { await testGroupedChart.increment('alice'); await testGroupedChart.save(); @@ -451,7 +451,7 @@ describe('Chart', () => { }); describe('Unique increment', () => { - it('Can updates', async () => { + test('Can updates', async () => { await testUniqueChart.uniqueIncrement('alice'); await testUniqueChart.uniqueIncrement('alice'); await testUniqueChart.uniqueIncrement('bob'); @@ -470,7 +470,7 @@ describe('Chart', () => { }); describe('Intersection', () => { - it('条件が満たされていない場合はカウントされない', async () => { + test('条件が満たされていない場合はカウントされない', async () => { await testIntersectionChart.addA('alice'); await testIntersectionChart.addA('bob'); await testIntersectionChart.addB('carol'); @@ -492,7 +492,7 @@ describe('Chart', () => { }); }); - it('条件が満たされている場合にカウントされる', async () => { + test('条件が満たされている場合にカウントされる', async () => { await testIntersectionChart.addA('alice'); await testIntersectionChart.addA('bob'); await testIntersectionChart.addB('carol'); @@ -518,7 +518,7 @@ describe('Chart', () => { }); describe('Resync', () => { - it('Can resync', async () => { + test('Can resync', async () => { testChart.total = 1; await testChart.resync(); @@ -543,7 +543,7 @@ describe('Chart', () => { }); }); - it('Can resync (2)', async () => { + test('Can resync (2)', async () => { await testChart.increment(); await testChart.save(); diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 3e13e285da..40183d64ce 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -12,18 +12,18 @@ "@rollup/plugin-json": "6.0.0", "@rollup/pluginutils": "5.0.2", "@syuilo/aiscript": "0.12.4", - "@tabler/icons-webfont": "^2.1.2", + "@tabler/icons-webfont": "2.1.2", "@vitejs/plugin-vue": "4.0.0", - "@vue/compiler-sfc": "3.2.45", + "@vue/compiler-sfc": "3.2.47", "autobind-decorator": "2.4.0", "autosize": "5.0.2", "blurhash": "2.0.4", "broadcast-channel": "4.20.2", "browser-image-resizer": "git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.3", - "canvas-confetti": "^1.6.0", + "canvas-confetti": "1.6.0", "chart.js": "4.2.0", "chartjs-adapter-date-fns": "3.0.0", - "chartjs-chart-matrix": "^1.3.0", + "chartjs-chart-matrix": "1.3.0", "chartjs-plugin-gradient": "0.6.1", "chartjs-plugin-zoom": "2.0.0", "compare-versions": "5.0.1", @@ -31,23 +31,23 @@ "date-fns": "2.29.3", "escape-regexp": "0.0.1", "eventemitter3": "5.0.0", - "gsap": "^3.11.4", + "gsap": "3.11.4", "idb-keyval": "6.2.0", "insert-text-at-cursor": "0.3.0", "is-file-animated": "1.0.2", "json5": "2.2.3", "matter-js": "0.18.0", "mfm-js": "0.23.3", - "misskey-js": "0.0.14", - "photoswipe": "5.3.4", + "misskey-js": "0.0.15", + "photoswipe": "5.3.5", "prismjs": "1.29.0", "punycode": "2.3.0", "querystring": "0.2.1", "rndstr": "1.0.0", - "rollup": "3.11.0", + "rollup": "3.12.1", "s-age": "1.1.2", - "sanitize-html": "^2.8.1", - "sass": "1.57.1", + "sanitize-html": "2.9.0", + "sass": "1.58.0", "seedrandom": "3.0.5", "strict-event-emitter-types": "2.0.0", "stringz": "2.1.0", @@ -59,11 +59,12 @@ "tsc-alias": "1.8.2", "tsconfig-paths": "4.1.2", "twemoji-parser": "14.0.0", - "typescript": "4.9.4", + "typescript": "4.9.5", "uuid": "9.0.0", "vanilla-tilt": "1.8.0", - "vite": "4.0.4", - "vue": "3.2.45", + "vue-plyr": "7.0.0", + "vite": "4.1.1", + "vue": "3.2.47", "vue-prism-editor": "2.0.0-alpha.2", "vuedraggable": "next" }, @@ -73,25 +74,25 @@ "@types/gulp": "4.0.10", "@types/gulp-rename": "2.0.1", "@types/matter-js": "0.18.2", - "@types/node": "^18.11.18", + "@types/node": "18.11.18", "@types/punycode": "2.1.0", - "@types/sanitize-html": "^2.8.0", + "@types/sanitize-html": "2.8.0", "@types/seedrandom": "3.0.4", "@types/throttle-debounce": "5.0.0", "@types/tinycolor2": "1.4.3", "@types/uuid": "9.0.0", "@types/websocket": "1.0.5", "@types/ws": "8.5.4", - "@typescript-eslint/eslint-plugin": "5.49.0", - "@typescript-eslint/parser": "5.49.0", - "@vue/runtime-core": "3.2.45", + "@typescript-eslint/eslint-plugin": "5.50.0", + "@typescript-eslint/parser": "5.50.0", + "@vue/runtime-core": "3.2.47", "cross-env": "7.0.3", - "cypress": "12.4.0", - "eslint": "8.32.0", + "cypress": "12.5.1", + "eslint": "8.33.0", "eslint-plugin-import": "2.27.5", "eslint-plugin-vue": "9.9.0", "start-server-and-test": "1.15.3", - "vue-eslint-parser": "^9.1.0", - "vue-tsc": "^1.0.24" + "vue-eslint-parser": "9.1.0", + "vue-tsc": "1.0.24" } } diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue index df0bf84116..5a2da050bb 100644 --- a/packages/frontend/src/components/MkMediaVideo.vue +++ b/packages/frontend/src/components/MkMediaVideo.vue @@ -6,19 +6,20 @@ </div> </div> <div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu"> - <video - :poster="video.thumbnailUrl" - :title="video.comment" - :alt="video.comment" - preload="none" - controls - @contextmenu.stop - > - <source - :src="video.url" - :type="video.type" + <vue-plyr> + <video + controls + crossorigin + playsinline + :data-poster="video.thumbnailUrl" > - </video> + <source + size="720" + :src="video.url" + :type="video.type" + /> + </video> + </vue-plyr> <i class="ti ti-eye-off" @click="hide = true"></i> </div> </template> @@ -26,7 +27,9 @@ <script lang="ts" setup> import { ref } from 'vue'; import * as misskey from 'misskey-js'; +import VuePlyr from 'vue-plyr'; import { defaultStore } from '@/store'; +import 'vue-plyr/dist/vue-plyr.css'; const props = defineProps<{ video: misskey.entities.DriveFile; @@ -39,6 +42,8 @@ const hide = ref((defaultStore.state.nsfw === 'force') ? true : props.video.isSe .kkjnbbplepmiyuadieoenjgutgcmtsvu { position: relative; + --plyr-color-main: var(--accent); + > i { display: block; position: absolute; diff --git a/packages/frontend/src/components/MkSignin.vue b/packages/frontend/src/components/MkSignin.vue index d50d6c48ad..cc1a7c4af5 100644 --- a/packages/frontend/src/components/MkSignin.vue +++ b/packages/frontend/src/components/MkSignin.vue @@ -40,11 +40,6 @@ </div> </div> </div> - <div class="social"> - <a v-if="meta && meta.enableTwitterIntegration" class="_borderButton _margin" :href="`${apiUrl}/signin/twitter`"><i class="ti ti-brand-twitter" style="margin-right: 4px;"></i>{{ $t('signinWith', { x: 'Twitter' }) }}</a> - <a v-if="meta && meta.enableGithubIntegration" class="_borderButton _margin" :href="`${apiUrl}/signin/github`"><i class="ti ti-brand-github" style="margin-right: 4px;"></i>{{ $t('signinWith', { x: 'GitHub' }) }}</a> - <a v-if="meta && meta.enableDiscordIntegration" class="_borderButton _margin" :href="`${apiUrl}/signin/discord`"><i class="ti ti-brand-discord" style="margin-right: 4px;"></i>{{ $t('signinWith', { x: 'Discord' }) }}</a> - </div> </form> </template> diff --git a/packages/frontend/src/components/global/MkAd.vue b/packages/frontend/src/components/global/MkAd.vue index a518484a5d..2bb432e15f 100644 --- a/packages/frontend/src/components/global/MkAd.vue +++ b/packages/frontend/src/components/global/MkAd.vue @@ -11,7 +11,6 @@ <div>Ads by {{ host }}</div> <!--<MkButton class="button" primary>{{ $ts._ad.like }}</MkButton>--> <MkButton v-if="chosen.ratio !== 0" :class="$style.menuButton" @click="reduceFrequency">{{ $ts._ad.reduceFrequencyOfThisAd }}</MkButton> - <MkButton v-if="$i && $i.policies.canHideAds" :class="$style.menuButton" @click="hide">{{ $ts._ad.hide }}</MkButton> <button class="_textButton" @click="toggleMenu">{{ $ts._ad.back }}</button> </div> </div> @@ -83,7 +82,7 @@ const choseAd = (): Ad | null => { }; const chosen = ref(choseAd()); -let shouldHide = $ref(chosen.value && $i && $i.policies.canHideAds && defaultStore.state.hiddenAds.includes(chosen.value.id)); +const shouldHide = $ref($i && $i.policies.canHideAds); function reduceFrequency(): void { if (chosen.value == null) return; @@ -93,13 +92,6 @@ function reduceFrequency(): void { chosen.value = choseAd(); showMenu.value = false; } - -function hide() { - if (chosen.value == null) return; - defaultStore.push('hiddenAds', chosen.value.id); - os.success(); - shouldHide = true; -} </script> <style lang="scss" module> diff --git a/packages/frontend/src/init.ts b/packages/frontend/src/init.ts index 2432b5f6f9..4227f5cf4a 100644 --- a/packages/frontend/src/init.ts +++ b/packages/frontend/src/init.ts @@ -43,502 +43,505 @@ import { reloadChannel } from '@/scripts/unison-reload'; import { reactionPicker } from '@/scripts/reaction-picker'; import { getUrlWithoutLoginId } from '@/scripts/login-id'; import { getAccountFromId } from '@/scripts/get-account-from-id'; +import { deckStore } from './ui/deck/deck-store'; import { miLocalStorage } from './local-storage'; import { claimAchievement, claimedAchievements } from './scripts/achievements'; import { fetchCustomEmojis } from './custom-emojis'; -(async () => { - console.info(`Misskey v${version}`); +console.info(`Misskey v${version}`); - if (_DEV_) { - console.warn('Development mode!!!'); +if (_DEV_) { + console.warn('Development mode!!!'); - console.info(`vue ${vueVersion}`); + console.info(`vue ${vueVersion}`); - (window as any).$i = $i; - (window as any).$store = defaultStore; + (window as any).$i = $i; + (window as any).$store = defaultStore; - window.addEventListener('error', event => { - console.error(event); - /* - alert({ - type: 'error', - title: 'DEV: Unhandled error', - text: event.message - }); - */ + window.addEventListener('error', event => { + console.error(event); + /* + alert({ + type: 'error', + title: 'DEV: Unhandled error', + text: event.message }); + */ + }); - window.addEventListener('unhandledrejection', event => { - console.error(event); - /* - alert({ - type: 'error', - title: 'DEV: Unhandled promise rejection', - text: event.reason - }); - */ + window.addEventListener('unhandledrejection', event => { + console.error(event); + /* + alert({ + type: 'error', + title: 'DEV: Unhandled promise rejection', + text: event.reason }); - } + */ + }); +} - //#region Detect language & fetch translations - const localeVersion = miLocalStorage.getItem('localeVersion'); - const localeOutdated = (localeVersion == null || localeVersion !== version); - if (localeOutdated) { - const res = await window.fetch(`/assets/locales/${lang}.${version}.json`); - if (res.status === 200) { - const newLocale = await res.text(); - const parsedNewLocale = JSON.parse(newLocale); - miLocalStorage.setItem('locale', newLocale); - miLocalStorage.setItem('localeVersion', version); - updateLocale(parsedNewLocale); - updateI18n(parsedNewLocale); - } +//#region Detect language & fetch translations +const localeVersion = miLocalStorage.getItem('localeVersion'); +const localeOutdated = (localeVersion == null || localeVersion !== version); +if (localeOutdated) { + const res = await window.fetch(`/assets/locales/${lang}.${version}.json`); + if (res.status === 200) { + const newLocale = await res.text(); + const parsedNewLocale = JSON.parse(newLocale); + miLocalStorage.setItem('locale', newLocale); + miLocalStorage.setItem('localeVersion', version); + updateLocale(parsedNewLocale); + updateI18n(parsedNewLocale); } - //#endregion +} +//#endregion - // タッチデバイスでCSSの:hoverを機能させる - document.addEventListener('touchend', () => {}, { passive: true }); +// タッチデバイスでCSSの:hoverを機能させる +document.addEventListener('touchend', () => {}, { passive: true }); - // 一斉リロード - reloadChannel.addEventListener('message', path => { - if (path !== null) location.href = path; - else location.reload(); - }); +// 一斉リロード +reloadChannel.addEventListener('message', path => { + if (path !== null) location.href = path; + else location.reload(); +}); - // If mobile, insert the viewport meta tag - if (['smartphone', 'tablet'].includes(deviceKind)) { - const viewport = document.getElementsByName('viewport').item(0); - viewport.setAttribute('content', - `${viewport.getAttribute('content')}, minimum-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover`); - } +// If mobile, insert the viewport meta tag +if (['smartphone', 'tablet'].includes(deviceKind)) { + const viewport = document.getElementsByName('viewport').item(0); + viewport.setAttribute('content', + `${viewport.getAttribute('content')}, minimum-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover`); +} - //#region Set lang attr - const html = document.documentElement; - html.setAttribute('lang', lang); - //#endregion +//#region Set lang attr +const html = document.documentElement; +html.setAttribute('lang', lang); +//#endregion - //#region loginId - const params = new URLSearchParams(location.search); - const loginId = params.get('loginId'); +//#region loginId +const params = new URLSearchParams(location.search); +const loginId = params.get('loginId'); - if (loginId) { - const target = getUrlWithoutLoginId(location.href); +if (loginId) { + const target = getUrlWithoutLoginId(location.href); - if (!$i || $i.id !== loginId) { - const account = await getAccountFromId(loginId); - if (account) { - await login(account.token, target); - } + if (!$i || $i.id !== loginId) { + const account = await getAccountFromId(loginId); + if (account) { + await login(account.token, target); } + } + + history.replaceState({ misskey: 'loginId' }, '', target); +} - history.replaceState({ misskey: 'loginId' }, '', target); +//#endregion + +//#region Fetch user +if ($i && $i.token) { + if (_DEV_) { + console.log('account cache found. refreshing...'); + } + + refreshAccount(); +} else { + if (_DEV_) { + console.log('no account cache found.'); } - //#endregion + // 連携ログインの場合用にCookieを参照する + const i = (document.cookie.match(/igi=(\w+)/) ?? [null, null])[1]; - //#region Fetch user - if ($i && $i.token) { + if (i != null && i !== 'null') { if (_DEV_) { - console.log('account cache found. refreshing...'); + console.log('signing...'); } - refreshAccount(); + try { + document.body.innerHTML = '<div>Please wait...</div>'; + await login(i); + } catch (err) { + // Render the error screen + // TODO: ちゃんとしたコンポーネントをレンダリングする(v10とかのトラブルシューティングゲーム付きのやつみたいな) + document.body.innerHTML = '<div id="err">Oops!</div>'; + } } else { if (_DEV_) { - console.log('no account cache found.'); - } - - // 連携ログインの場合用にCookieを参照する - const i = (document.cookie.match(/igi=(\w+)/) ?? [null, null])[1]; - - if (i != null && i !== 'null') { - if (_DEV_) { - console.log('signing...'); - } - - try { - document.body.innerHTML = '<div>Please wait...</div>'; - await login(i); - } catch (err) { - // Render the error screen - // TODO: ちゃんとしたコンポーネントをレンダリングする(v10とかのトラブルシューティングゲーム付きのやつみたいな) - document.body.innerHTML = '<div id="err">Oops!</div>'; - } - } else { - if (_DEV_) { - console.log('not signed in'); - } + console.log('not signed in'); } } - //#endregion +} +//#endregion - const fetchInstanceMetaPromise = fetchInstance(); +const fetchInstanceMetaPromise = fetchInstance(); - fetchInstanceMetaPromise.then(() => { - miLocalStorage.setItem('v', instance.version); +fetchInstanceMetaPromise.then(() => { + miLocalStorage.setItem('v', instance.version); - // Init service worker - initializeSw(); - }); + // Init service worker + initializeSw(); +}); - try { - await fetchCustomEmojis(); - } catch (err) {} +try { + await fetchCustomEmojis(); +} catch (err) {} - const app = createApp( - window.location.search === '?zen' ? defineAsyncComponent(() => import('@/ui/zen.vue')) : - !$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) : - ui === 'deck' ? defineAsyncComponent(() => import('@/ui/deck.vue')) : - ui === 'classic' ? defineAsyncComponent(() => import('@/ui/classic.vue')) : - defineAsyncComponent(() => import('@/ui/universal.vue')), - ); +const app = createApp( + window.location.search === '?zen' ? defineAsyncComponent(() => import('@/ui/zen.vue')) : + !$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) : + ui === 'deck' ? defineAsyncComponent(() => import('@/ui/deck.vue')) : + ui === 'classic' ? defineAsyncComponent(() => import('@/ui/classic.vue')) : + defineAsyncComponent(() => import('@/ui/universal.vue')), +); - if (_DEV_) { - app.config.performance = true; - } +if (_DEV_) { + app.config.performance = true; +} - // TODO: 廃止 - app.config.globalProperties = { - $i, - $store: defaultStore, - $instance: instance, - $t: i18n.t, - $ts: i18n.ts, - }; +// TODO: 廃止 +app.config.globalProperties = { + $i, + $store: defaultStore, + $instance: instance, + $t: i18n.t, + $ts: i18n.ts, +}; - widgets(app); - directives(app); - components(app); +widgets(app); +directives(app); +components(app); - const splash = document.getElementById('splash'); - // 念のためnullチェック(HTMLが古い場合があるため(そのうち消す)) - if (splash) splash.addEventListener('transitionend', () => { - splash.remove(); - }); +const splash = document.getElementById('splash'); +// 念のためnullチェック(HTMLが古い場合があるため(そのうち消す)) +if (splash) splash.addEventListener('transitionend', () => { + splash.remove(); +}); - // https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210 - // なぜかinit.tsの内容が2回実行されることがあるため、mountするdivを1つに制限する - const rootEl = (() => { - const MISSKEY_MOUNT_DIV_ID = 'misskey_app'; +await deckStore.ready; - const currentEl = document.getElementById(MISSKEY_MOUNT_DIV_ID); +// https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210 +// なぜかinit.tsの内容が2回実行されることがあるため、mountするdivを1つに制限する +const rootEl = (() => { + const MISSKEY_MOUNT_DIV_ID = 'misskey_app'; - if (currentEl) { - console.warn('multiple import detected'); - return currentEl; - } + const currentEl = document.getElementById(MISSKEY_MOUNT_DIV_ID); + + if (currentEl) { + console.warn('multiple import detected'); + return currentEl; + } - const rootEl = document.createElement('div'); - rootEl.id = MISSKEY_MOUNT_DIV_ID; - document.body.appendChild(rootEl); - return rootEl; - })(); + const rootEl = document.createElement('div'); + rootEl.id = MISSKEY_MOUNT_DIV_ID; + document.body.appendChild(rootEl); + return rootEl; +})(); - app.mount(rootEl); +app.mount(rootEl); - // boot.jsのやつを解除 - window.onerror = null; - window.onunhandledrejection = null; +// boot.jsのやつを解除 +window.onerror = null; +window.onunhandledrejection = null; - reactionPicker.init(); +reactionPicker.init(); - if (splash) { - splash.style.opacity = '0'; - splash.style.pointerEvents = 'none'; - } +if (splash) { + splash.style.opacity = '0'; + splash.style.pointerEvents = 'none'; +} - // クライアントが更新されたか? - const lastVersion = miLocalStorage.getItem('lastVersion'); - if (lastVersion !== version) { - miLocalStorage.setItem('lastVersion', version); +// クライアントが更新されたか? +const lastVersion = miLocalStorage.getItem('lastVersion'); +if (lastVersion !== version) { + miLocalStorage.setItem('lastVersion', version); - // テーマリビルドするため - miLocalStorage.removeItem('theme'); + // テーマリビルドするため + miLocalStorage.removeItem('theme'); - try { // 変なバージョン文字列来るとcompareVersionsでエラーになるため - if (lastVersion != null && compareVersions(version, lastVersion) === 1) { - // ログインしてる場合だけ - if ($i) { - popup(defineAsyncComponent(() => import('@/components/MkUpdated.vue')), {}, {}, 'closed'); - } + try { // 変なバージョン文字列来るとcompareVersionsでエラーになるため + if (lastVersion != null && compareVersions(version, lastVersion) === 1) { + // ログインしてる場合だけ + if ($i) { + popup(defineAsyncComponent(() => import('@/components/MkUpdated.vue')), {}, {}, 'closed'); } - } catch (err) { } + } catch (err) { } +} - // NOTE: この処理は必ず↑のクライアント更新時処理より後に来ること(テーマ再構築のため) - watch(defaultStore.reactiveState.darkMode, (darkMode) => { - applyTheme(darkMode ? ColdDeviceStorage.get('darkTheme') : ColdDeviceStorage.get('lightTheme')); - }, { immediate: miLocalStorage.getItem('theme') == null }); +await defaultStore.ready; - const darkTheme = computed(ColdDeviceStorage.makeGetterSetter('darkTheme')); - const lightTheme = computed(ColdDeviceStorage.makeGetterSetter('lightTheme')); +// NOTE: この処理は必ず↑のクライアント更新時処理より後に来ること(テーマ再構築のため) +watch(defaultStore.reactiveState.darkMode, (darkMode) => { + applyTheme(darkMode ? ColdDeviceStorage.get('darkTheme') : ColdDeviceStorage.get('lightTheme')); +}, { immediate: miLocalStorage.getItem('theme') == null }); - watch(darkTheme, (theme) => { - if (defaultStore.state.darkMode) { - applyTheme(theme); - } - }); +const darkTheme = computed(ColdDeviceStorage.makeGetterSetter('darkTheme')); +const lightTheme = computed(ColdDeviceStorage.makeGetterSetter('lightTheme')); - watch(lightTheme, (theme) => { - if (!defaultStore.state.darkMode) { - applyTheme(theme); - } - }); +watch(darkTheme, (theme) => { + if (defaultStore.state.darkMode) { + applyTheme(theme); + } +}); - //#region Sync dark mode - if (ColdDeviceStorage.get('syncDeviceDarkMode')) { - defaultStore.set('darkMode', isDeviceDarkmode()); +watch(lightTheme, (theme) => { + if (!defaultStore.state.darkMode) { + applyTheme(theme); } +}); - window.matchMedia('(prefers-color-scheme: dark)').addListener(mql => { - if (ColdDeviceStorage.get('syncDeviceDarkMode')) { - defaultStore.set('darkMode', mql.matches); - } - }); - //#endregion +//#region Sync dark mode +if (ColdDeviceStorage.get('syncDeviceDarkMode')) { + defaultStore.set('darkMode', isDeviceDarkmode()); +} - fetchInstanceMetaPromise.then(() => { - if (defaultStore.state.themeInitial) { - if (instance.defaultLightTheme != null) ColdDeviceStorage.set('lightTheme', JSON5.parse(instance.defaultLightTheme)); - if (instance.defaultDarkTheme != null) ColdDeviceStorage.set('darkTheme', JSON5.parse(instance.defaultDarkTheme)); - defaultStore.set('themeInitial', false); - } - }); +window.matchMedia('(prefers-color-scheme: dark)').addListener(mql => { + if (ColdDeviceStorage.get('syncDeviceDarkMode')) { + defaultStore.set('darkMode', mql.matches); + } +}); +//#endregion - watch(defaultStore.reactiveState.useBlurEffectForModal, v => { - document.documentElement.style.setProperty('--modalBgFilter', v ? 'blur(4px)' : 'none'); - }, { immediate: true }); +fetchInstanceMetaPromise.then(() => { + if (defaultStore.state.themeInitial) { + if (instance.defaultLightTheme != null) ColdDeviceStorage.set('lightTheme', JSON5.parse(instance.defaultLightTheme)); + if (instance.defaultDarkTheme != null) ColdDeviceStorage.set('darkTheme', JSON5.parse(instance.defaultDarkTheme)); + defaultStore.set('themeInitial', false); + } +}); - watch(defaultStore.reactiveState.useBlurEffect, v => { - if (v) { - document.documentElement.style.removeProperty('--blur'); - } else { - document.documentElement.style.setProperty('--blur', 'none'); - } - }, { immediate: true }); +watch(defaultStore.reactiveState.useBlurEffectForModal, v => { + document.documentElement.style.setProperty('--modalBgFilter', v ? 'blur(4px)' : 'none'); +}, { immediate: true }); + +watch(defaultStore.reactiveState.useBlurEffect, v => { + if (v) { + document.documentElement.style.removeProperty('--blur'); + } else { + document.documentElement.style.setProperty('--blur', 'none'); + } +}, { immediate: true }); - let reloadDialogShowing = false; - stream.on('_disconnected_', async () => { - if (defaultStore.state.serverDisconnectedBehavior === 'reload') { +let reloadDialogShowing = false; +stream.on('_disconnected_', async () => { + if (defaultStore.state.serverDisconnectedBehavior === 'reload') { + location.reload(); + } else if (defaultStore.state.serverDisconnectedBehavior === 'dialog') { + if (reloadDialogShowing) return; + reloadDialogShowing = true; + const { canceled } = await confirm({ + type: 'warning', + title: i18n.ts.disconnectedFromServer, + text: i18n.ts.reloadConfirm, + }); + reloadDialogShowing = false; + if (!canceled) { location.reload(); - } else if (defaultStore.state.serverDisconnectedBehavior === 'dialog') { - if (reloadDialogShowing) return; - reloadDialogShowing = true; - const { canceled } = await confirm({ - type: 'warning', - title: i18n.ts.disconnectedFromServer, - text: i18n.ts.reloadConfirm, - }); - reloadDialogShowing = false; - if (!canceled) { - location.reload(); - } } + } +}); + +for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) { + import('./plugin').then(({ install }) => { + install(plugin); }); +} - for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) { - import('./plugin').then(({ install }) => { - install(plugin); - }); - } +const hotkeys = { + 'd': (): void => { + defaultStore.set('darkMode', !defaultStore.state.darkMode); + }, + 's': search, +}; - const hotkeys = { - 'd': (): void => { - defaultStore.set('darkMode', !defaultStore.state.darkMode); - }, - 's': search, - }; +if ($i) { + // only add post shortcuts if logged in + hotkeys['p|n'] = post; - if ($i) { - // only add post shortcuts if logged in - hotkeys['p|n'] = post; + if ($i.isDeleted) { + alert({ + type: 'warning', + text: i18n.ts.accountDeletionInProgress, + }); + } - if ($i.isDeleted) { - alert({ - type: 'warning', - text: i18n.ts.accountDeletionInProgress, - }); + const now = new Date(); + const m = now.getMonth() + 1; + const d = now.getDate(); + + if ($i.birthday) { + const bm = parseInt($i.birthday.split('-')[1]); + const bd = parseInt($i.birthday.split('-')[2]); + if (m === bm && d === bd) { + claimAchievement('loggedInOnBirthday'); } + } - const now = new Date(); - const m = now.getMonth() + 1; - const d = now.getDate(); - - if ($i.birthday) { - const bm = parseInt($i.birthday.split('-')[1]); - const bd = parseInt($i.birthday.split('-')[2]); - if (m === bm && d === bd) { - claimAchievement('loggedInOnBirthday'); - } - } + if (m === 1 && d === 1) { + claimAchievement('loggedInOnNewYearsDay'); + } - if (m === 1 && d === 1) { - claimAchievement('loggedInOnNewYearsDay'); - } + if ($i.loggedInDays >= 3) claimAchievement('login3'); + if ($i.loggedInDays >= 7) claimAchievement('login7'); + if ($i.loggedInDays >= 15) claimAchievement('login15'); + if ($i.loggedInDays >= 30) claimAchievement('login30'); + if ($i.loggedInDays >= 60) claimAchievement('login60'); + if ($i.loggedInDays >= 100) claimAchievement('login100'); + if ($i.loggedInDays >= 200) claimAchievement('login200'); + if ($i.loggedInDays >= 300) claimAchievement('login300'); + if ($i.loggedInDays >= 400) claimAchievement('login400'); + if ($i.loggedInDays >= 500) claimAchievement('login500'); + if ($i.loggedInDays >= 600) claimAchievement('login600'); + if ($i.loggedInDays >= 700) claimAchievement('login700'); + if ($i.loggedInDays >= 800) claimAchievement('login800'); + if ($i.loggedInDays >= 900) claimAchievement('login900'); + if ($i.loggedInDays >= 1000) claimAchievement('login1000'); - if ($i.loggedInDays >= 3) claimAchievement('login3'); - if ($i.loggedInDays >= 7) claimAchievement('login7'); - if ($i.loggedInDays >= 15) claimAchievement('login15'); - if ($i.loggedInDays >= 30) claimAchievement('login30'); - if ($i.loggedInDays >= 60) claimAchievement('login60'); - if ($i.loggedInDays >= 100) claimAchievement('login100'); - if ($i.loggedInDays >= 200) claimAchievement('login200'); - if ($i.loggedInDays >= 300) claimAchievement('login300'); - if ($i.loggedInDays >= 400) claimAchievement('login400'); - if ($i.loggedInDays >= 500) claimAchievement('login500'); - if ($i.loggedInDays >= 600) claimAchievement('login600'); - if ($i.loggedInDays >= 700) claimAchievement('login700'); - if ($i.loggedInDays >= 800) claimAchievement('login800'); - if ($i.loggedInDays >= 900) claimAchievement('login900'); - if ($i.loggedInDays >= 1000) claimAchievement('login1000'); + if ($i.notesCount > 0) claimAchievement('notes1'); + if ($i.notesCount >= 10) claimAchievement('notes10'); + if ($i.notesCount >= 100) claimAchievement('notes100'); + if ($i.notesCount >= 500) claimAchievement('notes500'); + if ($i.notesCount >= 1000) claimAchievement('notes1000'); + if ($i.notesCount >= 5000) claimAchievement('notes5000'); + if ($i.notesCount >= 10000) claimAchievement('notes10000'); + if ($i.notesCount >= 20000) claimAchievement('notes20000'); + if ($i.notesCount >= 30000) claimAchievement('notes30000'); + if ($i.notesCount >= 40000) claimAchievement('notes40000'); + if ($i.notesCount >= 50000) claimAchievement('notes50000'); + if ($i.notesCount >= 60000) claimAchievement('notes60000'); + if ($i.notesCount >= 70000) claimAchievement('notes70000'); + if ($i.notesCount >= 80000) claimAchievement('notes80000'); + if ($i.notesCount >= 90000) claimAchievement('notes90000'); + if ($i.notesCount >= 100000) claimAchievement('notes100000'); - if ($i.notesCount > 0) claimAchievement('notes1'); - if ($i.notesCount >= 10) claimAchievement('notes10'); - if ($i.notesCount >= 100) claimAchievement('notes100'); - if ($i.notesCount >= 500) claimAchievement('notes500'); - if ($i.notesCount >= 1000) claimAchievement('notes1000'); - if ($i.notesCount >= 5000) claimAchievement('notes5000'); - if ($i.notesCount >= 10000) claimAchievement('notes10000'); - if ($i.notesCount >= 20000) claimAchievement('notes20000'); - if ($i.notesCount >= 30000) claimAchievement('notes30000'); - if ($i.notesCount >= 40000) claimAchievement('notes40000'); - if ($i.notesCount >= 50000) claimAchievement('notes50000'); - if ($i.notesCount >= 60000) claimAchievement('notes60000'); - if ($i.notesCount >= 70000) claimAchievement('notes70000'); - if ($i.notesCount >= 80000) claimAchievement('notes80000'); - if ($i.notesCount >= 90000) claimAchievement('notes90000'); - if ($i.notesCount >= 100000) claimAchievement('notes100000'); + if ($i.followersCount > 0) claimAchievement('followers1'); + if ($i.followersCount >= 10) claimAchievement('followers10'); + if ($i.followersCount >= 50) claimAchievement('followers50'); + if ($i.followersCount >= 100) claimAchievement('followers100'); + if ($i.followersCount >= 300) claimAchievement('followers300'); + if ($i.followersCount >= 500) claimAchievement('followers500'); + if ($i.followersCount >= 1000) claimAchievement('followers1000'); - if ($i.followersCount > 0) claimAchievement('followers1'); - if ($i.followersCount >= 10) claimAchievement('followers10'); - if ($i.followersCount >= 50) claimAchievement('followers50'); - if ($i.followersCount >= 100) claimAchievement('followers100'); - if ($i.followersCount >= 300) claimAchievement('followers300'); - if ($i.followersCount >= 500) claimAchievement('followers500'); - if ($i.followersCount >= 1000) claimAchievement('followers1000'); + if (Date.now() - new Date($i.createdAt).getTime() > 1000 * 60 * 60 * 24 * 365) { + claimAchievement('passedSinceAccountCreated1'); + } + if (Date.now() - new Date($i.createdAt).getTime() > 1000 * 60 * 60 * 24 * 365 * 2) { + claimAchievement('passedSinceAccountCreated2'); + } + if (Date.now() - new Date($i.createdAt).getTime() > 1000 * 60 * 60 * 24 * 365 * 3) { + claimAchievement('passedSinceAccountCreated3'); + } - if (Date.now() - new Date($i.createdAt).getTime() > 1000 * 60 * 60 * 24 * 365) { - claimAchievement('passedSinceAccountCreated1'); - } - if (Date.now() - new Date($i.createdAt).getTime() > 1000 * 60 * 60 * 24 * 365 * 2) { - claimAchievement('passedSinceAccountCreated2'); - } - if (Date.now() - new Date($i.createdAt).getTime() > 1000 * 60 * 60 * 24 * 365 * 3) { - claimAchievement('passedSinceAccountCreated3'); - } + if (claimedAchievements.length >= 30) { + claimAchievement('collectAchievements30'); + } - if (claimedAchievements.length >= 30) { - claimAchievement('collectAchievements30'); + window.setInterval(() => { + if (Math.floor(Math.random() * 10000) === 0) { + claimAchievement('justPlainLucky'); } - - window.setInterval(() => { - if (Math.floor(Math.random() * 10000) === 0) { - claimAchievement('justPlainLucky'); - } - }, 1000 * 10); + }, 1000 * 10); - window.setTimeout(() => { - claimAchievement('client30min'); - }, 1000 * 60 * 30); + window.setTimeout(() => { + claimAchievement('client30min'); + }, 1000 * 60 * 30); - const lastUsed = miLocalStorage.getItem('lastUsed'); - if (lastUsed) { - const lastUsedDate = parseInt(lastUsed, 10); - // 二時間以上前なら - if (Date.now() - lastUsedDate > 1000 * 60 * 60 * 2) { - toast(i18n.t('welcomeBackWithName', { - name: $i.name || $i.username, - })); - } + const lastUsed = miLocalStorage.getItem('lastUsed'); + if (lastUsed) { + const lastUsedDate = parseInt(lastUsed, 10); + // 二時間以上前なら + if (Date.now() - lastUsedDate > 1000 * 60 * 60 * 2) { + toast(i18n.t('welcomeBackWithName', { + name: $i.name || $i.username, + })); } - miLocalStorage.setItem('lastUsed', Date.now().toString()); + } + miLocalStorage.setItem('lastUsed', Date.now().toString()); - const latestDonationInfoShownAt = miLocalStorage.getItem('latestDonationInfoShownAt'); - const neverShowDonationInfo = miLocalStorage.getItem('neverShowDonationInfo'); - if (neverShowDonationInfo !== 'true' && (new Date($i.createdAt).getTime() < (Date.now() - (1000 * 60 * 60 * 24 * 3)))) { - if (latestDonationInfoShownAt == null || (new Date(latestDonationInfoShownAt).getTime() < (Date.now() - (1000 * 60 * 60 * 24 * 30)))) { - popup(defineAsyncComponent(() => import('@/components/MkDonation.vue')), {}, {}, 'closed'); - } + const latestDonationInfoShownAt = miLocalStorage.getItem('latestDonationInfoShownAt'); + const neverShowDonationInfo = miLocalStorage.getItem('neverShowDonationInfo'); + if (neverShowDonationInfo !== 'true' && (new Date($i.createdAt).getTime() < (Date.now() - (1000 * 60 * 60 * 24 * 3)))) { + if (latestDonationInfoShownAt == null || (new Date(latestDonationInfoShownAt).getTime() < (Date.now() - (1000 * 60 * 60 * 24 * 30)))) { + popup(defineAsyncComponent(() => import('@/components/MkDonation.vue')), {}, {}, 'closed'); } + } - if ('Notification' in window) { - // 許可を得ていなかったらリクエスト - if (Notification.permission === 'default') { - Notification.requestPermission(); - } + if ('Notification' in window) { + // 許可を得ていなかったらリクエスト + if (Notification.permission === 'default') { + Notification.requestPermission(); } + } - const main = markRaw(stream.useChannel('main', null, 'System')); + const main = markRaw(stream.useChannel('main', null, 'System')); - // 自分の情報が更新されたとき - main.on('meUpdated', i => { - updateAccount(i); - }); + // 自分の情報が更新されたとき + main.on('meUpdated', i => { + updateAccount(i); + }); - main.on('readAllNotifications', () => { - updateAccount({ hasUnreadNotification: false }); - }); + main.on('readAllNotifications', () => { + updateAccount({ hasUnreadNotification: false }); + }); - main.on('unreadNotification', () => { - updateAccount({ hasUnreadNotification: true }); - }); + main.on('unreadNotification', () => { + updateAccount({ hasUnreadNotification: true }); + }); - main.on('unreadMention', () => { - updateAccount({ hasUnreadMentions: true }); - }); + main.on('unreadMention', () => { + updateAccount({ hasUnreadMentions: true }); + }); - main.on('readAllUnreadMentions', () => { - updateAccount({ hasUnreadMentions: false }); - }); + main.on('readAllUnreadMentions', () => { + updateAccount({ hasUnreadMentions: false }); + }); - main.on('unreadSpecifiedNote', () => { - updateAccount({ hasUnreadSpecifiedNotes: true }); - }); + main.on('unreadSpecifiedNote', () => { + updateAccount({ hasUnreadSpecifiedNotes: true }); + }); - main.on('readAllUnreadSpecifiedNotes', () => { - updateAccount({ hasUnreadSpecifiedNotes: false }); - }); + main.on('readAllUnreadSpecifiedNotes', () => { + updateAccount({ hasUnreadSpecifiedNotes: false }); + }); - main.on('readAllMessagingMessages', () => { - updateAccount({ hasUnreadMessagingMessage: false }); - }); + main.on('readAllMessagingMessages', () => { + updateAccount({ hasUnreadMessagingMessage: false }); + }); - main.on('unreadMessagingMessage', () => { - updateAccount({ hasUnreadMessagingMessage: true }); - sound.play('chatBg'); - }); + main.on('unreadMessagingMessage', () => { + updateAccount({ hasUnreadMessagingMessage: true }); + sound.play('chatBg'); + }); - main.on('readAllAntennas', () => { - updateAccount({ hasUnreadAntenna: false }); - }); + main.on('readAllAntennas', () => { + updateAccount({ hasUnreadAntenna: false }); + }); - main.on('unreadAntenna', () => { - updateAccount({ hasUnreadAntenna: true }); - sound.play('antenna'); - }); + main.on('unreadAntenna', () => { + updateAccount({ hasUnreadAntenna: true }); + sound.play('antenna'); + }); - main.on('readAllAnnouncements', () => { - updateAccount({ hasUnreadAnnouncement: false }); - }); + main.on('readAllAnnouncements', () => { + updateAccount({ hasUnreadAnnouncement: false }); + }); - main.on('readAllChannels', () => { - updateAccount({ hasUnreadChannel: false }); - }); + main.on('readAllChannels', () => { + updateAccount({ hasUnreadChannel: false }); + }); - main.on('unreadChannel', () => { - updateAccount({ hasUnreadChannel: true }); - sound.play('channel'); - }); + main.on('unreadChannel', () => { + updateAccount({ hasUnreadChannel: true }); + sound.play('channel'); + }); - // トークンが再生成されたとき - // このままではMisskeyが利用できないので強制的にサインアウトさせる - main.on('myTokenRegenerated', () => { - signout(); - }); - } + // トークンが再生成されたとき + // このままではMisskeyが利用できないので強制的にサインアウトさせる + main.on('myTokenRegenerated', () => { + signout(); + }); +} - // shortcut - document.addEventListener('keydown', makeHotkey(hotkeys)); -})(); +// shortcut +document.addEventListener('keydown', makeHotkey(hotkeys)); diff --git a/packages/frontend/src/pages/admin/index.vue b/packages/frontend/src/pages/admin/index.vue index 0166960ff6..9a07d3c959 100644 --- a/packages/frontend/src/pages/admin/index.vue +++ b/packages/frontend/src/pages/admin/index.vue @@ -165,11 +165,6 @@ const menuDef = $computed(() => [{ to: '/admin/relays', active: currentPage?.route.name === 'relays', }, { - icon: 'ti ti-share', - text: i18n.ts.integration, - to: '/admin/integrations', - active: currentPage?.route.name === 'integrations', - }, { icon: 'ti ti-ban', text: i18n.ts.instanceBlocking, to: '/admin/instance-block', diff --git a/packages/frontend/src/pages/admin/integrations.discord.vue b/packages/frontend/src/pages/admin/integrations.discord.vue deleted file mode 100644 index 68ea040d7e..0000000000 --- a/packages/frontend/src/pages/admin/integrations.discord.vue +++ /dev/null @@ -1,60 +0,0 @@ -<template> -<FormSuspense :p="init"> - <div class="_gaps_m"> - <MkSwitch v-model="enableDiscordIntegration"> - <template #label>{{ i18n.ts.enable }}</template> - </MkSwitch> - - <template v-if="enableDiscordIntegration"> - <FormInfo>Callback URL: {{ `${uri}/api/dc/cb` }}</FormInfo> - - <MkInput v-model="discordClientId"> - <template #prefix><i class="ti ti-key"></i></template> - <template #label>Client ID</template> - </MkInput> - - <MkInput v-model="discordClientSecret"> - <template #prefix><i class="ti ti-key"></i></template> - <template #label>Client Secret</template> - </MkInput> - </template> - - <MkButton primary @click="save"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton> - </div> -</FormSuspense> -</template> - -<script lang="ts" setup> -import { } from 'vue'; -import MkSwitch from '@/components/MkSwitch.vue'; -import MkInput from '@/components/MkInput.vue'; -import MkButton from '@/components/MkButton.vue'; -import FormInfo from '@/components/MkInfo.vue'; -import FormSuspense from '@/components/form/suspense.vue'; -import * as os from '@/os'; -import { fetchInstance } from '@/instance'; -import { i18n } from '@/i18n'; - -let uri: string = $ref(''); -let enableDiscordIntegration: boolean = $ref(false); -let discordClientId: string | null = $ref(null); -let discordClientSecret: string | null = $ref(null); - -async function init() { - const meta = await os.api('admin/meta'); - uri = meta.uri; - enableDiscordIntegration = meta.enableDiscordIntegration; - discordClientId = meta.discordClientId; - discordClientSecret = meta.discordClientSecret; -} - -function save() { - os.apiWithDialog('admin/update-meta', { - enableDiscordIntegration, - discordClientId, - discordClientSecret, - }).then(() => { - fetchInstance(); - }); -} -</script> diff --git a/packages/frontend/src/pages/admin/integrations.github.vue b/packages/frontend/src/pages/admin/integrations.github.vue deleted file mode 100644 index 2bd7852773..0000000000 --- a/packages/frontend/src/pages/admin/integrations.github.vue +++ /dev/null @@ -1,60 +0,0 @@ -<template> -<FormSuspense :p="init"> - <div class="_gaps_m"> - <MkSwitch v-model="enableGithubIntegration"> - <template #label>{{ i18n.ts.enable }}</template> - </MkSwitch> - - <template v-if="enableGithubIntegration"> - <FormInfo>Callback URL: {{ `${uri}/api/gh/cb` }}</FormInfo> - - <MkInput v-model="githubClientId"> - <template #prefix><i class="ti ti-key"></i></template> - <template #label>Client ID</template> - </MkInput> - - <MkInput v-model="githubClientSecret"> - <template #prefix><i class="ti ti-key"></i></template> - <template #label>Client Secret</template> - </MkInput> - </template> - - <MkButton primary @click="save"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton> - </div> -</FormSuspense> -</template> - -<script lang="ts" setup> -import { } from 'vue'; -import MkSwitch from '@/components/MkSwitch.vue'; -import MkInput from '@/components/MkInput.vue'; -import MkButton from '@/components/MkButton.vue'; -import FormInfo from '@/components/MkInfo.vue'; -import FormSuspense from '@/components/form/suspense.vue'; -import * as os from '@/os'; -import { fetchInstance } from '@/instance'; -import { i18n } from '@/i18n'; - -let uri: string = $ref(''); -let enableGithubIntegration: boolean = $ref(false); -let githubClientId: string | null = $ref(null); -let githubClientSecret: string | null = $ref(null); - -async function init() { - const meta = await os.api('admin/meta'); - uri = meta.uri; - enableGithubIntegration = meta.enableGithubIntegration; - githubClientId = meta.githubClientId; - githubClientSecret = meta.githubClientSecret; -} - -function save() { - os.apiWithDialog('admin/update-meta', { - enableGithubIntegration, - githubClientId, - githubClientSecret, - }).then(() => { - fetchInstance(); - }); -} -</script> diff --git a/packages/frontend/src/pages/admin/integrations.twitter.vue b/packages/frontend/src/pages/admin/integrations.twitter.vue deleted file mode 100644 index aa65833663..0000000000 --- a/packages/frontend/src/pages/admin/integrations.twitter.vue +++ /dev/null @@ -1,60 +0,0 @@ -<template> -<FormSuspense :p="init"> - <div class="_gaps_m"> - <MkSwitch v-model="enableTwitterIntegration"> - <template #label>{{ i18n.ts.enable }}</template> - </MkSwitch> - - <template v-if="enableTwitterIntegration"> - <FormInfo>Callback URL: {{ `${uri}/api/tw/cb` }}</FormInfo> - - <MkInput v-model="twitterConsumerKey"> - <template #prefix><i class="ti ti-key"></i></template> - <template #label>Consumer Key</template> - </MkInput> - - <MkInput v-model="twitterConsumerSecret"> - <template #prefix><i class="ti ti-key"></i></template> - <template #label>Consumer Secret</template> - </MkInput> - </template> - - <MkButton primary @click="save"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton> - </div> -</FormSuspense> -</template> - -<script lang="ts" setup> -import { defineComponent } from 'vue'; -import MkSwitch from '@/components/MkSwitch.vue'; -import MkInput from '@/components/MkInput.vue'; -import MkButton from '@/components/MkButton.vue'; -import FormInfo from '@/components/MkInfo.vue'; -import FormSuspense from '@/components/form/suspense.vue'; -import * as os from '@/os'; -import { fetchInstance } from '@/instance'; -import { i18n } from '@/i18n'; - -let uri: string = $ref(''); -let enableTwitterIntegration: boolean = $ref(false); -let twitterConsumerKey: string | null = $ref(null); -let twitterConsumerSecret: string | null = $ref(null); - -async function init() { - const meta = await os.api('admin/meta'); - uri = meta.uri; - enableTwitterIntegration = meta.enableTwitterIntegration; - twitterConsumerKey = meta.twitterConsumerKey; - twitterConsumerSecret = meta.twitterConsumerSecret; -} - -function save() { - os.apiWithDialog('admin/update-meta', { - enableTwitterIntegration, - twitterConsumerKey, - twitterConsumerSecret, - }).then(() => { - fetchInstance(); - }); -} -</script> diff --git a/packages/frontend/src/pages/admin/integrations.vue b/packages/frontend/src/pages/admin/integrations.vue deleted file mode 100644 index 6888a492f6..0000000000 --- a/packages/frontend/src/pages/admin/integrations.vue +++ /dev/null @@ -1,61 +0,0 @@ -<template> -<MkStickyContainer> - <template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template> - <MkSpacer :content-max="700" :margin-min="16" :margin-max="32"> - <FormSuspense :p="init"> - <div class="_gaps_m"> - <MkFolder> - <template #icon><i class="ti ti-brand-twitter"></i></template> - <template #label>Twitter</template> - <template #suffix>{{ enableTwitterIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template> - <XTwitter/> - </MkFolder> - <MkFolder> - <template #icon><i class="ti ti-brand-github"></i></template> - <template #label>GitHub</template> - <template #suffix>{{ enableGithubIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template> - <XGithub/> - </MkFolder> - <MkFolder> - <template #icon><i class="ti ti-brand-discord"></i></template> - <template #label>Discord</template> - <template #suffix>{{ enableDiscordIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template> - <XDiscord/> - </MkFolder> - </div> - </FormSuspense> - </MkSpacer> -</MkStickyContainer> -</template> - -<script lang="ts" setup> -import { } from 'vue'; -import XTwitter from './integrations.twitter.vue'; -import XGithub from './integrations.github.vue'; -import XDiscord from './integrations.discord.vue'; -import FormSuspense from '@/components/form/suspense.vue'; -import MkFolder from '@/components/MkFolder.vue'; -import * as os from '@/os'; -import { i18n } from '@/i18n'; -import { definePageMetadata } from '@/scripts/page-metadata'; - -let enableTwitterIntegration: boolean = $ref(false); -let enableGithubIntegration: boolean = $ref(false); -let enableDiscordIntegration: boolean = $ref(false); - -async function init() { - const meta = await os.api('admin/meta'); - enableTwitterIntegration = meta.enableTwitterIntegration; - enableGithubIntegration = meta.enableGithubIntegration; - enableDiscordIntegration = meta.enableDiscordIntegration; -} - -const headerActions = $computed(() => []); - -const headerTabs = $computed(() => []); - -definePageMetadata({ - title: i18n.ts.integration, - icon: 'ti ti-share', -}); -</script> diff --git a/packages/frontend/src/pages/settings/index.vue b/packages/frontend/src/pages/settings/index.vue index 4dbc6ec74c..8631f3e341 100644 --- a/packages/frontend/src/pages/settings/index.vue +++ b/packages/frontend/src/pages/settings/index.vue @@ -90,11 +90,6 @@ const menuDef = computed(() => [{ to: '/settings/email', active: currentPage?.route.name === 'email', }, { - icon: 'ti ti-share', - text: i18n.ts.integration, - to: '/settings/integration', - active: currentPage?.route.name === 'integration', - }, { icon: 'ti ti-lock', text: i18n.ts.security, to: '/settings/security', diff --git a/packages/frontend/src/pages/settings/integration.vue b/packages/frontend/src/pages/settings/integration.vue deleted file mode 100644 index 1e5a785465..0000000000 --- a/packages/frontend/src/pages/settings/integration.vue +++ /dev/null @@ -1,99 +0,0 @@ -<template> -<div class="_gaps_m"> - <FormSection v-if="instance.enableTwitterIntegration"> - <template #label><i class="ti ti-brand-twitter"></i> Twitter</template> - <p v-if="integrations.twitter">{{ i18n.ts.connectedTo }}: <a :href="`https://twitter.com/${integrations.twitter.screenName}`" rel="nofollow noopener" target="_blank">@{{ integrations.twitter.screenName }}</a></p> - <MkButton v-if="integrations.twitter" danger @click="disconnectTwitter">{{ i18n.ts.disconnectService }}</MkButton> - <MkButton v-else primary @click="connectTwitter">{{ i18n.ts.connectService }}</MkButton> - </FormSection> - - <FormSection v-if="instance.enableDiscordIntegration"> - <template #label><i class="ti ti-brand-discord"></i> Discord</template> - <p v-if="integrations.discord">{{ i18n.ts.connectedTo }}: <a :href="`https://discord.com/users/${integrations.discord.id}`" rel="nofollow noopener" target="_blank">@{{ integrations.discord.username }}#{{ integrations.discord.discriminator }}</a></p> - <MkButton v-if="integrations.discord" danger @click="disconnectDiscord">{{ i18n.ts.disconnectService }}</MkButton> - <MkButton v-else primary @click="connectDiscord">{{ i18n.ts.connectService }}</MkButton> - </FormSection> - - <FormSection v-if="instance.enableGithubIntegration"> - <template #label><i class="ti ti-brand-github"></i> GitHub</template> - <p v-if="integrations.github">{{ i18n.ts.connectedTo }}: <a :href="`https://github.com/${integrations.github.login}`" rel="nofollow noopener" target="_blank">@{{ integrations.github.login }}</a></p> - <MkButton v-if="integrations.github" danger @click="disconnectGithub">{{ i18n.ts.disconnectService }}</MkButton> - <MkButton v-else primary @click="connectGithub">{{ i18n.ts.connectService }}</MkButton> - </FormSection> -</div> -</template> - -<script lang="ts" setup> -import { computed, onMounted, ref, watch } from 'vue'; -import { apiUrl } from '@/config'; -import FormSection from '@/components/form/section.vue'; -import MkButton from '@/components/MkButton.vue'; -import { $i } from '@/account'; -import { instance } from '@/instance'; -import { i18n } from '@/i18n'; -import { definePageMetadata } from '@/scripts/page-metadata'; - -const twitterForm = ref<Window | null>(null); -const discordForm = ref<Window | null>(null); -const githubForm = ref<Window | null>(null); - -const integrations = computed(() => $i!.integrations); - -function openWindow(service: string, type: string) { - return window.open(`${apiUrl}/${type}/${service}`, - `${service}_${type}_window`, - 'height=570, width=520', - ); -} - -function connectTwitter() { - twitterForm.value = openWindow('twitter', 'connect'); -} - -function disconnectTwitter() { - openWindow('twitter', 'disconnect'); -} - -function connectDiscord() { - discordForm.value = openWindow('discord', 'connect'); -} - -function disconnectDiscord() { - openWindow('discord', 'disconnect'); -} - -function connectGithub() { - githubForm.value = openWindow('github', 'connect'); -} - -function disconnectGithub() { - openWindow('github', 'disconnect'); -} - -onMounted(() => { - document.cookie = `igi=${$i!.token}; path=/;` + - ' max-age=31536000;' + - (document.location.protocol.startsWith('https') ? ' secure' : ''); - - watch(integrations, () => { - if (integrations.value.twitter) { - if (twitterForm.value) twitterForm.value.close(); - } - if (integrations.value.discord) { - if (discordForm.value) discordForm.value.close(); - } - if (integrations.value.github) { - if (githubForm.value) githubForm.value.close(); - } - }); -}); - -const headerActions = $computed(() => []); - -const headerTabs = $computed(() => []); - -definePageMetadata({ - title: i18n.ts.integration, - icon: 'ti ti-share', -}); -</script> diff --git a/packages/frontend/src/pizzax.ts b/packages/frontend/src/pizzax.ts index 7ff09f75fb..2ca89b7351 100644 --- a/packages/frontend/src/pizzax.ts +++ b/packages/frontend/src/pizzax.ts @@ -1,136 +1,209 @@ // PIZZAX --- A lightweight store import { onUnmounted, Ref, ref, watch } from 'vue'; +import { BroadcastChannel } from 'broadcast-channel'; import { $i } from './account'; import { api } from './os'; +import { get, set } from './scripts/idb-proxy'; +import { defaultStore } from './store'; import { stream } from './stream'; +import { deepClone } from './scripts/clone'; type StateDef = Record<string, { where: 'account' | 'device' | 'deviceAccount'; default: any; }>; +type State<T extends StateDef> = { [K in keyof T]: T[K]['default']; }; +type ReactiveState<T extends StateDef> = { [K in keyof T]: Ref<T[K]['default']>; }; + type ArrayElement<A> = A extends readonly (infer T)[] ? T : never; +type PizzaxChannelMessage<T extends StateDef> = { + where: 'device' | 'deviceAccount'; + key: keyof T; + value: T[keyof T]['default']; + userId?: string; +}; + const connection = $i && stream.useChannel('main'); export class Storage<T extends StateDef> { + public readonly ready: Promise<void>; + public readonly loaded: Promise<void>; + public readonly key: string; - public readonly keyForLocalStorage: string; + public readonly deviceStateKeyName: `pizzax::${this['key']}`; + public readonly deviceAccountStateKeyName: `pizzax::${this['key']}::${string}` | ''; + public readonly registryCacheKeyName: `pizzax::${this['key']}::cache::${string}` | ''; public readonly def: T; // TODO: これが実装されたらreadonlyにしたい: https://github.com/microsoft/TypeScript/issues/37487 - public readonly state: { [K in keyof T]: T[K]['default'] }; - public readonly reactiveState: { [K in keyof T]: Ref<T[K]['default']> }; - public readonly ready: Promise<void>; - private markAsReady: () => void = () => {}; + public readonly state: State<T>; + public readonly reactiveState: ReactiveState<T>; - constructor(key: string, def: T) { - this.ready = new Promise((res) => { - this.markAsReady = res; + private pizzaxChannel: BroadcastChannel<PizzaxChannelMessage<T>>; + + // 簡易的にキューイングして占有ロックとする + private currentIdbJob: Promise<any> = Promise.resolve(); + private addIdbSetJob<T>(job: () => Promise<T>) { + const promise = this.currentIdbJob.then(job, e => { + console.error('Pizzax failed to save data to idb!', e); + return job(); }); + this.currentIdbJob = promise; + return promise; + } + + constructor(key: string, def: T) { this.key = key; - this.keyForLocalStorage = 'pizzax::' + key; + this.deviceStateKeyName = `pizzax::${key}`; + this.deviceAccountStateKeyName = $i ? `pizzax::${key}::${$i.id}` : ''; + this.registryCacheKeyName = $i ? `pizzax::${key}::cache::${$i.id}` : ''; this.def = def; - // TODO: indexedDBにする - const deviceState = JSON.parse(localStorage.getItem(this.keyForLocalStorage) || '{}'); - const deviceAccountState = $i ? JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::' + $i.id) || '{}') : {}; - const registryCache = $i ? JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::cache::' + $i.id) || '{}') : {}; + this.pizzaxChannel = new BroadcastChannel(`pizzax::${key}`); + + this.state = {} as State<T>; + this.reactiveState = {} as ReactiveState<T>; + + for (const [k, v] of Object.entries(def) as [keyof T, T[keyof T]['default']][]) { + this.state[k] = v.default; + this.reactiveState[k] = ref(v.default); + } + + this.ready = this.init(); + this.loaded = this.ready.then(() => this.load()); + } + + private async init(): Promise<void> { + await this.migrate(); - const state = {}; - const reactiveState = {}; - for (const [k, v] of Object.entries(def)) { + const deviceState: State<T> = await get(this.deviceStateKeyName) || {}; + const deviceAccountState = $i ? await get(this.deviceAccountStateKeyName) || {} : {}; + const registryCache = $i ? await get(this.registryCacheKeyName) || {} : {}; + + for (const [k, v] of Object.entries(this.def) as [keyof T, T[keyof T]['default']][]) { if (v.where === 'device' && Object.prototype.hasOwnProperty.call(deviceState, k)) { - state[k] = deviceState[k]; + this.reactiveState[k].value = this.state[k] = deviceState[k]; } else if (v.where === 'account' && $i && Object.prototype.hasOwnProperty.call(registryCache, k)) { - state[k] = registryCache[k]; + this.reactiveState[k].value = this.state[k] = registryCache[k]; } else if (v.where === 'deviceAccount' && Object.prototype.hasOwnProperty.call(deviceAccountState, k)) { - state[k] = deviceAccountState[k]; + this.reactiveState[k].value = this.state[k] = deviceAccountState[k]; } else { - state[k] = v.default; + this.reactiveState[k].value = this.state[k] = v.default; if (_DEV_) console.log('Use default value', k, v.default); } } - for (const [k, v] of Object.entries(state)) { - reactiveState[k] = ref(v); - } - this.state = state as any; - this.reactiveState = reactiveState as any; - + + this.pizzaxChannel.addEventListener('message', ({ where, key, value, userId }) => { + // アカウント変更すればunisonReloadが効くため、このreturnが発火することは + // まずないと思うけど一応弾いておく + if (where === 'deviceAccount' && !($i && userId !== $i.id)) return; + this.reactiveState[key].value = this.state[key] = value; + }); + if ($i) { - // なぜかsetTimeoutしないとapi関数内でエラーになる(おそらく循環参照してることに原因がありそう) - window.setTimeout(() => { - api('i/registry/get-all', { scope: ['client', this.key] }).then(kvs => { - const cache = {}; - for (const [k, v] of Object.entries(def)) { - if (v.where === 'account') { - if (Object.prototype.hasOwnProperty.call(kvs, k)) { - state[k] = kvs[k]; - reactiveState[k].value = kvs[k]; - cache[k] = kvs[k]; - } else { - state[k] = v.default; - reactiveState[k].value = v.default; - } - } - } - localStorage.setItem(this.keyForLocalStorage + '::cache::' + $i.id, JSON.stringify(cache)); - this.markAsReady(); - }); - }, 1); // streamingのuser storage updateイベントを監視して更新 - connection?.on('registryUpdated', ({ scope, key, value }: { scope: string[], key: keyof T, value: T[typeof key]['default'] }) => { - if (scope.length !== 2 || scope[0] !== 'client' || scope[1] !== this.key || this.state[key] === value) return; - - this.state[key] = value; - this.reactiveState[key].value = value; + connection?.on('registryUpdated', ({ scope, key, value }: { scope?: string[], key: keyof T, value: T[typeof key]['default'] }) => { + if (!scope || scope.length !== 2 || scope[0] !== 'client' || scope[1] !== this.key || this.state[key] === value) return; - const cache = JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::cache::' + $i.id) || '{}'); - if (cache[key] !== value) { - cache[key] = value; - localStorage.setItem(this.keyForLocalStorage + '::cache::' + $i.id, JSON.stringify(cache)); - } + this.reactiveState[key].value = this.state[key] = value; + + this.addIdbSetJob(async () => { + const cache = await get(this.registryCacheKeyName); + if (cache[key] !== value) { + cache[key] = value; + await set(this.registryCacheKeyName, cache); + } + }); }); - } else { - this.markAsReady(); } } - public set<K extends keyof T>(key: K, value: T[K]['default']): void { - if (_DEV_) console.log('set', key, value); - - this.state[key] = value; - this.reactiveState[key].value = value; + private load(): Promise<void> { + return new Promise((resolve, reject) => { + if ($i) { + // api関数と循環参照なので一応setTimeoutしておく + window.setTimeout(async () => { + await defaultStore.ready; - switch (this.def[key].where) { - case 'device': { - const deviceState = JSON.parse(localStorage.getItem(this.keyForLocalStorage) || '{}'); - deviceState[key] = value; - localStorage.setItem(this.keyForLocalStorage, JSON.stringify(deviceState)); - break; - } - case 'deviceAccount': { - if ($i == null) break; - const deviceAccountState = JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::' + $i.id) || '{}'); - deviceAccountState[key] = value; - localStorage.setItem(this.keyForLocalStorage + '::' + $i.id, JSON.stringify(deviceAccountState)); - break; + api('i/registry/get-all', { scope: ['client', this.key] }) + .then(kvs => { + const cache: Partial<T> = {}; + for (const [k, v] of Object.entries(this.def) as [keyof T, T[keyof T]['default']][]) { + if (v.where === 'account') { + if (Object.prototype.hasOwnProperty.call(kvs, k)) { + this.reactiveState[k].value = this.state[k] = (kvs as Partial<T>)[k]; + cache[k] = (kvs as Partial<T>)[k]; + } else { + this.reactiveState[k].value = this.state[k] = v.default; + } + } + } + + return set(this.registryCacheKeyName, cache); + }) + .then(() => resolve()); + }, 1); + } else { + resolve(); } - case 'account': { - if ($i == null) break; - const cache = JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::cache::' + $i.id) || '{}'); - cache[key] = value; - localStorage.setItem(this.keyForLocalStorage + '::cache::' + $i.id, JSON.stringify(cache)); - api('i/registry/set', { - scope: ['client', this.key], - key: key, - value: value, - }); - break; + }); + } + + public set<K extends keyof T>(key: K, value: T[K]['default']): Promise<void> { + // IndexedDBやBroadcastChannelで扱うために単純なオブジェクトにする + // (JSON.parse(JSON.stringify(value))の代わり) + const rawValue = deepClone(value); + + if (_DEV_) console.log('set', key, rawValue, value); + + this.reactiveState[key].value = this.state[key] = rawValue; + + return this.addIdbSetJob(async () => { + if (_DEV_) console.log(`set ${key} start`); + switch (this.def[key].where) { + case 'device': { + this.pizzaxChannel.postMessage({ + where: 'device', + key, + value: rawValue, + }); + const deviceState = await get(this.deviceStateKeyName) || {}; + deviceState[key] = rawValue; + await set(this.deviceStateKeyName, deviceState); + break; + } + case 'deviceAccount': { + if ($i == null) break; + this.pizzaxChannel.postMessage({ + where: 'deviceAccount', + key, + value: rawValue, + userId: $i.id, + }); + const deviceAccountState = await get(this.deviceAccountStateKeyName) || {}; + deviceAccountState[key] = rawValue; + await set(this.deviceAccountStateKeyName, deviceAccountState); + break; + } + case 'account': { + if ($i == null) break; + const cache = await get(this.registryCacheKeyName) || {}; + cache[key] = rawValue; + await set(this.registryCacheKeyName, cache); + await api('i/registry/set', { + scope: ['client', this.key], + key: key.toString(), + value: rawValue, + }); + break; + } } - } + if (_DEV_) console.log(`set ${key} complete`); + }); } public push<K extends keyof T>(key: K, value: ArrayElement<T[K]['default']>): void { @@ -140,6 +213,7 @@ export class Storage<T extends StateDef> { public reset(key: keyof T) { this.set(key, this.def[key].default); + return this.def[key].default; } /** @@ -174,4 +248,25 @@ export class Storage<T extends StateDef> { }, }; } + + // localStorage => indexedDBのマイグレーション + private async migrate() { + const deviceState = localStorage.getItem(this.deviceStateKeyName); + if (deviceState) { + await set(this.deviceStateKeyName, JSON.parse(deviceState)); + localStorage.removeItem(this.deviceStateKeyName); + } + + const deviceAccountState = $i && localStorage.getItem(this.deviceAccountStateKeyName); + if ($i && deviceAccountState) { + await set(this.deviceAccountStateKeyName, JSON.parse(deviceAccountState)); + localStorage.removeItem(this.deviceAccountStateKeyName); + } + + const registryCache = $i && localStorage.getItem(this.registryCacheKeyName); + if ($i && registryCache) { + await set(this.registryCacheKeyName, JSON.parse(registryCache)); + localStorage.removeItem(this.registryCacheKeyName); + } + } } diff --git a/packages/frontend/src/router.ts b/packages/frontend/src/router.ts index 22106e1595..595b1f622a 100644 --- a/packages/frontend/src/router.ts +++ b/packages/frontend/src/router.ts @@ -71,10 +71,6 @@ export const routes = [{ name: 'email', component: page(() => import('./pages/settings/email.vue')), }, { - path: '/integration', - name: 'integration', - component: page(() => import('./pages/settings/integration.vue')), - }, { path: '/security', name: 'security', component: page(() => import('./pages/settings/security.vue')), @@ -400,10 +396,6 @@ export const routes = [{ name: 'relays', component: page(() => import('./pages/admin/relays.vue')), }, { - path: '/integrations', - name: 'integrations', - component: page(() => import('./pages/admin/integrations.vue')), - }, { path: '/instance-block', name: 'instance-block', component: page(() => import('./pages/admin/instance-block.vue')), diff --git a/packages/frontend/src/scripts/device-kind.ts b/packages/frontend/src/scripts/device-kind.ts index 6bb349c554..b575db9606 100644 --- a/packages/frontend/src/scripts/device-kind.ts +++ b/packages/frontend/src/scripts/device-kind.ts @@ -1,5 +1,7 @@ import { defaultStore } from '@/store'; +await defaultStore.ready; + const ua = navigator.userAgent.toLowerCase(); const isTablet = /ipad/.test(ua) || (/mobile|iphone|android/.test(ua) && window.innerWidth > 700); const isSmartphone = !isTablet && /mobile|iphone|android/.test(ua); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index f9ad50b30d..8ecf59edb2 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -86,10 +86,6 @@ export const defaultStore = markRaw(new Storage('base', { where: 'account', default: [] as string[], }, - hiddenAds: { - where: 'account', - default: [] as string[], - }, menu: { where: 'deviceAccount', @@ -333,6 +329,16 @@ export class ColdDeviceStorage { } } + public static getAll(): Partial<typeof this.default> { + return (Object.keys(this.default) as (keyof typeof this.default)[]).reduce((acc, key) => { + const value = localStorage.getItem(PREFIX + key); + if (value != null) { + acc[key] = JSON.parse(value); + } + return acc; + }, {} as any); + } + public static set<T extends keyof typeof ColdDeviceStorage.default>(key: T, value: typeof ColdDeviceStorage.default[T]): void { // 呼び出し側のバグ等で undefined が来ることがある // undefined を文字列として miLocalStorage に入れると参照する際の JSON.parse でコケて不具合の元になるため無視 diff --git a/packages/frontend/src/ui/_common_/sw-inject.ts b/packages/frontend/src/ui/_common_/sw-inject.ts index 8676d2d48d..a92a06bd3e 100644 --- a/packages/frontend/src/ui/_common_/sw-inject.ts +++ b/packages/frontend/src/ui/_common_/sw-inject.ts @@ -1,7 +1,5 @@ -import { inject } from 'vue'; import { post } from '@/os'; import { $i, login } from '@/account'; -import { defaultStore } from '@/store'; import { getAccountFromId } from '@/scripts/get-account-from-id'; import { mainRouter } from '@/router'; diff --git a/packages/frontend/src/ui/classic.vue b/packages/frontend/src/ui/classic.vue index a5c2f8ca23..02dafcc3b6 100644 --- a/packages/frontend/src/ui/classic.vue +++ b/packages/frontend/src/ui/classic.vue @@ -132,7 +132,7 @@ if (window.innerWidth < 1024) { document.documentElement.style.overflowY = 'scroll'; -defaultStore.ready.then(() => { +defaultStore.loaded.then(() => { if (defaultStore.state.widgets.length === 0) { defaultStore.set('widgets', [{ name: 'calendar', diff --git a/packages/frontend/src/ui/universal.vue b/packages/frontend/src/ui/universal.vue index a9bb85ab6a..eac7e7e856 100644 --- a/packages/frontend/src/ui/universal.vue +++ b/packages/frontend/src/ui/universal.vue @@ -150,7 +150,7 @@ if (window.innerWidth > 1024) { } } -defaultStore.ready.then(() => { +defaultStore.loaded.then(() => { if (defaultStore.state.widgets.length === 0) { defaultStore.set('widgets', [{ name: 'calendar', diff --git a/packages/sw/package.json b/packages/sw/package.json index 1743b898cb..d44c3bccae 100644 --- a/packages/sw/package.json +++ b/packages/sw/package.json @@ -7,15 +7,15 @@ "lint": "tsc --noEmit && eslint --quiet src/**/*.ts" }, "dependencies": { - "esbuild": "^0.14.42", - "idb-keyval": "^6.2.0", - "misskey-js": "0.0.14" + "esbuild": "0.14.42", + "idb-keyval": "6.2.0", + "misskey-js": "0.0.15" }, "devDependencies": { - "@typescript-eslint/parser": "^5.49.0", + "@typescript-eslint/parser": "5.50.0", "@typescript/lib-webworker": "npm:@types/serviceworker@0.0.61", - "eslint": "^8.32.0", - "eslint-plugin-import": "^2.27.5", - "typescript": "4.9.4" + "eslint": "8.33.0", + "eslint-plugin-import": "2.27.5", + "typescript": "4.9.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 40f2b36068..eff3e7d53e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,21 +1,21 @@ lockfileVersion: 5.4 overrides: - chokidar: ^3.5.3 - lodash: ^4.17.21 + chokidar: 3.5.3 + lodash: 4.17.21 importers: .: specifiers: - '@tensorflow/tfjs-core': ^4.2.0 + '@tensorflow/tfjs-core': 4.2.0 '@types/gulp': 4.0.10 '@types/gulp-rename': 2.0.1 - '@typescript-eslint/eslint-plugin': 5.49.0 - '@typescript-eslint/parser': 5.49.0 + '@typescript-eslint/eslint-plugin': 5.50.0 + '@typescript-eslint/parser': 5.50.0 cross-env: 7.0.3 - cypress: 12.4.0 - eslint: ^8.32.0 + cypress: 12.5.1 + eslint: 8.33.0 execa: 5.1.1 gulp: 4.0.2 gulp-cssnano: 2.1.3 @@ -24,7 +24,7 @@ importers: gulp-terser: 2.1.0 js-yaml: 4.1.0 start-server-and-test: 1.15.3 - typescript: 4.9.4 + typescript: 4.9.5 dependencies: execa: 5.1.1 gulp: 4.0.2 @@ -33,50 +33,51 @@ importers: gulp-replace: 1.1.4 gulp-terser: 2.1.0 js-yaml: 4.1.0 - typescript: 4.9.4 + typescript: 4.9.5 optionalDependencies: '@tensorflow/tfjs-core': 4.2.0 devDependencies: '@types/gulp': 4.0.10 '@types/gulp-rename': 2.0.1 - '@typescript-eslint/eslint-plugin': 5.49.0_iu322prlnwsygkcra5kbpy22si - '@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/eslint-plugin': 5.50.0_go4drrxstycfikanvu45pi4vgq + '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 cross-env: 7.0.3 - cypress: 12.4.0 - eslint: 8.32.0 + cypress: 12.5.1 + eslint: 8.33.0 start-server-and-test: 1.15.3 packages/backend: specifiers: - '@bull-board/api': ^4.11.0 - '@bull-board/fastify': ^4.11.0 - '@bull-board/ui': ^4.11.0 + '@bull-board/api': 4.11.0 + '@bull-board/fastify': 4.11.0 + '@bull-board/ui': 4.11.0 '@discordapp/twemoji': 14.0.2 '@fastify/accepts': 4.1.0 - '@fastify/cookie': ^8.3.0 + '@fastify/cookie': 8.3.0 '@fastify/cors': 8.2.0 - '@fastify/http-proxy': ^8.4.0 + '@fastify/http-proxy': 8.4.0 '@fastify/multipart': 7.4.0 - '@fastify/static': 6.7.0 + '@fastify/static': 6.8.0 '@fastify/view': 7.4.1 - '@nestjs/common': 9.2.1 - '@nestjs/core': 9.2.1 - '@nestjs/testing': 9.2.1 + '@jest/globals': 29.4.1 + '@nestjs/common': 9.3.1 + '@nestjs/core': 9.3.1 + '@nestjs/testing': 9.3.1 '@peertube/http-signature': 1.7.0 - '@redocly/openapi-core': 1.0.0-beta.120 + '@redocly/openapi-core': 1.0.0-beta.123 '@sinonjs/fake-timers': 10.0.2 - '@swc/cli': ^0.1.59 - '@swc/core': 1.3.29 + '@swc/cli': 0.1.61 + '@swc/core': 1.3.32 '@swc/jest': 0.2.24 - '@tensorflow/tfjs': ^4.2.0 + '@tensorflow/tfjs': 4.2.0 '@tensorflow/tfjs-node': 4.2.0 '@types/accepts': 1.3.5 '@types/archiver': 5.3.1 '@types/bcryptjs': 2.4.2 '@types/bull': 4.10.0 '@types/cbor': 6.0.0 - '@types/color-convert': ^2.0.0 - '@types/content-disposition': ^0.5.5 + '@types/color-convert': 2.0.0 + '@types/content-disposition': 0.5.5 '@types/escape-regexp': 0.0.1 '@types/fluent-ffmpeg': 2.1.20 '@types/ioredis': 4.28.10 @@ -103,7 +104,6 @@ importers: '@types/sharp': 0.31.1 '@types/sinonjs__fake-timers': 8.1.2 '@types/speakeasy': 2.0.7 - '@types/syslog-pro': ^1.0.0 '@types/tinycolor2': 1.4.3 '@types/tmp': 0.2.3 '@types/unzipper': 0.10.5 @@ -112,9 +112,9 @@ importers: '@types/web-push': 3.3.2 '@types/websocket': 1.0.5 '@types/ws': 8.5.4 - '@typescript-eslint/eslint-plugin': 5.49.0 - '@typescript-eslint/parser': 5.49.0 - accepts: ^1.3.8 + '@typescript-eslint/eslint-plugin': 5.50.0 + '@typescript-eslint/parser': 5.50.0 + accepts: 1.3.8 ajv: 8.12.0 archiver: 5.3.1 autwh: 0.1.0 @@ -126,7 +126,7 @@ importers: cbor: 8.1.0 chalk: 5.2.0 chalk-template: 0.4.0 - chokidar: ^3.5.3 + chokidar: 3.5.3 cli-highlight: 2.1.11 color-convert: 2.0.1 content-disposition: 0.5.4 @@ -134,21 +134,21 @@ importers: date-fns: 2.29.3 deep-email-validator: 0.1.21 escape-regexp: 0.0.1 - eslint: 8.32.0 + eslint: 8.33.0 eslint-plugin-import: 2.27.5 execa: 6.1.0 fastify: 4.12.0 feed: 4.2.2 file-type: 18.2.0 fluent-ffmpeg: 2.1.2 - form-data: ^4.0.0 - got: ^12.5.3 + form-data: 4.0.0 + got: 12.5.3 hpagent: 1.2.0 ioredis: 4.28.5 - ip-cidr: 3.0.11 + ip-cidr: 3.1.0 is-svg: 4.3.2 jest: 29.4.1 - jest-mock: ^29.4.1 + jest-mock: 29.4.1 js-yaml: 4.1.0 jsdom: 21.1.0 json5: 2.2.3 @@ -156,16 +156,16 @@ importers: jsrsasign: 10.6.1 mfm-js: 0.23.3 mime-types: 2.1.35 - misskey-js: 0.0.14 + misskey-js: 0.0.15 ms: 3.0.0-canary.1 nested-property: 4.0.0 node-fetch: 3.3.0 - nodemailer: 6.9.0 + nodemailer: 6.9.1 nsfwjs: 2.4.2 - oauth: ^0.10.0 + oauth: 0.10.0 os-utils: 0.0.14 parse5: 7.1.2 - pg: 8.8.0 + pg: 8.9.0 private-ip: 3.0.0 probe-image-size: 7.2.3 promise-limit: 2.7.0 @@ -183,23 +183,22 @@ importers: rss-parser: 3.12.0 rxjs: 7.8.0 s-age: 1.1.2 - sanitize-html: 2.8.1 - seedrandom: ^3.0.5 + sanitize-html: 2.9.0 + seedrandom: 3.0.5 semver: 7.3.8 sharp: 0.31.3 speakeasy: 2.0.0 strict-event-emitter-types: 2.0.0 stringz: 2.1.0 summaly: 2.7.0 - syslog-pro: git+https://github.com/misskey-dev/SyslogPro#0.2.9-misskey.2 - systeminformation: 5.17.4 + systeminformation: 5.17.8 tinycolor2: 1.5.2 tmp: 0.2.1 tsc-alias: 1.8.2 tsconfig-paths: 4.1.2 twemoji-parser: 14.0.0 typeorm: 0.3.11 - typescript: 4.9.4 + typescript: 4.9.5 ulid: 2.3.0 unzipper: 0.10.11 uuid: 9.0.0 @@ -218,11 +217,11 @@ importers: '@fastify/cors': 8.2.0 '@fastify/http-proxy': 8.4.0 '@fastify/multipart': 7.4.0 - '@fastify/static': 6.7.0 + '@fastify/static': 6.8.0 '@fastify/view': 7.4.1 - '@nestjs/common': 9.2.1_mnr6j2del53muneqly5h4y27ai - '@nestjs/core': 9.2.1_b4pxbpa7chblgbyake5iz5rdmu - '@nestjs/testing': 9.2.1_hjcqpoaebdr7gdo5hgc22hthbe + '@nestjs/common': 9.3.1_mnr6j2del53muneqly5h4y27ai + '@nestjs/core': 9.3.1_fipbdz7qhdiauthzsrt4bq6tsq + '@nestjs/testing': 9.3.1_22j2lmearpmfr73ppsmjho62xq '@peertube/http-signature': 1.7.0 '@sinonjs/fake-timers': 10.0.2 accepts: 1.3.8 @@ -252,7 +251,7 @@ importers: got: 12.5.3 hpagent: 1.2.0 ioredis: 4.28.5 - ip-cidr: 3.0.11 + ip-cidr: 3.1.0 is-svg: 4.3.2 js-yaml: 4.1.0 jsdom: 21.1.0 @@ -261,16 +260,16 @@ importers: jsrsasign: 10.6.1 mfm-js: 0.23.3 mime-types: 2.1.35 - misskey-js: 0.0.14 + misskey-js: 0.0.15 ms: 3.0.0-canary.1 nested-property: 4.0.0 node-fetch: 3.3.0 - nodemailer: 6.9.0 + nodemailer: 6.9.1 nsfwjs: 2.4.2_@tensorflow+tfjs@4.2.0 oauth: 0.10.0 os-utils: 0.0.14 parse5: 7.1.2 - pg: 8.8.0 + pg: 8.9.0 private-ip: 3.0.0 probe-image-size: 7.2.3 promise-limit: 2.7.0 @@ -288,7 +287,7 @@ importers: rss-parser: 3.12.0 rxjs: 7.8.0 s-age: 1.1.2 - sanitize-html: 2.8.1 + sanitize-html: 2.9.0 seedrandom: 3.0.5 semver: 7.3.8 sharp: 0.31.3 @@ -296,15 +295,14 @@ importers: strict-event-emitter-types: 2.0.0 stringz: 2.1.0 summaly: 2.7.0 - syslog-pro: github.com/misskey-dev/SyslogPro/2772b33fa126784fc6e21377786471a918b22dc7 - systeminformation: 5.17.4 + systeminformation: 5.17.8 tinycolor2: 1.5.2 tmp: 0.2.1 tsc-alias: 1.8.2 tsconfig-paths: 4.1.2 twemoji-parser: 14.0.0 - typeorm: 0.3.11_ioredis@4.28.5+pg@8.8.0 - typescript: 4.9.4 + typeorm: 0.3.11_ioredis@4.28.5+pg@8.9.0 + typescript: 4.9.5 ulid: 2.3.0 unzipper: 0.10.11 uuid: 9.0.0 @@ -317,10 +315,11 @@ importers: '@tensorflow/tfjs': 4.2.0_seedrandom@3.0.5 '@tensorflow/tfjs-node': 4.2.0_seedrandom@3.0.5 devDependencies: - '@redocly/openapi-core': 1.0.0-beta.120 - '@swc/cli': 0.1.59_dbbgdut2njxjatv5n3st5z6gqa - '@swc/core': 1.3.29 - '@swc/jest': 0.2.24_@swc+core@1.3.29 + '@jest/globals': 29.4.1 + '@redocly/openapi-core': 1.0.0-beta.123 + '@swc/cli': 0.1.61_5jdtwbnmkukfw2ny6dph7gfmoq + '@swc/core': 1.3.32 + '@swc/jest': 0.2.24_@swc+core@1.3.32 '@types/accepts': 1.3.5 '@types/archiver': 5.3.1 '@types/bcryptjs': 2.4.2 @@ -354,7 +353,6 @@ importers: '@types/sharp': 0.31.1 '@types/sinonjs__fake-timers': 8.1.2 '@types/speakeasy': 2.0.7 - '@types/syslog-pro': 1.0.0 '@types/tinycolor2': 1.4.3 '@types/tmp': 0.2.3 '@types/unzipper': 0.10.5 @@ -363,11 +361,11 @@ importers: '@types/web-push': 3.3.2 '@types/websocket': 1.0.5 '@types/ws': 8.5.4 - '@typescript-eslint/eslint-plugin': 5.49.0_iu322prlnwsygkcra5kbpy22si - '@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/eslint-plugin': 5.50.0_go4drrxstycfikanvu45pi4vgq + '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 cross-env: 7.0.3 - eslint: 8.32.0 - eslint-plugin-import: 2.27.5_6savw6y3b7jng6f64kgkyoij64 + eslint: 8.33.0 + eslint-plugin-import: 2.27.5_ufewo3pl5nnmz6lltvjrdi2hii execa: 6.1.0 jest: 29.4.1_@types+node@18.11.18 jest-mock: 29.4.1 @@ -379,64 +377,64 @@ importers: '@rollup/plugin-json': 6.0.0 '@rollup/pluginutils': 5.0.2 '@syuilo/aiscript': 0.12.4 - '@tabler/icons-webfont': ^2.1.2 + '@tabler/icons-webfont': 2.1.2 '@types/escape-regexp': 0.0.1 '@types/glob': 8.0.1 '@types/gulp': 4.0.10 '@types/gulp-rename': 2.0.1 '@types/matter-js': 0.18.2 - '@types/node': ^18.11.18 + '@types/node': 18.11.18 '@types/punycode': 2.1.0 - '@types/sanitize-html': ^2.8.0 + '@types/sanitize-html': 2.8.0 '@types/seedrandom': 3.0.4 '@types/throttle-debounce': 5.0.0 '@types/tinycolor2': 1.4.3 '@types/uuid': 9.0.0 '@types/websocket': 1.0.5 '@types/ws': 8.5.4 - '@typescript-eslint/eslint-plugin': 5.49.0 - '@typescript-eslint/parser': 5.49.0 + '@typescript-eslint/eslint-plugin': 5.50.0 + '@typescript-eslint/parser': 5.50.0 '@vitejs/plugin-vue': 4.0.0 - '@vue/compiler-sfc': 3.2.45 - '@vue/runtime-core': 3.2.45 + '@vue/compiler-sfc': 3.2.47 + '@vue/runtime-core': 3.2.47 autobind-decorator: 2.4.0 autosize: 5.0.2 blurhash: 2.0.4 broadcast-channel: 4.20.2 browser-image-resizer: git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.3 - canvas-confetti: ^1.6.0 + canvas-confetti: 1.6.0 chart.js: 4.2.0 chartjs-adapter-date-fns: 3.0.0 - chartjs-chart-matrix: ^1.3.0 + chartjs-chart-matrix: 1.3.0 chartjs-plugin-gradient: 0.6.1 chartjs-plugin-zoom: 2.0.0 compare-versions: 5.0.1 cropperjs: 2.0.0-beta.2 cross-env: 7.0.3 - cypress: 12.4.0 + cypress: 12.5.1 date-fns: 2.29.3 escape-regexp: 0.0.1 - eslint: 8.32.0 + eslint: 8.33.0 eslint-plugin-import: 2.27.5 eslint-plugin-vue: 9.9.0 eventemitter3: 5.0.0 - gsap: ^3.11.4 + gsap: 3.11.4 idb-keyval: 6.2.0 insert-text-at-cursor: 0.3.0 is-file-animated: 1.0.2 json5: 2.2.3 matter-js: 0.18.0 mfm-js: 0.23.3 - misskey-js: 0.0.14 - photoswipe: 5.3.4 + misskey-js: 0.0.15 + photoswipe: 5.3.5 prismjs: 1.29.0 punycode: 2.3.0 querystring: 0.2.1 rndstr: 1.0.0 - rollup: 3.11.0 + rollup: 3.12.1 s-age: 1.1.2 - sanitize-html: ^2.8.1 - sass: 1.57.1 + sanitize-html: 2.9.0 + sass: 1.58.0 seedrandom: 3.0.5 start-server-and-test: 1.15.3 strict-event-emitter-types: 2.0.0 @@ -449,24 +447,25 @@ importers: tsc-alias: 1.8.2 tsconfig-paths: 4.1.2 twemoji-parser: 14.0.0 - typescript: 4.9.4 + typescript: 4.9.5 uuid: 9.0.0 vanilla-tilt: 1.8.0 - vite: 4.0.4 - vue: 3.2.45 - vue-eslint-parser: ^9.1.0 + vite: 4.1.1 + vue: 3.2.47 + vue-eslint-parser: 9.1.0 + vue-plyr: 7.0.0 vue-prism-editor: 2.0.0-alpha.2 - vue-tsc: ^1.0.24 + vue-tsc: 1.0.24 vuedraggable: next dependencies: '@discordapp/twemoji': 14.0.2 - '@rollup/plugin-alias': 4.0.3_rollup@3.11.0 - '@rollup/plugin-json': 6.0.0_rollup@3.11.0 - '@rollup/pluginutils': 5.0.2_rollup@3.11.0 + '@rollup/plugin-alias': 4.0.3_rollup@3.12.1 + '@rollup/plugin-json': 6.0.0_rollup@3.12.1 + '@rollup/pluginutils': 5.0.2_rollup@3.12.1 '@syuilo/aiscript': 0.12.4 '@tabler/icons-webfont': 2.1.2 - '@vitejs/plugin-vue': 4.0.0_vite@4.0.4+vue@3.2.45 - '@vue/compiler-sfc': 3.2.45 + '@vitejs/plugin-vue': 4.0.0_vite@4.1.1+vue@3.2.47 + '@vue/compiler-sfc': 3.2.47 autobind-decorator: 2.4.0 autosize: 5.0.2 blurhash: 2.0.4 @@ -490,16 +489,16 @@ importers: json5: 2.2.3 matter-js: 0.18.0 mfm-js: 0.23.3 - misskey-js: 0.0.14 - photoswipe: 5.3.4 + misskey-js: 0.0.15 + photoswipe: 5.3.5 prismjs: 1.29.0 punycode: 2.3.0 querystring: 0.2.1 rndstr: 1.0.0 - rollup: 3.11.0 + rollup: 3.12.1 s-age: 1.1.2 - sanitize-html: 2.8.1 - sass: 1.57.1 + sanitize-html: 2.9.0 + sass: 1.58.0 seedrandom: 3.0.5 strict-event-emitter-types: 2.0.0 stringz: 2.1.0 @@ -511,13 +510,14 @@ importers: tsc-alias: 1.8.2 tsconfig-paths: 4.1.2 twemoji-parser: 14.0.0 - typescript: 4.9.4 + typescript: 4.9.5 uuid: 9.0.0 vanilla-tilt: 1.8.0 - vite: 4.0.4_ovmyjmuuyckt3r3gpaexj2onji - vue: 3.2.45 - vue-prism-editor: 2.0.0-alpha.2_vue@3.2.45 - vuedraggable: 4.1.0_vue@3.2.45 + vite: 4.1.1_f5vcjb3akvjdur4ffzogu2hewu + vue: 3.2.47 + vue-plyr: 7.0.0 + vue-prism-editor: 2.0.0-alpha.2_vue@3.2.47 + vuedraggable: 4.1.0_vue@3.2.47 devDependencies: '@types/escape-regexp': 0.0.1 '@types/glob': 8.0.1 @@ -533,38 +533,38 @@ importers: '@types/uuid': 9.0.0 '@types/websocket': 1.0.5 '@types/ws': 8.5.4 - '@typescript-eslint/eslint-plugin': 5.49.0_iu322prlnwsygkcra5kbpy22si - '@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje - '@vue/runtime-core': 3.2.45 + '@typescript-eslint/eslint-plugin': 5.50.0_go4drrxstycfikanvu45pi4vgq + '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@vue/runtime-core': 3.2.47 cross-env: 7.0.3 - cypress: 12.4.0 - eslint: 8.32.0 - eslint-plugin-import: 2.27.5_6savw6y3b7jng6f64kgkyoij64 - eslint-plugin-vue: 9.9.0_eslint@8.32.0 + cypress: 12.5.1 + eslint: 8.33.0 + eslint-plugin-import: 2.27.5_ufewo3pl5nnmz6lltvjrdi2hii + eslint-plugin-vue: 9.9.0_eslint@8.33.0 start-server-and-test: 1.15.3 - vue-eslint-parser: 9.1.0_eslint@8.32.0 - vue-tsc: 1.0.24_typescript@4.9.4 + vue-eslint-parser: 9.1.0_eslint@8.33.0 + vue-tsc: 1.0.24_typescript@4.9.5 packages/sw: specifiers: - '@typescript-eslint/parser': ^5.49.0 + '@typescript-eslint/parser': 5.50.0 '@typescript/lib-webworker': npm:@types/serviceworker@0.0.61 - esbuild: ^0.14.42 - eslint: ^8.32.0 - eslint-plugin-import: ^2.27.5 - idb-keyval: ^6.2.0 - misskey-js: 0.0.14 - typescript: 4.9.4 + esbuild: 0.14.42 + eslint: 8.33.0 + eslint-plugin-import: 2.27.5 + idb-keyval: 6.2.0 + misskey-js: 0.0.15 + typescript: 4.9.5 dependencies: - esbuild: 0.14.54 + esbuild: 0.14.42 idb-keyval: 6.2.0 - misskey-js: 0.0.14 + misskey-js: 0.0.15 devDependencies: - '@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 '@typescript/lib-webworker': /@types/serviceworker/0.0.61 - eslint: 8.32.0 - eslint-plugin-import: 2.27.5_6savw6y3b7jng6f64kgkyoij64 - typescript: 4.9.4 + eslint: 8.33.0 + eslint-plugin-import: 2.27.5_ufewo3pl5nnmz6lltvjrdi2hii + typescript: 4.9.5 packages: @@ -922,11 +922,9 @@ packages: dependencies: '@bull-board/api': 4.11.0 '@bull-board/ui': 4.11.0 - '@fastify/static': 6.7.0 + '@fastify/static': 6.8.0 '@fastify/view': 7.4.1 ejs: 3.1.8 - transitivePeerDependencies: - - supports-color dev: false /@bull-board/ui/4.11.0: @@ -1177,15 +1175,6 @@ packages: dev: false optional: true - /@esbuild/linux-loong64/0.14.54: - resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-loong64/0.16.17: resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} engines: {node: '>=12'} @@ -1401,39 +1390,26 @@ packages: undici: 5.16.0 dev: false - /@fastify/send/1.0.0: - resolution: {integrity: sha512-jnj8ONIXiOLv4kPn5O7T4oSD5+ymhOg4dKHW3rnYkB/1PJ1942UH1/trvMUIr+fn1dJ20oatpWycZDkPiLcWfg==} - engines: {node: '>= 0.8.0'} + /@fastify/send/2.0.1: + resolution: {integrity: sha512-8jdouu0o5d0FMq1+zCKeKXc1tmOQ5tTGYdQP3MpyF9+WWrZT1KCBdh6hvoEYxOm3oJG/akdE9BpehLiJgYRvGw==} dependencies: - debug: 4.3.4 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 1.0.2 + '@lukeed/ms': 2.0.1 escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 + fast-decode-uri-component: 1.0.1 http-errors: 2.0.0 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: 1.2.1 - statuses: 2.0.1 - transitivePeerDependencies: - - supports-color + mime: 3.0.0 dev: false - /@fastify/static/6.7.0: - resolution: {integrity: sha512-GYFDTSK83OL3mlzEDhgZXwFqPpGPiOsOr+dx63y2hcDF+NF4j1Ps2Swvmq/tMc5CFGoEDhkVN+P9fWG+/4a30Q==} + /@fastify/static/6.8.0: + resolution: {integrity: sha512-MNQp7KM0NIC+722OPN3MholnfvM+Vg2ao4OwbWWNJhAJEWOKGe4fJsEjIh3OkN0z5ymhklc7EXGCG0zDaIU5ZQ==} dependencies: '@fastify/accept-negotiator': 1.0.0 - '@fastify/send': 1.0.0 + '@fastify/send': 2.0.1 content-disposition: 0.5.4 fastify-plugin: 4.5.0 glob: 8.0.3 p-limit: 3.1.0 readable-stream: 4.3.0 - transitivePeerDependencies: - - supports-color dev: false /@fastify/view/7.4.1: @@ -1785,6 +1761,16 @@ packages: resolution: {integrity: sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==} dev: false + /@lukeed/csprng/1.0.1: + resolution: {integrity: sha512-uSvJdwQU5nK+Vdf6zxcWAY2A8r7uqe+gePwLWzJ+fsQehq18pc0I2hJKwypZ2aLM90+Er9u1xn4iLJPZ+xlL4g==} + engines: {node: '>=8'} + dev: false + + /@lukeed/ms/2.0.1: + resolution: {integrity: sha512-Xs/4RZltsAL7pkvaNStUQt7netTkyxrS0K+RILcVr3TRMS/ToOg4I6uNfhB9SlGsnWBym4U+EaXq0f0cEMNkHA==} + engines: {node: '>=8'} + dev: false + /@mapbox/node-pre-gyp/1.0.9: resolution: {integrity: sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==} hasBin: true @@ -1804,6 +1790,20 @@ packages: dev: false optional: true + /@mole-inc/bin-wrapper/8.0.1: + resolution: {integrity: sha512-sTGoeZnjI8N4KS+sW2AN95gDBErhAguvkw/tWdCjeM8bvxpz5lqrnd0vOJABA1A+Ic3zED7PYoLP/RANLgVotA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + bin-check: 4.1.0 + bin-version-check: 5.0.0 + content-disposition: 0.5.4 + ext-name: 5.0.0 + file-type: 17.1.6 + filenamify: 5.1.1 + got: 11.8.5 + os-filter-obj: 2.0.0 + dev: true + /@msgpackr-extract/msgpackr-extract-darwin-arm64/2.2.0: resolution: {integrity: sha512-Z9LFPzfoJi4mflGWV+rv7o7ZbMU5oAU9VmzCgL240KnqDW65Y2HFCT3MW06/ITJSnbVLacmcEJA8phywK7JinQ==} cpu: [arm64] @@ -1846,8 +1846,8 @@ packages: requiresBuild: true optional: true - /@nestjs/common/9.2.1_mnr6j2del53muneqly5h4y27ai: - resolution: {integrity: sha512-nZuo3oDsSSlC5mti/M2aCWTEIfHPGDXmBwWgPeCpRbrNz3IWd109rkajll+yxgidVjznAdBS9y00JkAVJblNYw==} + /@nestjs/common/9.3.1_mnr6j2del53muneqly5h4y27ai: + resolution: {integrity: sha512-T14G3xjIXmEkxMcHcwh/eJwodF2owhYIT0ZA8u6UCNCEQg+391TXA7xTynUuR5Fl2EJPYTKF0g89XSFOW7NS2Q==} peerDependencies: cache-manager: <=5 class-transformer: '*' @@ -1866,11 +1866,11 @@ packages: reflect-metadata: 0.1.13 rxjs: 7.8.0 tslib: 2.4.1 - uuid: 9.0.0 + uid: 2.0.1 dev: false - /@nestjs/core/9.2.1_b4pxbpa7chblgbyake5iz5rdmu: - resolution: {integrity: sha512-a9GkXuu8uXgNgCVW+17iI8kLCltO+HwHpU2IhR+32JKnN2WEQ1YEWU4t3GJ2MNq44YkjIw9zrKvFkjJBlYrNbQ==} + /@nestjs/core/9.3.1_fipbdz7qhdiauthzsrt4bq6tsq: + resolution: {integrity: sha512-hLVfImzHu1vdcViEhIRnm7x3EBk+YiV7XVTJNz6n2Ly8a6t7IFBoJkGrZkE8ZTytnfbJZO0Vtp54ZBllxx3MwA==} requiresBuild: true peerDependencies: '@nestjs/common': ^9.0.0 @@ -1887,7 +1887,7 @@ packages: '@nestjs/websockets': optional: true dependencies: - '@nestjs/common': 9.2.1_mnr6j2del53muneqly5h4y27ai + '@nestjs/common': 9.3.1_mnr6j2del53muneqly5h4y27ai '@nuxtjs/opencollective': 0.3.2 fast-safe-stringify: 2.1.1 iterare: 1.2.1 @@ -1901,8 +1901,8 @@ packages: - encoding dev: false - /@nestjs/testing/9.2.1_hjcqpoaebdr7gdo5hgc22hthbe: - resolution: {integrity: sha512-lemXZdRSuqoZ87l0orCrS/c7gqwxeduIFOd21g9g2RUeQ4qlWPegbQDKASzbfC28klPyrgJLW4MNq7uv2JwV8w==} + /@nestjs/testing/9.3.1_22j2lmearpmfr73ppsmjho62xq: + resolution: {integrity: sha512-jjsmfd9h0E8bWTSWMm+QD1P8T8ElHufTJ2tDbi0q9U8JR5QoJ9KLcVTYZVPciXpwPxIiZ+qFEjrY1/irvPHDug==} peerDependencies: '@nestjs/common': ^9.0.0 '@nestjs/core': ^9.0.0 @@ -1914,8 +1914,8 @@ packages: '@nestjs/platform-express': optional: true dependencies: - '@nestjs/common': 9.2.1_mnr6j2del53muneqly5h4y27ai - '@nestjs/core': 9.2.1_b4pxbpa7chblgbyake5iz5rdmu + '@nestjs/common': 9.3.1_mnr6j2del53muneqly5h4y27ai + '@nestjs/core': 9.3.1_fipbdz7qhdiauthzsrt4bq6tsq tslib: 2.4.1 dev: false @@ -2051,12 +2051,12 @@ packages: uri-js: 4.4.1 dev: true - /@redocly/openapi-core/1.0.0-beta.120: - resolution: {integrity: sha512-BvasunpVWm5O9F/mW6JmxUqat4XFU5zNnKJkMY6GJ9UYH2UxgKnGaMLWXKtbJEOBnMT12S/p9yeqrQHnk8rGhQ==} + /@redocly/openapi-core/1.0.0-beta.123: + resolution: {integrity: sha512-W6MbUWpb/VaV+Kf0c3jmMIJw3WwwF7iK5nAfcOS+ZwrlbxtIl37+1hEydFlJ209vCR9HL12PaMwdh2Vpihj6Jw==} engines: {node: '>=12.0.0'} dependencies: '@redocly/ajv': 8.11.0 - '@types/node': 14.18.34 + '@types/node': 14.18.36 colorette: 1.4.0 js-levenshtein: 1.1.6 js-yaml: 4.1.0 @@ -2069,7 +2069,7 @@ packages: - encoding dev: true - /@rollup/plugin-alias/4.0.3_rollup@3.11.0: + /@rollup/plugin-alias/4.0.3_rollup@3.12.1: resolution: {integrity: sha512-ZuDWE1q4PQDhvm/zc5Prun8sBpLJy41DMptYrS6MhAy9s9kL/doN1613BWfEchGVfKxzliJ3BjbOPizXX38DbQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2078,11 +2078,11 @@ packages: rollup: optional: true dependencies: - rollup: 3.11.0 + rollup: 3.12.1 slash: 4.0.0 dev: false - /@rollup/plugin-json/6.0.0_rollup@3.11.0: + /@rollup/plugin-json/6.0.0_rollup@3.12.1: resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2091,11 +2091,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.11.0 - rollup: 3.11.0 + '@rollup/pluginutils': 5.0.2_rollup@3.12.1 + rollup: 3.12.1 dev: false - /@rollup/pluginutils/5.0.2_rollup@3.11.0: + /@rollup/pluginutils/5.0.2_rollup@3.12.1: resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -2107,7 +2107,7 @@ packages: '@types/estree': 1.0.0 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.11.0 + rollup: 3.12.1 dev: false /@sideway/address/4.1.4: @@ -2132,15 +2132,9 @@ packages: resolution: {integrity: sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==} dev: true - /@sindresorhus/is/0.7.0: - resolution: {integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==} - engines: {node: '>=4'} - dev: true - /@sindresorhus/is/4.6.0: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} - dev: false /@sindresorhus/is/5.3.0: resolution: {integrity: sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==} @@ -2161,8 +2155,8 @@ packages: resolution: {integrity: sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==} dev: false - /@swc/cli/0.1.59_dbbgdut2njxjatv5n3st5z6gqa: - resolution: {integrity: sha512-BlX3wIxYTwdtR22dIqZ3FEIOJPqnlByAp4JY46OMZi2UXMB3ZbOzefawD2ZlLafRUWyy5NtiZZty5waKzaYRnA==} + /@swc/cli/0.1.61_5jdtwbnmkukfw2ny6dph7gfmoq: + resolution: {integrity: sha512-HeYMJ+8gKfJzM9xgcZqTpAHJYAJVGSljBSmWRUx2B6UiGraLsLjEcqxITwi6/t6Af+QboBMiQX5Wwll89oPK7g==} engines: {node: '>= 12.13'} hasBin: true peerDependencies: @@ -2172,8 +2166,8 @@ packages: chokidar: optional: true dependencies: - '@swc/core': 1.3.29 - bin-wrapper: 4.1.0 + '@mole-inc/bin-wrapper': 8.0.1 + '@swc/core': 1.3.32 chokidar: 3.5.3 commander: 7.2.0 fast-glob: 3.2.12 @@ -2182,8 +2176,8 @@ packages: source-map: 0.7.4 dev: true - /@swc/core-darwin-arm64/1.3.29: - resolution: {integrity: sha512-1RQ0MCmWOQmo3qG60vhbNaO/qMZ25lDfjhTayAzHjS1k7WyoUv3M8Em2Fip2VKJz5cN2M7MWiP5aHMotMovuaQ==} + /@swc/core-darwin-arm64/1.3.32: + resolution: {integrity: sha512-o19bhlxuUgjUElm6i+QhXgZ0vD6BebiB/gQpK3en5aAwhOvinwr4sah3GqFXsQzz/prKVDuMkj9SW6F/Ug5hgg==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -2191,8 +2185,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64/1.3.29: - resolution: {integrity: sha512-UXiVOkt9i/mwarhHiN6o5RAi3Q7riCQTiOO2e98c/qi3SiYqbgd6kil+2gBcpVB0CGEFyyGB9rECwNBkaYe7zw==} + /@swc/core-darwin-x64/1.3.32: + resolution: {integrity: sha512-hVEGd+v5Afh+YekGADOGKwhuS4/AXk91nLuk7pmhWkk8ceQ1cfmah90kXjIXUlCe2G172MLRfHNWlZxr29E/Og==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -2200,8 +2194,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf/1.3.29: - resolution: {integrity: sha512-0B7+FoYgEE1Yg6j5EAtEpKVbHby3jnJo6Y4g0dGxecRtXUhu8TKVI4P93sj4PJ+l4XkAyzdhSsQ+ytFRsbOJ6w==} + /@swc/core-linux-arm-gnueabihf/1.3.32: + resolution: {integrity: sha512-5X01WqI9EbJ69oHAOGlI08YqvEIXMfT/mCJ1UWDQBb21xWRE2W1yFAAeuqOLtiagLrXjPv/UKQ0S2gyWQR5AXQ==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -2209,8 +2203,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu/1.3.29: - resolution: {integrity: sha512-XN9axiTuiFOm+UBnDDOQV3b2OekziXHtVPBAPSEssRsNGS4uN7YvCyVAcS8GYdK7GoZ+cmoZBYwD4trir48WXw==} + /@swc/core-linux-arm64-gnu/1.3.32: + resolution: {integrity: sha512-PTJ6oPiutkNBg+m22bUUPa4tNuMmsgpSnsnv2wnWVOgK0lhvQT6bAPTUXDq/8peVAgR/SlpP2Ht8TRRqYMRjRQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -2218,8 +2212,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl/1.3.29: - resolution: {integrity: sha512-M6eE02Dzl1efRLozitGvgjiNEee0VQInqMX4tvfpzQwqZsKNAD8/NGPeTG4763BLDHc4hnMZbnt5wncDLjFq7A==} + /@swc/core-linux-arm64-musl/1.3.32: + resolution: {integrity: sha512-lG0VOuYNPWOCJ99Aza69cTljjeft/wuRQeYFF8d+1xCQS/OT7gnbgi7BOz39uSHIPTBqfzdIsuvzdKlp9QydrQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -2227,8 +2221,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu/1.3.29: - resolution: {integrity: sha512-t2e9byHRpxKyUsLeODlb3yKJcm8wMirsLIxjr24q5YbnChD3QUMQwA8aA9w2PWc86ihukw7Ksx3RYT7uR706HA==} + /@swc/core-linux-x64-gnu/1.3.32: + resolution: {integrity: sha512-ecqtSWX4NBrs7Ji2VX3fDWeqUfrbLlYqBuufAziCM27xMxwlAVgmyGQk4FYgoQ3SAUAu3XFH87+3Q7uWm2X7xg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -2236,8 +2230,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl/1.3.29: - resolution: {integrity: sha512-3jDzDYIyHXrXKOSnTtsN56eINbTPuVQj65D3K8+zo1o52GGwNGyCvQt2RpxNfM8+ptb4j6v7weSU8kVvbUzGTQ==} + /@swc/core-linux-x64-musl/1.3.32: + resolution: {integrity: sha512-rl3dMcUuENVkpk5NGW/LXovjK0+JFm4GWPjy4NM3Q5cPvhBpGwSeLZlR+zAw9K0fdGoIXiayRTTfENrQwwsH+g==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -2245,8 +2239,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc/1.3.29: - resolution: {integrity: sha512-3PadPieyslG++7SQ42OApfiXtQdzFpnCv/i/UJ6gOL5d0MluNzZ2nIxD8LwXXizVdmcm8bmc0WRhK3JhvhzVJA==} + /@swc/core-win32-arm64-msvc/1.3.32: + resolution: {integrity: sha512-VlybAZp8DcS66CH1LDnfp9zdwbPlnGXREtHDMHaBfK9+80AWVTg+zn0tCYz+HfcrRONqxbudwOUIPj+dwl/8jw==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -2254,8 +2248,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc/1.3.29: - resolution: {integrity: sha512-tUFrHxxYz9Cfz07yGwDXdtRziC3q1ia2SHodzZ3obTpY+HQiBDHs0QO/HkbUBNF+du0vhnsgtWilnsMQDILFDQ==} + /@swc/core-win32-ia32-msvc/1.3.32: + resolution: {integrity: sha512-MEUMdpUFIQ+RD+K/iHhHKfu0TFNj9VXwIxT5hmPeqyboKo095CoFEFBJ0sHG04IGlnu8T9i+uE2Pi18qUEbFug==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -2263,8 +2257,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc/1.3.29: - resolution: {integrity: sha512-/Z3kxMXGKlIhtkxBxsCSZl8j/qYfbA4dtW7RKv1RNxbPLbwk8k3Owhgk/Y3JeRavcUKwja1rUX5rhMjLYeN3tw==} + /@swc/core-win32-x64-msvc/1.3.32: + resolution: {integrity: sha512-DPMoneNFQco7SqmVVOUv1Vn53YmoImEfrAPMY9KrqQzgfzqNTuL2JvfxUqfAxwQ6pEKYAdyKJvZ483rIhgG9XQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -2272,31 +2266,31 @@ packages: dev: true optional: true - /@swc/core/1.3.29: - resolution: {integrity: sha512-BYDBEqQ77ASZNQYTP7PlKnMLwbHh3lhtlzD/gQP2zIK9XhqQlcy/zIcLljYDn0EOogLn3IyaUiXgAzDWoAmWMg==} + /@swc/core/1.3.32: + resolution: {integrity: sha512-Yx/n1j+uUkcqlJAW8IRg8Qymgkdow6NHJZPFShiR0YiaYq2sXY+JHmvh16O6GkL91Y+gTlDUS7uVgDz50czJUQ==} engines: {node: '>=10'} requiresBuild: true optionalDependencies: - '@swc/core-darwin-arm64': 1.3.29 - '@swc/core-darwin-x64': 1.3.29 - '@swc/core-linux-arm-gnueabihf': 1.3.29 - '@swc/core-linux-arm64-gnu': 1.3.29 - '@swc/core-linux-arm64-musl': 1.3.29 - '@swc/core-linux-x64-gnu': 1.3.29 - '@swc/core-linux-x64-musl': 1.3.29 - '@swc/core-win32-arm64-msvc': 1.3.29 - '@swc/core-win32-ia32-msvc': 1.3.29 - '@swc/core-win32-x64-msvc': 1.3.29 + '@swc/core-darwin-arm64': 1.3.32 + '@swc/core-darwin-x64': 1.3.32 + '@swc/core-linux-arm-gnueabihf': 1.3.32 + '@swc/core-linux-arm64-gnu': 1.3.32 + '@swc/core-linux-arm64-musl': 1.3.32 + '@swc/core-linux-x64-gnu': 1.3.32 + '@swc/core-linux-x64-musl': 1.3.32 + '@swc/core-win32-arm64-msvc': 1.3.32 + '@swc/core-win32-ia32-msvc': 1.3.32 + '@swc/core-win32-x64-msvc': 1.3.32 dev: true - /@swc/jest/0.2.24_@swc+core@1.3.29: + /@swc/jest/0.2.24_@swc+core@1.3.32: resolution: {integrity: sha512-fwgxQbM1wXzyKzl1+IW0aGrRvAA8k0Y3NxFhKigbPjOJ4mCKnWEcNX9HQS3gshflcxq8YKhadabGUVfdwjCr6Q==} engines: {npm: '>= 7.0.0'} peerDependencies: '@swc/core': '*' dependencies: '@jest/create-cache-key-function': 27.5.1 - '@swc/core': 1.3.29 + '@swc/core': 1.3.32 jsonc-parser: 3.2.0 dev: true @@ -2314,7 +2308,6 @@ packages: engines: {node: '>=10'} dependencies: defer-to-connect: 2.0.1 - dev: false /@szmarczak/http-timer/5.0.1: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} @@ -2448,7 +2441,6 @@ packages: /@tokenizer/token/0.3.0: resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} - dev: false /@tootallnate/once/2.0.0: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} @@ -2516,7 +2508,6 @@ packages: '@types/keyv': 3.1.4 '@types/node': 18.11.18 '@types/responselike': 1.0.0 - dev: false /@types/cbor/6.0.0: resolution: {integrity: sha512-mGQ1lbYOwVti5Xlarn1bTeBZqgY0kstsdjnkoEovgohYKdBjGejHyNGXHdMBeqyQazIv32Jjp33+5pBEaSRy2w==} @@ -2604,7 +2595,6 @@ packages: /@types/http-cache-semantics/4.0.1: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} - dev: false /@types/ioredis/4.28.10: resolution: {integrity: sha512-69LyhUgrXdgcNDv7ogs1qXZomnfOEnSmrmMFqKgt1XMJxmoOSG/u3wYy13yACIfKuMJ8IhKgHafDO3sx19zVQQ==} @@ -2698,10 +2688,6 @@ packages: node-fetch: 3.3.0 dev: true - /@types/node/14.18.34: - resolution: {integrity: sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA==} - dev: true - /@types/node/14.18.36: resolution: {integrity: sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==} dev: true @@ -2829,10 +2815,6 @@ packages: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} dev: true - /@types/syslog-pro/1.0.0: - resolution: {integrity: sha512-yFQ7QbEQrswboLGflCumcUMLeD5GgnaHH80khqoYDdeEqVST5UWTppit8BtavxhrkWjfeX8aPI6c047ooWQrdw==} - dev: true - /@types/throttle-debounce/5.0.0: resolution: {integrity: sha512-Pb7k35iCGFcGPECoNE4DYp3Oyf2xcTd3FbFQxXUI9hEYKUl6YX+KLf7HrBmgVcD05nl50LIH6i+80js4iYmWbw==} dev: true @@ -2937,8 +2919,8 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin/5.49.0_iu322prlnwsygkcra5kbpy22si: - resolution: {integrity: sha512-IhxabIpcf++TBaBa1h7jtOWyon80SXPRLDq0dVz5SLFC/eW6tofkw/O7Ar3lkx5z5U6wzbKDrl2larprp5kk5Q==} + /@typescript-eslint/eslint-plugin/5.50.0_go4drrxstycfikanvu45pi4vgq: + resolution: {integrity: sha512-vwksQWSFZiUhgq3Kv7o1Jcj0DUNylwnIlGvKvLLYsq8pAWha6/WCnXUeaSoNNha/K7QSf2+jvmkxggC1u3pIwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2948,24 +2930,25 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje - '@typescript-eslint/scope-manager': 5.49.0 - '@typescript-eslint/type-utils': 5.49.0_7uibuqfxkfaozanbtbziikiqje - '@typescript-eslint/utils': 5.49.0_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/scope-manager': 5.50.0 + '@typescript-eslint/type-utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 + '@typescript-eslint/utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 debug: 4.3.4 - eslint: 8.32.0 + eslint: 8.33.0 + grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.4 - typescript: 4.9.4 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.49.0_7uibuqfxkfaozanbtbziikiqje: - resolution: {integrity: sha512-veDlZN9mUhGqU31Qiv2qEp+XrJj5fgZpJ8PW30sHU+j/8/e5ruAhLaVDAeznS7A7i4ucb/s8IozpDtt9NqCkZg==} + /@typescript-eslint/parser/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64: + resolution: {integrity: sha512-KCcSyNaogUDftK2G9RXfQyOCt51uB5yqC6pkUYqhYh8Kgt+DwR5M0EwEAxGPy/+DH6hnmKeGsNhiZRQxjH71uQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2974,26 +2957,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.49.0 - '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/typescript-estree': 5.49.0_typescript@4.9.4 + '@typescript-eslint/scope-manager': 5.50.0 + '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 debug: 4.3.4 - eslint: 8.32.0 - typescript: 4.9.4 + eslint: 8.33.0 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.49.0: - resolution: {integrity: sha512-clpROBOiMIzpbWNxCe1xDK14uPZh35u4QaZO1GddilEzoCLAEz4szb51rBpdgurs5k2YzPtJeTEN3qVbG+LRUQ==} + /@typescript-eslint/scope-manager/5.50.0: + resolution: {integrity: sha512-rt03kaX+iZrhssaT974BCmoUikYtZI24Vp/kwTSy841XhiYShlqoshRFDvN1FKKvU2S3gK+kcBW1EA7kNUrogg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/visitor-keys': 5.49.0 + '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/visitor-keys': 5.50.0 dev: true - /@typescript-eslint/type-utils/5.49.0_7uibuqfxkfaozanbtbziikiqje: - resolution: {integrity: sha512-eUgLTYq0tR0FGU5g1YHm4rt5H/+V2IPVkP0cBmbhRyEmyGe4XvJ2YJ6sYTmONfjmdMqyMLad7SB8GvblbeESZA==} + /@typescript-eslint/type-utils/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64: + resolution: {integrity: sha512-dcnXfZ6OGrNCO7E5UY/i0ktHb7Yx1fV6fnQGGrlnfDhilcs6n19eIRcvLBqx6OQkrPaFlDPk3OJ0WlzQfrV0bQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -3002,23 +2985,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.49.0_typescript@4.9.4 - '@typescript-eslint/utils': 5.49.0_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 + '@typescript-eslint/utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 debug: 4.3.4 - eslint: 8.32.0 - tsutils: 3.21.0_typescript@4.9.4 - typescript: 4.9.4 + eslint: 8.33.0 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.49.0: - resolution: {integrity: sha512-7If46kusG+sSnEpu0yOz2xFv5nRz158nzEXnJFCGVEHWnuzolXKwrH5Bsf9zsNlOQkyZuk0BZKKoJQI+1JPBBg==} + /@typescript-eslint/types/5.50.0: + resolution: {integrity: sha512-atruOuJpir4OtyNdKahiHZobPKFvZnBnfDiyEaBf6d9vy9visE7gDjlmhl+y29uxZ2ZDgvXijcungGFjGGex7w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.49.0_typescript@4.9.4: - resolution: {integrity: sha512-PBdx+V7deZT/3GjNYPVQv1Nc0U46dAHbIuOG8AZ3on3vuEKiPDwFE/lG1snN2eUB9IhF7EyF7K1hmTcLztNIsA==} + /@typescript-eslint/typescript-estree/5.50.0_typescript@4.9.5: + resolution: {integrity: sha512-Gq4zapso+OtIZlv8YNAStFtT6d05zyVCK7Fx3h5inlLBx2hWuc/0465C2mg/EQDDU2LKe52+/jN4f0g9bd+kow==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -3026,55 +3009,55 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/visitor-keys': 5.49.0 + '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/visitor-keys': 5.50.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.4 - typescript: 4.9.4 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.49.0_7uibuqfxkfaozanbtbziikiqje: - resolution: {integrity: sha512-cPJue/4Si25FViIb74sHCLtM4nTSBXtLx1d3/QT6mirQ/c65bV8arBEebBJJizfq8W2YyMoPI/WWPFWitmNqnQ==} + /@typescript-eslint/utils/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64: + resolution: {integrity: sha512-v/AnUFImmh8G4PH0NDkf6wA8hujNNcrwtecqW4vtQ1UOSNBaZl49zP1SHoZ/06e+UiwzHpgb5zP5+hwlYYWYAw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.49.0 - '@typescript-eslint/types': 5.49.0 - '@typescript-eslint/typescript-estree': 5.49.0_typescript@4.9.4 - eslint: 8.32.0 + '@typescript-eslint/scope-manager': 5.50.0 + '@typescript-eslint/types': 5.50.0 + '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5 + eslint: 8.33.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.32.0 + eslint-utils: 3.0.0_eslint@8.33.0 semver: 7.3.8 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.49.0: - resolution: {integrity: sha512-v9jBMjpNWyn8B6k/Mjt6VbUS4J1GvUlR4x3Y+ibnP1z7y7V4n0WRz+50DY6+Myj0UaXVSuUlHohO+eZ8IJEnkg==} + /@typescript-eslint/visitor-keys/5.50.0: + resolution: {integrity: sha512-cdMeD9HGu6EXIeGOh2yVW6oGf9wq8asBgZx7nsR/D36gTfQ0odE5kcRYe5M81vjEFAcPeugXrHg78Imu55F6gg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.49.0 + '@typescript-eslint/types': 5.50.0 eslint-visitor-keys: 3.3.0 dev: true - /@vitejs/plugin-vue/4.0.0_vite@4.0.4+vue@3.2.45: + /@vitejs/plugin-vue/4.0.0_vite@4.1.1+vue@3.2.47: resolution: {integrity: sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.0.4_ovmyjmuuyckt3r3gpaexj2onji - vue: 3.2.45 + vite: 4.1.1_f5vcjb3akvjdur4ffzogu2hewu + vue: 3.2.47 dev: false /@volar/language-core/1.0.24: @@ -3101,10 +3084,10 @@ packages: dependencies: '@volar/language-core': 1.0.24 '@volar/source-map': 1.0.24 - '@vue/compiler-dom': 3.2.45 - '@vue/compiler-sfc': 3.2.45 - '@vue/reactivity': 3.2.45 - '@vue/shared': 3.2.45 + '@vue/compiler-dom': 3.2.47 + '@vue/compiler-sfc': 3.2.47 + '@vue/reactivity': 3.2.47 + '@vue/shared': 3.2.47 minimatch: 5.1.2 vue-template-compiler: 2.7.14 dev: true @@ -3116,80 +3099,88 @@ packages: '@volar/vue-language-core': 1.0.24 dev: true - /@vue/compiler-core/3.2.45: - resolution: {integrity: sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==} + /@vue/compiler-core/3.2.47: + resolution: {integrity: sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==} dependencies: '@babel/parser': 7.20.7 - '@vue/shared': 3.2.45 + '@vue/shared': 3.2.47 estree-walker: 2.0.2 source-map: 0.6.1 - /@vue/compiler-dom/3.2.45: - resolution: {integrity: sha512-tyYeUEuKqqZO137WrZkpwfPCdiiIeXYCcJ8L4gWz9vqaxzIQRccTSwSWZ/Axx5YR2z+LvpUbmPNXxuBU45lyRw==} + /@vue/compiler-dom/3.2.47: + resolution: {integrity: sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==} + dependencies: + '@vue/compiler-core': 3.2.47 + '@vue/shared': 3.2.47 + + /@vue/compiler-sfc/2.7.14: + resolution: {integrity: sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==} dependencies: - '@vue/compiler-core': 3.2.45 - '@vue/shared': 3.2.45 + '@babel/parser': 7.20.7 + postcss: 8.4.21 + source-map: 0.6.1 + dev: false - /@vue/compiler-sfc/3.2.45: - resolution: {integrity: sha512-1jXDuWah1ggsnSAOGsec8cFjT/K6TMZ0sPL3o3d84Ft2AYZi2jWJgRMjw4iaK0rBfA89L5gw427H4n1RZQBu6Q==} + /@vue/compiler-sfc/3.2.47: + resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==} dependencies: '@babel/parser': 7.20.7 - '@vue/compiler-core': 3.2.45 - '@vue/compiler-dom': 3.2.45 - '@vue/compiler-ssr': 3.2.45 - '@vue/reactivity-transform': 3.2.45 - '@vue/shared': 3.2.45 + '@vue/compiler-core': 3.2.47 + '@vue/compiler-dom': 3.2.47 + '@vue/compiler-ssr': 3.2.47 + '@vue/reactivity-transform': 3.2.47 + '@vue/shared': 3.2.47 estree-walker: 2.0.2 magic-string: 0.25.9 postcss: 8.4.21 source-map: 0.6.1 - /@vue/compiler-ssr/3.2.45: - resolution: {integrity: sha512-6BRaggEGqhWht3lt24CrIbQSRD5O07MTmd+LjAn5fJj568+R9eUD2F7wMQJjX859seSlrYog7sUtrZSd7feqrQ==} + /@vue/compiler-ssr/3.2.47: + resolution: {integrity: sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==} dependencies: - '@vue/compiler-dom': 3.2.45 - '@vue/shared': 3.2.45 + '@vue/compiler-dom': 3.2.47 + '@vue/shared': 3.2.47 - /@vue/reactivity-transform/3.2.45: - resolution: {integrity: sha512-BHVmzYAvM7vcU5WmuYqXpwaBHjsS8T63jlKGWVtHxAHIoMIlmaMyurUSEs1Zcg46M4AYT5MtB1U274/2aNzjJQ==} + /@vue/reactivity-transform/3.2.47: + resolution: {integrity: sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==} dependencies: '@babel/parser': 7.20.7 - '@vue/compiler-core': 3.2.45 - '@vue/shared': 3.2.45 + '@vue/compiler-core': 3.2.47 + '@vue/shared': 3.2.47 estree-walker: 2.0.2 magic-string: 0.25.9 - /@vue/reactivity/3.2.45: - resolution: {integrity: sha512-PRvhCcQcyEVohW0P8iQ7HDcIOXRjZfAsOds3N99X/Dzewy8TVhTCT4uXpAHfoKjVTJRA0O0K+6QNkDIZAxNi3A==} + /@vue/reactivity/3.2.47: + resolution: {integrity: sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==} dependencies: - '@vue/shared': 3.2.45 + '@vue/shared': 3.2.47 - /@vue/runtime-core/3.2.45: - resolution: {integrity: sha512-gzJiTA3f74cgARptqzYswmoQx0fIA+gGYBfokYVhF8YSXjWTUA2SngRzZRku2HbGbjzB6LBYSbKGIaK8IW+s0A==} + /@vue/runtime-core/3.2.47: + resolution: {integrity: sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==} dependencies: - '@vue/reactivity': 3.2.45 - '@vue/shared': 3.2.45 + '@vue/reactivity': 3.2.47 + '@vue/shared': 3.2.47 - /@vue/runtime-dom/3.2.45: - resolution: {integrity: sha512-cy88YpfP5Ue2bDBbj75Cb4bIEZUMM/mAkDMfqDTpUYVgTf/kuQ2VQ8LebuZ8k6EudgH8pYhsGWHlY0lcxlvTwA==} + /@vue/runtime-dom/3.2.47: + resolution: {integrity: sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==} dependencies: - '@vue/runtime-core': 3.2.45 - '@vue/shared': 3.2.45 + '@vue/runtime-core': 3.2.47 + '@vue/shared': 3.2.47 csstype: 2.6.21 dev: false - /@vue/server-renderer/3.2.45_vue@3.2.45: - resolution: {integrity: sha512-ebiMq7q24WBU1D6uhPK//2OTR1iRIyxjF5iVq/1a5I1SDMDyDu4Ts6fJaMnjrvD3MqnaiFkKQj+LKAgz5WIK3g==} + /@vue/server-renderer/3.2.47_vue@3.2.47: + resolution: {integrity: sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==} peerDependencies: - vue: 3.2.45 + vue: 3.2.47 dependencies: - '@vue/compiler-ssr': 3.2.45 - '@vue/shared': 3.2.45 - vue: 3.2.45 + '@vue/compiler-ssr': 3.2.47 + '@vue/shared': 3.2.47 + vue: 3.2.47 dev: false - /@vue/shared/3.2.45: - resolution: {integrity: sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg==} + /@vue/shared/3.2.47: + resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==} /@webgpu/types/0.1.21: resolution: {integrity: sha512-pUrWq3V5PiSGFLeLxoGqReTZmiiXwY3jRkIG5sLLKjyqNxrwm/04b4nw7LSmGWJcKk59XOM/YRTUwOzo4MMlow==} @@ -3429,13 +3420,6 @@ packages: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} dev: true - /archive-type/4.0.0: - resolution: {integrity: sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA==} - engines: {node: '>=4'} - dependencies: - file-type: 4.4.0 - dev: true - /archiver-utils/2.1.0: resolution: {integrity: sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==} engines: {node: '>= 6'} @@ -3898,33 +3882,21 @@ packages: executable: 4.1.1 dev: true - /bin-version-check/4.0.0: - resolution: {integrity: sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==} - engines: {node: '>=6'} - dependencies: - bin-version: 3.1.0 - semver: 5.7.1 - semver-truncate: 1.1.2 - dev: true - - /bin-version/3.1.0: - resolution: {integrity: sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==} - engines: {node: '>=6'} + /bin-version-check/5.0.0: + resolution: {integrity: sha512-Q3FMQnS5eZmrBGqmDXLs4dbAn/f+52voP6ykJYmweSA60t6DyH4UTSwZhtbK5UH+LBoWvDljILUQMLRUtsynsA==} + engines: {node: '>=12'} dependencies: - execa: 1.0.0 - find-versions: 3.2.0 + bin-version: 6.0.0 + semver: 7.3.8 + semver-truncate: 2.0.0 dev: true - /bin-wrapper/4.1.0: - resolution: {integrity: sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==} - engines: {node: '>=6'} + /bin-version/6.0.0: + resolution: {integrity: sha512-nk5wEsP4RiKjG+vF+uG8lFsEn4d7Y6FVDamzzftSunXOoOcOOkzcWdKVlGgFFwlUQCj63SgnUkLLGF8v7lufhw==} + engines: {node: '>=12'} 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 + execa: 5.1.1 + find-versions: 5.1.0 dev: true /binary-extensions/2.2.0: @@ -3943,13 +3915,6 @@ packages: engines: {node: '>=0.8'} dev: false - /bl/1.2.3: - resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} - dependencies: - readable-stream: 2.3.7 - safe-buffer: 5.2.1 - dev: true - /bl/4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: @@ -4052,17 +4017,6 @@ packages: node-int64: 0.4.0 dev: true - /buffer-alloc-unsafe/1.1.0: - resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} - dev: true - - /buffer-alloc/1.2.0: - resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==} - dependencies: - buffer-alloc-unsafe: 1.1.0 - buffer-fill: 1.0.0 - dev: true - /buffer-crc32/0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} @@ -4075,10 +4029,6 @@ packages: engines: {node: '>=0.4'} dev: false - /buffer-fill/1.0.0: - resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} - dev: true - /buffer-from/1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -4201,7 +4151,6 @@ packages: /cacheable-lookup/5.0.4: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} - dev: false /cacheable-lookup/6.1.0: resolution: {integrity: sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==} @@ -4226,18 +4175,6 @@ packages: responselike: 3.0.0 dev: false - /cacheable-request/2.1.4: - resolution: {integrity: sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ==} - 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 - dev: true - /cacheable-request/7.0.2: resolution: {integrity: sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==} engines: {node: '>=8'} @@ -4249,7 +4186,6 @@ packages: lowercase-keys: 2.0.0 normalize-url: 6.1.0 responselike: 2.0.1 - dev: false /cachedir/2.3.0: resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} @@ -4309,16 +4245,6 @@ packages: /caseless/0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - /caw/2.0.1: - resolution: {integrity: sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==} - engines: {node: '>=4'} - dependencies: - get-proxy: 2.1.0 - isurl: 1.0.0 - tunnel-agent: 0.6.0 - url-to-options: 1.0.1 - dev: true - /cbor/8.1.0: resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} engines: {node: '>=12.19'} @@ -4576,17 +4502,10 @@ packages: engines: {node: '>= 0.10'} dev: false - /clone-response/1.0.2: - resolution: {integrity: sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==} - dependencies: - mimic-response: 1.0.1 - dev: true - /clone-response/1.0.3: resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} dependencies: mimic-response: 1.0.1 - dev: false /clone-stats/1.0.0: resolution: {integrity: sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==} @@ -4736,6 +4655,7 @@ packages: /commander/2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + dev: false /commander/5.1.0: resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} @@ -4788,13 +4708,6 @@ packages: typedarray: 0.0.6 dev: false - /config-chain/1.1.13: - resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} - dependencies: - ini: 1.3.8 - proto-list: 1.2.4 - dev: true - /consola/2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} dev: false @@ -4863,6 +4776,7 @@ packages: /core-util-is/1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: false /crc-32/1.2.2: resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} @@ -4907,17 +4821,6 @@ packages: which: 1.3.1 dev: true - /cross-spawn/6.0.5: - resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} - engines: {node: '>=4.8'} - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.1 - shebang-command: 1.2.0 - which: 1.3.1 - dev: true - /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -5014,14 +4917,22 @@ packages: resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==} dev: false + /csstype/3.1.1: + resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} + dev: false + + /custom-event-polyfill/1.0.7: + resolution: {integrity: sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w==} + dev: false + /cwise-compiler/1.1.3: resolution: {integrity: sha512-WXlK/m+Di8DMMcCjcWr4i+XzcQra9eCdXIJrgh4TUgh0pIS/yJduLxS9JgefsHJ/YVLdgPtXm9r62W92MvanEQ==} dependencies: uniq: 1.0.1 dev: false - /cypress/12.4.0: - resolution: {integrity: sha512-//h93K/yGC/7pxv1KamlkADbKHLp5h3f9rZDE2McRjXZDagMETH0sXowOOanvhsH8cFt/JWspIcK+p9cuaoAqg==} + /cypress/12.5.1: + resolution: {integrity: sha512-ZmCmJ3lsyeOpBfh410m5+AO2CO1AxAzFBt7k6/uVbNcrNZje1vdiwYTpj2ksPKg9mjr9lR6V8tmlDNMvr4H/YQ==} engines: {node: ^14.0.0 || ^16.0.0 || >=18.0.0} hasBin: true requiresBuild: true @@ -5197,73 +5108,13 @@ packages: /decode-uri-component/0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} - - /decompress-response/3.3.0: - resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==} - engines: {node: '>=4'} - dependencies: - mimic-response: 1.0.1 - dev: true + dev: false /decompress-response/6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} dependencies: mimic-response: 3.1.0 - dev: false - - /decompress-tar/4.1.1: - resolution: {integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==} - engines: {node: '>=4'} - dependencies: - file-type: 5.2.0 - is-stream: 1.1.0 - tar-stream: 1.6.2 - dev: true - - /decompress-tarbz2/4.1.1: - resolution: {integrity: sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==} - engines: {node: '>=4'} - dependencies: - decompress-tar: 4.1.1 - file-type: 6.2.0 - is-stream: 1.1.0 - seek-bzip: 1.0.6 - unbzip2-stream: 1.4.3 - dev: true - - /decompress-targz/4.1.1: - resolution: {integrity: sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==} - engines: {node: '>=4'} - dependencies: - decompress-tar: 4.1.1 - file-type: 5.2.0 - is-stream: 1.1.0 - dev: true - - /decompress-unzip/4.0.1: - resolution: {integrity: sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==} - engines: {node: '>=4'} - dependencies: - file-type: 3.9.0 - get-stream: 2.3.1 - pify: 2.3.0 - yauzl: 2.10.0 - dev: true - - /decompress/4.2.1: - resolution: {integrity: sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==} - engines: {node: '>=4'} - dependencies: - decompress-tar: 4.1.1 - decompress-tarbz2: 4.1.1 - decompress-targz: 4.1.1 - decompress-unzip: 4.0.1 - graceful-fs: 4.2.10 - make-dir: 1.3.0 - pify: 2.3.0 - strip-dirs: 2.1.0 - dev: true /dedent/0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} @@ -5311,7 +5162,6 @@ packages: /defer-to-connect/2.0.1: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} engines: {node: '>=10'} - dev: false /define-properties/1.1.4: resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} @@ -5496,24 +5346,6 @@ packages: engines: {node: '>=12'} dev: false - /download/7.1.0: - resolution: {integrity: sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==} - engines: {node: '>=6'} - dependencies: - archive-type: 4.0.0 - caw: 2.0.1 - content-disposition: 0.5.4 - decompress: 4.2.1 - ext-name: 5.0.0 - file-type: 8.1.0 - filenamify: 2.1.0 - get-stream: 3.0.0 - got: 8.3.2 - make-dir: 1.3.0 - p-event: 2.3.1 - pify: 3.0.0 - dev: true - /duplexer/0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true @@ -5524,10 +5356,6 @@ packages: readable-stream: 2.3.7 dev: false - /duplexer3/0.1.5: - resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==} - dev: true - /duplexify/3.7.1: resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} dependencies: @@ -5725,8 +5553,8 @@ packages: es6-symbol: 3.1.3 dev: false - /esbuild-android-64/0.14.54: - resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} + /esbuild-android-64/0.14.42: + resolution: {integrity: sha512-P4Y36VUtRhK/zivqGVMqhptSrFILAGlYp0Z8r9UQqHJ3iWztRCNWnlBzD9HRx0DbueXikzOiwyOri+ojAFfW6A==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -5734,8 +5562,8 @@ packages: dev: false optional: true - /esbuild-android-arm64/0.14.54: - resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} + /esbuild-android-arm64/0.14.42: + resolution: {integrity: sha512-0cOqCubq+RWScPqvtQdjXG3Czb3AWI2CaKw3HeXry2eoA2rrPr85HF7IpdU26UWdBXgPYtlTN1LUiuXbboROhg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -5743,8 +5571,8 @@ packages: dev: false optional: true - /esbuild-darwin-64/0.14.54: - resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} + /esbuild-darwin-64/0.14.42: + resolution: {integrity: sha512-ipiBdCA3ZjYgRfRLdQwP82rTiv/YVMtW36hTvAN5ZKAIfxBOyPXY7Cejp3bMXWgzKD8B6O+zoMzh01GZsCuEIA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -5752,8 +5580,8 @@ packages: dev: false optional: true - /esbuild-darwin-arm64/0.14.54: - resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} + /esbuild-darwin-arm64/0.14.42: + resolution: {integrity: sha512-bU2tHRqTPOaoH/4m0zYHbFWpiYDmaA0gt90/3BMEFaM0PqVK/a6MA2V/ypV5PO0v8QxN6gH5hBPY4YJ2lopXgA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -5761,8 +5589,8 @@ packages: dev: false optional: true - /esbuild-freebsd-64/0.14.54: - resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} + /esbuild-freebsd-64/0.14.42: + resolution: {integrity: sha512-75h1+22Ivy07+QvxHyhVqOdekupiTZVLN1PMwCDonAqyXd8TVNJfIRFrdL8QmSJrOJJ5h8H1I9ETyl2L8LQDaw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -5770,8 +5598,8 @@ packages: dev: false optional: true - /esbuild-freebsd-arm64/0.14.54: - resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} + /esbuild-freebsd-arm64/0.14.42: + resolution: {integrity: sha512-W6Jebeu5TTDQMJUJVarEzRU9LlKpNkPBbjqSu+GUPTHDCly5zZEQq9uHkmHHl7OKm+mQ2zFySN83nmfCeZCyNA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -5779,8 +5607,8 @@ packages: dev: false optional: true - /esbuild-linux-32/0.14.54: - resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} + /esbuild-linux-32/0.14.42: + resolution: {integrity: sha512-Ooy/Bj+mJ1z4jlWcK5Dl6SlPlCgQB9zg1UrTCeY8XagvuWZ4qGPyYEWGkT94HUsRi2hKsXvcs6ThTOjBaJSMfg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -5788,8 +5616,8 @@ packages: dev: false optional: true - /esbuild-linux-64/0.14.54: - resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} + /esbuild-linux-64/0.14.42: + resolution: {integrity: sha512-2L0HbzQfbTuemUWfVqNIjOfaTRt9zsvjnme6lnr7/MO9toz/MJ5tZhjqrG6uDWDxhsaHI2/nsDgrv8uEEN2eoA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -5797,8 +5625,8 @@ packages: dev: false optional: true - /esbuild-linux-arm/0.14.54: - resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} + /esbuild-linux-arm/0.14.42: + resolution: {integrity: sha512-STq69yzCMhdRaWnh29UYrLSr/qaWMm/KqwaRF1pMEK7kDiagaXhSL1zQGXbYv94GuGY/zAwzK98+6idCMUOOCg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -5806,8 +5634,8 @@ packages: dev: false optional: true - /esbuild-linux-arm64/0.14.54: - resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} + /esbuild-linux-arm64/0.14.42: + resolution: {integrity: sha512-c3Ug3e9JpVr8jAcfbhirtpBauLxzYPpycjWulD71CF6ZSY26tvzmXMJYooQ2YKqDY4e/fPu5K8bm7MiXMnyxuA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -5815,8 +5643,8 @@ packages: dev: false optional: true - /esbuild-linux-mips64le/0.14.54: - resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} + /esbuild-linux-mips64le/0.14.42: + resolution: {integrity: sha512-QuvpHGbYlkyXWf2cGm51LBCHx6eUakjaSrRpUqhPwjh/uvNUYvLmz2LgPTTPwCqaKt0iwL+OGVL0tXA5aDbAbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -5824,8 +5652,8 @@ packages: dev: false optional: true - /esbuild-linux-ppc64le/0.14.54: - resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} + /esbuild-linux-ppc64le/0.14.42: + resolution: {integrity: sha512-8ohIVIWDbDT+i7lCx44YCyIRrOW1MYlks9fxTo0ME2LS/fxxdoJBwHWzaDYhjvf8kNpA+MInZvyOEAGoVDrMHg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -5833,8 +5661,8 @@ packages: dev: false optional: true - /esbuild-linux-riscv64/0.14.54: - resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} + /esbuild-linux-riscv64/0.14.42: + resolution: {integrity: sha512-DzDqK3TuoXktPyG1Lwx7vhaF49Onv3eR61KwQyxYo4y5UKTpL3NmuarHSIaSVlTFDDpcIajCDwz5/uwKLLgKiQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -5842,8 +5670,8 @@ packages: dev: false optional: true - /esbuild-linux-s390x/0.14.54: - resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} + /esbuild-linux-s390x/0.14.42: + resolution: {integrity: sha512-YFRhPCxl8nb//Wn6SiS5pmtplBi4z9yC2gLrYoYI/tvwuB1jldir9r7JwAGy1Ck4D7sE7wBN9GFtUUX/DLdcEQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -5851,8 +5679,8 @@ packages: dev: false optional: true - /esbuild-netbsd-64/0.14.54: - resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} + /esbuild-netbsd-64/0.14.42: + resolution: {integrity: sha512-QYSD2k+oT9dqB/4eEM9c+7KyNYsIPgzYOSrmfNGDIyJrbT1d+CFVKvnKahDKNJLfOYj8N4MgyFaU9/Ytc6w5Vw==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -5860,8 +5688,8 @@ packages: dev: false optional: true - /esbuild-openbsd-64/0.14.54: - resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} + /esbuild-openbsd-64/0.14.42: + resolution: {integrity: sha512-M2meNVIKWsm2HMY7+TU9AxM7ZVwI9havdsw6m/6EzdXysyCFFSoaTQ/Jg03izjCsK17FsVRHqRe26Llj6x0MNA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -5869,8 +5697,8 @@ packages: dev: false optional: true - /esbuild-sunos-64/0.14.54: - resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} + /esbuild-sunos-64/0.14.42: + resolution: {integrity: sha512-uXV8TAZEw36DkgW8Ak3MpSJs1ofBb3Smkc/6pZ29sCAN1KzCAQzsje4sUwugf+FVicrHvlamCOlFZIXgct+iqQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -5878,8 +5706,8 @@ packages: dev: false optional: true - /esbuild-windows-32/0.14.54: - resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} + /esbuild-windows-32/0.14.42: + resolution: {integrity: sha512-4iw/8qWmRICWi9ZOnJJf9sYt6wmtp3hsN4TdI5NqgjfOkBVMxNdM9Vt3626G1Rda9ya2Q0hjQRD9W1o+m6Lz6g==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -5887,8 +5715,8 @@ packages: dev: false optional: true - /esbuild-windows-64/0.14.54: - resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} + /esbuild-windows-64/0.14.42: + resolution: {integrity: sha512-j3cdK+Y3+a5H0wHKmLGTJcq0+/2mMBHPWkItR3vytp/aUGD/ua/t2BLdfBIzbNN9nLCRL9sywCRpOpFMx3CxzA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -5896,8 +5724,8 @@ packages: dev: false optional: true - /esbuild-windows-arm64/0.14.54: - resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} + /esbuild-windows-arm64/0.14.42: + resolution: {integrity: sha512-+lRAARnF+hf8J0mN27ujO+VbhPbDqJ8rCcJKye4y7YZLV6C4n3pTRThAb388k/zqF5uM0lS5O201u0OqoWSicw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -5905,33 +5733,32 @@ packages: dev: false optional: true - /esbuild/0.14.54: - resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} + /esbuild/0.14.42: + resolution: {integrity: sha512-V0uPZotCEHokJdNqyozH6qsaQXqmZEOiZWrXnds/zaH/0SyrIayRXWRB98CENO73MIZ9T3HBIOsmds5twWtmgw==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/linux-loong64': 0.14.54 - esbuild-android-64: 0.14.54 - esbuild-android-arm64: 0.14.54 - esbuild-darwin-64: 0.14.54 - esbuild-darwin-arm64: 0.14.54 - esbuild-freebsd-64: 0.14.54 - esbuild-freebsd-arm64: 0.14.54 - esbuild-linux-32: 0.14.54 - esbuild-linux-64: 0.14.54 - esbuild-linux-arm: 0.14.54 - esbuild-linux-arm64: 0.14.54 - esbuild-linux-mips64le: 0.14.54 - esbuild-linux-ppc64le: 0.14.54 - esbuild-linux-riscv64: 0.14.54 - esbuild-linux-s390x: 0.14.54 - esbuild-netbsd-64: 0.14.54 - esbuild-openbsd-64: 0.14.54 - esbuild-sunos-64: 0.14.54 - esbuild-windows-32: 0.14.54 - esbuild-windows-64: 0.14.54 - esbuild-windows-arm64: 0.14.54 + esbuild-android-64: 0.14.42 + esbuild-android-arm64: 0.14.42 + esbuild-darwin-64: 0.14.42 + esbuild-darwin-arm64: 0.14.42 + esbuild-freebsd-64: 0.14.42 + esbuild-freebsd-arm64: 0.14.42 + esbuild-linux-32: 0.14.42 + esbuild-linux-64: 0.14.42 + esbuild-linux-arm: 0.14.42 + esbuild-linux-arm64: 0.14.42 + esbuild-linux-mips64le: 0.14.42 + esbuild-linux-ppc64le: 0.14.42 + esbuild-linux-riscv64: 0.14.42 + esbuild-linux-s390x: 0.14.42 + esbuild-netbsd-64: 0.14.42 + esbuild-openbsd-64: 0.14.42 + esbuild-sunos-64: 0.14.42 + esbuild-windows-32: 0.14.42 + esbuild-windows-64: 0.14.42 + esbuild-windows-arm64: 0.14.42 dev: false /esbuild/0.16.17: @@ -5989,6 +5816,11 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + /escape-string-regexp/5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + dev: true + /escodegen/2.0.0: resolution: {integrity: sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==} engines: {node: '>=6.0'} @@ -6012,7 +5844,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_cnxxylyx37asr43xy64ejg3pwe: + /eslint-module-utils/2.7.4_ypqpzq5szckeh62pb722iz7nn4: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -6033,15 +5865,15 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 debug: 3.2.7 - eslint: 8.32.0 + eslint: 8.33.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import/2.27.5_6savw6y3b7jng6f64kgkyoij64: + /eslint-plugin-import/2.27.5_ufewo3pl5nnmz6lltvjrdi2hii: resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -6051,15 +5883,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.49.0_7uibuqfxkfaozanbtbziikiqje + '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64 array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.32.0 + eslint: 8.33.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_cnxxylyx37asr43xy64ejg3pwe + eslint-module-utils: 2.7.4_ypqpzq5szckeh62pb722iz7nn4 has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -6074,19 +5906,19 @@ packages: - supports-color dev: true - /eslint-plugin-vue/9.9.0_eslint@8.32.0: + /eslint-plugin-vue/9.9.0_eslint@8.33.0: resolution: {integrity: sha512-YbubS7eK0J7DCf0U2LxvVP7LMfs6rC6UltihIgval3azO3gyDwEGVgsCMe1TmDiEkl6GdMKfRpaME6QxIYtzDQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.32.0 - eslint-utils: 3.0.0_eslint@8.32.0 + eslint: 8.33.0 + eslint-utils: 3.0.0_eslint@8.33.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.11 semver: 7.3.8 - vue-eslint-parser: 9.1.0_eslint@8.32.0 + vue-eslint-parser: 9.1.0_eslint@8.33.0 xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -6108,13 +5940,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.32.0: + /eslint-utils/3.0.0_eslint@8.33.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.32.0 + eslint: 8.33.0 eslint-visitor-keys: 2.1.0 dev: true @@ -6128,8 +5960,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.32.0: - resolution: {integrity: sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==} + /eslint/8.33.0: + resolution: {integrity: sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: @@ -6144,7 +5976,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.32.0 + eslint-utils: 3.0.0_eslint@8.33.0 eslint-visitor-keys: 3.3.0 espree: 9.4.1 esquery: 1.4.0 @@ -6226,11 +6058,6 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - /etag/1.8.1: - resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} - engines: {node: '>= 0.6'} - dev: false - /event-stream/3.3.4: resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} dependencies: @@ -6283,19 +6110,6 @@ packages: strip-eof: 1.0.0 dev: true - /execa/1.0.0: - resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} - engines: {node: '>=6'} - dependencies: - cross-spawn: 6.0.5 - get-stream: 4.1.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.7 - strip-eof: 1.0.0 - dev: true - /execa/4.1.0: resolution: {integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==} engines: {node: '>=10'} @@ -6623,6 +6437,15 @@ packages: flat-cache: 3.0.4 dev: true + /file-type/17.1.6: + resolution: {integrity: sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + readable-web-to-node-stream: 3.0.2 + strtok3: 7.0.0 + token-types: 5.0.1 + dev: true + /file-type/18.2.0: resolution: {integrity: sha512-M3RQMWY3F2ykyWZ+IHwNCjpnUmukYhtdkGGC1ZVEUb0ve5REGF7NNJ4Q9ehCUabtQKtSVFOMbFTXgJlFb0DQIg==} engines: {node: '>=14.16'} @@ -6632,49 +6455,24 @@ packages: token-types: 5.0.1 dev: false - /file-type/3.9.0: - resolution: {integrity: sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==} - engines: {node: '>=0.10.0'} - dev: true - - /file-type/4.4.0: - resolution: {integrity: sha512-f2UbFQEk7LXgWpi5ntcO86OeA/cC80fuDDDaX/fZ2ZGel+AF7leRQqBBW1eJNiiQkrZlAoM6P+VYP5P6bOlDEQ==} - engines: {node: '>=4'} - dev: true - - /file-type/5.2.0: - resolution: {integrity: sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==} - engines: {node: '>=4'} - dev: true - - /file-type/6.2.0: - resolution: {integrity: sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==} - engines: {node: '>=4'} - dev: true - - /file-type/8.1.0: - resolution: {integrity: sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==} - engines: {node: '>=6'} - dev: true - /filelist/1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} dependencies: minimatch: 5.1.2 dev: false - /filename-reserved-regex/2.0.0: - resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} - engines: {node: '>=4'} + /filename-reserved-regex/3.0.0: + resolution: {integrity: sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /filenamify/2.1.0: - resolution: {integrity: sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==} - engines: {node: '>=4'} + /filenamify/5.1.1: + resolution: {integrity: sha512-M45CbrJLGACfrPOkrTp3j2EcO9OBkKUYME0eiqOCa7i2poaklU0jhlIaMlr8ijLorT0uLAzrn3qXOp5684CkfA==} + engines: {node: '>=12.20'} dependencies: - filename-reserved-regex: 2.0.0 - strip-outer: 1.0.1 - trim-repeated: 1.0.0 + filename-reserved-regex: 3.0.0 + strip-outer: 2.0.0 + trim-repeated: 2.0.0 dev: true /fill-range/4.0.0: @@ -6725,11 +6523,11 @@ packages: path-exists: 4.0.0 dev: true - /find-versions/3.2.0: - resolution: {integrity: sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==} - engines: {node: '>=6'} + /find-versions/5.1.0: + resolution: {integrity: sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg==} + engines: {node: '>=12'} dependencies: - semver-regex: 2.0.0 + semver-regex: 4.0.5 dev: true /findup-sync/2.0.0: @@ -6891,15 +6689,9 @@ packages: resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} dev: true - /from2/2.3.0: - resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: true - /fs-constants/1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + dev: false /fs-extra/8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} @@ -7059,33 +6851,11 @@ packages: resolution: {integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==} engines: {node: '>=8'} - /get-proxy/2.1.0: - resolution: {integrity: sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==} - engines: {node: '>=4'} - dependencies: - npm-conf: 1.1.3 - dev: true - - /get-stream/2.3.1: - resolution: {integrity: sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==} - engines: {node: '>=0.10.0'} - dependencies: - object-assign: 4.1.1 - pinkie-promise: 2.0.1 - dev: true - /get-stream/3.0.0: resolution: {integrity: sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==} engines: {node: '>=4'} dev: true - /get-stream/4.1.0: - resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} - engines: {node: '>=6'} - dependencies: - pump: 3.0.0 - dev: true - /get-stream/5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -7286,7 +7056,6 @@ packages: lowercase-keys: 2.0.0 p-cancelable: 2.1.1 responselike: 2.0.1 - dev: false /got/12.5.3: resolution: {integrity: sha512-8wKnb9MGU8IPGRIo+/ukTy9XLJBwDiCpIf5TVzQ9Cpol50eMTpBq2GAuDsuDIz7hTYmZgMgC1e9ydr6kSDWs3w==} @@ -7305,31 +7074,6 @@ packages: responselike: 3.0.0 dev: false - /got/8.3.2: - resolution: {integrity: sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==} - engines: {node: '>=4'} - dependencies: - '@sindresorhus/is': 0.7.0 - '@types/keyv': 3.1.4 - '@types/responselike': 1.0.0 - cacheable-request: 2.1.4 - decompress-response: 3.3.0 - duplexer3: 0.1.5 - get-stream: 3.0.0 - into-stream: 3.1.0 - is-retry-allowed: 1.2.0 - isurl: 1.0.0 - lowercase-keys: 1.0.1 - mimic-response: 1.0.1 - p-cancelable: 0.4.1 - p-timeout: 2.0.1 - pify: 3.0.0 - safe-buffer: 5.2.1 - timed-out: 4.0.1 - url-parse-lax: 3.0.0 - url-to-options: 1.0.1 - dev: true - /graceful-fs/4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} @@ -7473,20 +7217,10 @@ packages: dependencies: get-intrinsic: 1.1.3 - /has-symbol-support-x/1.4.2: - resolution: {integrity: sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==} - dev: true - /has-symbols/1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - /has-to-string-tag-x/1.4.1: - resolution: {integrity: sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==} - dependencies: - has-symbol-support-x: 1.4.2 - dev: true - /has-tostringtag/1.0.0: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} @@ -7614,13 +7348,8 @@ packages: http-errors: 1.8.1 dev: false - /http-cache-semantics/3.8.1: - resolution: {integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==} - dev: true - /http-cache-semantics/4.1.0: resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==} - dev: false /http-errors/1.8.1: resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} @@ -7679,7 +7408,6 @@ packages: dependencies: quick-lru: 5.1.1 resolve-alpn: 1.2.1 - dev: false /http2-wrapper/2.2.0: resolution: {integrity: sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==} @@ -7780,11 +7508,6 @@ packages: resolve-from: 4.0.0 dev: true - /import-lazy/3.1.0: - resolution: {integrity: sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==} - engines: {node: '>=6'} - dev: true - /import-local/3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} engines: {node: '>=8'} @@ -7821,6 +7544,7 @@ packages: /ini/1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + dev: false /ini/2.0.0: resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} @@ -7850,14 +7574,6 @@ packages: engines: {node: '>= 0.10'} dev: false - /into-stream/3.1.0: - resolution: {integrity: sha512-TcdjPibTksa1NQximqep2r17ISRiNE9fwlfbg3F8ANdvP5/yrFTew86VcO//jk4QTaMlbjypPBq76HN2zaKfZQ==} - engines: {node: '>=4'} - dependencies: - from2: 2.3.0 - p-is-promise: 1.1.0 - dev: true - /invert-kv/1.0.0: resolution: {integrity: sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==} engines: {node: '>=0.10.0'} @@ -7910,8 +7626,8 @@ packages: sprintf-js: 1.1.2 dev: false - /ip-cidr/3.0.11: - resolution: {integrity: sha512-6pf3APV0cRWy7vk0ealQt7UeWPqpT4RQM0bR0miVY/XRiBV8hIkPSkEHctv1+GAUPIwT9qpUL57deYlYca9UEA==} + /ip-cidr/3.1.0: + resolution: {integrity: sha512-HUCn4snshEX1P8cja/IyU3qk8FVDW8T5zZcegDFbu4w7NojmAhk5NcOgj3M8+0fmumo1afJTPDtJlzsxLdOjtg==} engines: {node: '>=10.0.0'} dependencies: ip-address: 7.1.0 @@ -8145,10 +7861,6 @@ packages: resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} dev: false - /is-natural-number/4.0.1: - resolution: {integrity: sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==} - dev: true - /is-negated-glob/1.0.0: resolution: {integrity: sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==} engines: {node: '>=0.10.0'} @@ -8182,10 +7894,6 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - /is-object/1.0.2: - resolution: {integrity: sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==} - dev: true - /is-path-inside/3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} @@ -8229,11 +7937,6 @@ packages: is-unc-path: 1.0.0 dev: false - /is-retry-allowed/1.2.0: - resolution: {integrity: sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==} - engines: {node: '>=0.10.0'} - dev: true - /is-shared-array-buffer/1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: @@ -8334,6 +8037,7 @@ packages: /isarray/1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + dev: false /isexe/2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -8407,14 +8111,6 @@ packages: textextensions: 3.3.0 dev: false - /isurl/1.0.0: - resolution: {integrity: sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==} - engines: {node: '>= 4'} - dependencies: - has-to-string-tag-x: 1.4.1 - is-object: 1.0.2 - dev: true - /iterare/1.2.1: resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==} engines: {node: '>=6'} @@ -9001,13 +8697,8 @@ packages: hasBin: true dev: true - /json-buffer/3.0.0: - resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} - dev: true - /json-buffer/3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - dev: false /json-parse-even-better-errors/2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -9135,17 +8826,10 @@ packages: tsscmp: 1.0.6 dev: false - /keyv/3.0.0: - resolution: {integrity: sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==} - dependencies: - json-buffer: 3.0.0 - dev: true - /keyv/4.5.2: resolution: {integrity: sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==} dependencies: json-buffer: 3.0.1 - dev: false /kind-of/3.2.2: resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} @@ -9357,6 +9041,10 @@ packages: strip-bom: 2.0.0 dev: false + /loadjs/4.2.0: + resolution: {integrity: sha512-AgQGZisAlTPbTEzrHPb6q+NYBMD+DP9uvGSIjSUM5uG+0jG15cb8axWpxuOIqrmQjn6scaaH8JwloiP27b2KXA==} + dev: false + /locate-path/5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -9472,20 +9160,9 @@ packages: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} dev: false - /lowercase-keys/1.0.0: - resolution: {integrity: sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A==} - engines: {node: '>=0.10.0'} - dev: true - - /lowercase-keys/1.0.1: - resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==} - engines: {node: '>=0.10.0'} - dev: true - /lowercase-keys/2.0.0: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} - dev: false /lowercase-keys/3.0.0: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} @@ -9529,13 +9206,6 @@ packages: resolution: {integrity: sha512-3WjL8+ZDouZwKlyJBMp/4LeziLFXgleOdsYu87piGcMLqhBzCsy2QFdbtAwv757TFC/rtqd738fgJw1tFQCSgA==} dev: false - /make-dir/1.3.0: - resolution: {integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==} - engines: {node: '>=4'} - dependencies: - pify: 3.0.0 - dev: true - /make-dir/3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -9672,9 +9342,9 @@ packages: dependencies: mime-db: 1.52.0 - /mime/1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} + /mime/3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} hasBin: true dev: false @@ -9694,7 +9364,6 @@ packages: /mimic-response/3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} - dev: false /mimic-response/4.0.0: resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} @@ -9795,8 +9464,8 @@ packages: yallist: 4.0.0 dev: false - /misskey-js/0.0.14: - resolution: {integrity: sha512-bvLx6U3OwQwqHfp/WKwIVwdvNYAAPk0+YblXyxmSG3dwlzCgBRRLcB8o6bNruUDyJgh3t73pLDcOz3myxcUmww==} + /misskey-js/0.0.15: + resolution: {integrity: sha512-sCfQcPooD5Tfe/5pDr5JojAthhGot+hlidw67tj+7+AtZO5He3kBhsjJydY0vru6w3RFM5mzYR6SYISSBR/1WQ==} dependencies: autobind-decorator: 2.4.0 eventemitter3: 4.0.7 @@ -9834,10 +9503,6 @@ packages: obliterator: 2.0.4 dev: false - /moment/2.29.4: - resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} - dev: false - /ms/2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: false @@ -9996,10 +9661,6 @@ packages: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: false - /nice-try/1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - dev: true - /node-abi/3.31.0: resolution: {integrity: sha512-eSKV6s+APenqVh8ubJyiu/YhZgxQpGP66ntzUb3lY1xB9ukSRaGnx0AIxI+IM+1+IVYC1oWobgG5L3Lt9ARykQ==} engines: {node: '>=10'} @@ -10077,8 +9738,8 @@ packages: resolution: {integrity: sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==} dev: true - /nodemailer/6.9.0: - resolution: {integrity: sha512-jFaCEGTeT3E/m/5R2MHWiyQH3pSARECRUDM+1hokOYc3lQAAG7ASuy+2jIsYVf+RVa9zePopSQwKNVFH8DKUpA==} + /nodemailer/6.9.1: + resolution: {integrity: sha512-qHw7dOiU5UKNnQpXktdgQ1d3OFgRAekuvbJLcdG5dnEo/GtcTHRYM7+UfJARdOFU9WUQO8OiIamgWPmiSFHYAA==} engines: {node: '>=6.0.0'} dev: false @@ -10138,19 +9799,9 @@ packages: sort-keys: 1.1.2 dev: false - /normalize-url/2.0.1: - resolution: {integrity: sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==} - engines: {node: '>=4'} - dependencies: - prepend-http: 2.0.0 - query-string: 5.1.1 - sort-keys: 2.0.0 - dev: true - /normalize-url/6.1.0: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} - dev: false /normalize-url/8.0.0: resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} @@ -10164,14 +9815,6 @@ packages: once: 1.4.0 dev: false - /npm-conf/1.1.3: - resolution: {integrity: sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==} - engines: {node: '>=4'} - dependencies: - config-chain: 1.1.13 - pify: 3.0.0 - dev: true - /npm-run-path/2.0.2: resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} engines: {node: '>=4'} @@ -10261,6 +9904,7 @@ packages: /object-assign/4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + dev: false /object-copy/0.1.0: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} @@ -10444,37 +10088,19 @@ packages: resolution: {integrity: sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==} dev: true - /p-cancelable/0.4.1: - resolution: {integrity: sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==} - engines: {node: '>=4'} - dev: true - /p-cancelable/2.1.1: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} - dev: false /p-cancelable/3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} dev: false - /p-event/2.3.1: - resolution: {integrity: sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==} - engines: {node: '>=6'} - dependencies: - p-timeout: 2.0.1 - dev: true - /p-finally/1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} - /p-is-promise/1.1.0: - resolution: {integrity: sha512-zL7VE4JVS2IFSkR2GQKDSPEVxkoH43/p7oEnwpdCndKYJO0HVeRB7fA8TJwuLOTBREtK0ea8eHaxdwcpob5dmg==} - engines: {node: '>=4'} - dev: true - /p-limit/2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -10519,13 +10145,6 @@ packages: p-timeout: 3.2.0 dev: false - /p-timeout/2.0.1: - resolution: {integrity: sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==} - engines: {node: '>=4'} - dependencies: - p-finally: 1.0.0 - dev: true - /p-timeout/3.2.0: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} engines: {node: '>=8'} @@ -10696,7 +10315,6 @@ packages: /peek-readable/5.0.0: resolution: {integrity: sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==} engines: {node: '>=14.16'} - dev: false /pend/1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} @@ -10713,16 +10331,21 @@ packages: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} engines: {node: '>=4.0.0'} - /pg-pool/3.5.2_pg@8.8.0: + /pg-pool/3.5.2_pg@8.9.0: resolution: {integrity: sha512-His3Fh17Z4eg7oANLob6ZvH8xIVen3phEZh2QuyrIl4dQSDVEabNducv6ysROKpDNPSD+12tONZVWfSgMvDD9w==} peerDependencies: pg: '>=8.0' dependencies: - pg: 8.8.0 + pg: 8.9.0 dev: false /pg-protocol/1.5.0: resolution: {integrity: sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==} + dev: true + + /pg-protocol/1.6.0: + resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==} + dev: false /pg-types/2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} @@ -10734,8 +10357,8 @@ packages: postgres-date: 1.0.7 postgres-interval: 1.2.0 - /pg/8.8.0: - resolution: {integrity: sha512-UXYN0ziKj+AeNNP7VDMwrehpACThH7LUl/p8TDFpEUuSejCUIwGSfxpHsPvtM6/WXFy6SU4E5RG4IJV/TZAGjw==} + /pg/8.9.0: + resolution: {integrity: sha512-ZJM+qkEbtOHRuXjmvBtOgNOXOtLSbxiMiUVMgE4rV6Zwocy03RicCVvDXgx8l4Biwo8/qORUnEqn2fdQzV7KCg==} engines: {node: '>= 8.0.0'} peerDependencies: pg-native: '>=3.0.1' @@ -10746,8 +10369,8 @@ packages: buffer-writer: 2.0.0 packet-reader: 1.0.0 pg-connection-string: 2.5.0 - pg-pool: 3.5.2_pg@8.8.0 - pg-protocol: 1.5.0 + pg-pool: 3.5.2_pg@8.9.0 + pg-protocol: 1.6.0 pg-types: 2.2.0 pgpass: 1.0.5 dev: false @@ -10758,8 +10381,8 @@ packages: split2: 4.1.0 dev: false - /photoswipe/5.3.4: - resolution: {integrity: sha512-SN+RWHqxJvdwzXJsh8KrG+ajjPpdTX5HpKglEd0k9o6o5fW+QHPkW8//Bo11MB+NQwTa/hFw8BDv2EdxiDXjNw==} + /photoswipe/5.3.5: + resolution: {integrity: sha512-90JeebKBhjz1co9goGJ4vjDK84YhGKbLO8J/aKcoWS/OGddVZB77ONIs7igUKa0IB1HozTs0BiS184wzZCghMw==} engines: {node: '>= 0.12.0'} dev: false @@ -10774,25 +10397,17 @@ packages: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} - /pify/3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - dev: true - - /pify/4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - dev: true - /pinkie-promise/2.0.1: resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} engines: {node: '>=0.10.0'} dependencies: pinkie: 2.0.4 + dev: false /pinkie/2.0.4: resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} engines: {node: '>=0.10.0'} + dev: false /pino-abstract-transport/1.0.0: resolution: {integrity: sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==} @@ -11154,11 +10769,6 @@ packages: engines: {node: '>=0.10.0'} dev: false - /prepend-http/2.0.0: - resolution: {integrity: sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==} - engines: {node: '>=4'} - dev: true - /pretty-bytes/5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -11274,10 +10884,6 @@ packages: sisteransi: 1.0.5 dev: true - /proto-list/1.2.4: - resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} - dev: true - /proxy-addr/2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -11470,15 +11076,6 @@ packages: strict-uri-encode: 1.1.0 dev: false - /query-string/5.1.1: - resolution: {integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==} - engines: {node: '>=0.10.0'} - dependencies: - decode-uri-component: 0.2.2 - object-assign: 4.1.1 - strict-uri-encode: 1.1.0 - dev: true - /querystring/0.2.0: resolution: {integrity: sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==} engines: {node: '>=0.4.x'} @@ -11509,7 +11106,6 @@ packages: /quick-lru/5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} - dev: false /random-seed/0.3.0: resolution: {integrity: sha512-y13xtn3kcTlLub3HKWXxJNeC2qK4mB59evwZ5EkeRlolx+Bp2ztF7LbcZmyCnOqlHQrLnfuNbi1sVmm9lPDlDA==} @@ -11518,15 +11114,14 @@ packages: json-stringify-safe: 5.0.1 dev: false - /range-parser/1.2.1: - resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} - engines: {node: '>= 0.6'} - dev: false - /rangestr/0.0.1: resolution: {integrity: sha512-9CRCUX/w4+fNMzlYgA8GeJz7BZwBPwaGm3FhAm9Hi50k8wNy2CyiJQa8awygWJay87uVVCV0/FwbLcD6+/A9KQ==} dev: false + /rangetouch/2.0.1: + resolution: {integrity: sha512-sln+pNSc8NGaHoLzwNBssFSf/rSYkqeBXzX1AtJlkJiUaVSJSbRAWJk+4omsXkN+EJalzkZhWQ3th1m0FpR5xA==} + dev: false + /ratelimiter/3.4.1: resolution: {integrity: sha512-5FJbRW/Jkkdk29ksedAfWFkQkhbUrMx3QJGwMKAypeIiQf4yrLW+gtPKZiaWt4zPrtw1uGufOjGO7UGM6VllsQ==} dev: false @@ -11600,6 +11195,7 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 + dev: false /readable-stream/3.6.0: resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} @@ -11608,7 +11204,6 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: false /readable-stream/4.3.0: resolution: {integrity: sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==} @@ -11625,7 +11220,6 @@ packages: engines: {node: '>=8'} dependencies: readable-stream: 3.6.0 - dev: false /readdir-glob/1.1.2: resolution: {integrity: sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA==} @@ -11856,7 +11450,6 @@ packages: /resolve-alpn/1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} - dev: false /resolve-cwd/3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} @@ -11908,17 +11501,10 @@ packages: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - /responselike/1.0.2: - resolution: {integrity: sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==} - dependencies: - lowercase-keys: 1.0.1 - dev: true - /responselike/2.0.1: resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} dependencies: lowercase-keys: 2.0.0 - dev: false /responselike/3.0.0: resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} @@ -11977,8 +11563,8 @@ packages: seedrandom: 2.4.2 dev: false - /rollup/3.11.0: - resolution: {integrity: sha512-+uWPPkpWQ2H3Qi7sNBcRfhhHJyUNgBYhG4wKe5wuGRj2m55kpo+0p5jubKNBjQODyPe6tSBE3tNpdDwEisQvAQ==} + /rollup/3.12.1: + resolution: {integrity: sha512-t9elERrz2i4UU9z7AwISj3CQcXP39cWxgRWLdf4Tm6aKm1eYrqHIgjzXBgb67GNY1sZckTFFi0oMozh3/S++Ig==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -12012,6 +11598,7 @@ packages: /safe-buffer/5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: false /safe-buffer/5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -12044,8 +11631,8 @@ packages: /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - /sanitize-html/2.8.1: - resolution: {integrity: sha512-qK5neD0SaMxGwVv5txOYv05huC3o6ZAA4h5+7nJJgWMNFUNRjcjLO6FpwAtKzfKCZ0jrG6xTk6eVFskbvOGblg==} + /sanitize-html/2.9.0: + resolution: {integrity: sha512-KY1hpSbqFNcpoLf+nP7iStbP5JfQZ2Nd19ZEE7qFsQqRdp+sO5yX/e5+HoG9puFAcSTEpzQuihfKUltDcLlQjg==} dependencies: deepmerge: 4.2.2 escape-string-regexp: 4.0.0 @@ -12055,8 +11642,8 @@ packages: postcss: 8.4.21 dev: false - /sass/1.57.1: - resolution: {integrity: sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==} + /sass/1.58.0: + resolution: {integrity: sha512-PiMJcP33DdKtZ/1jSjjqVIKihoDc6yWmYr9K/4r3fVVIEDAluD0q7XZiRKrNJcPK3qkLRF/79DND1H5q1LBjgg==} engines: {node: '>=12.0.0'} hasBin: true dependencies: @@ -12092,13 +11679,6 @@ packages: resolution: {integrity: sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==} dev: false - /seek-bzip/1.0.6: - resolution: {integrity: sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==} - hasBin: true - dependencies: - commander: 2.20.3 - dev: true - /semver-greatest-satisfied-range/1.1.0: resolution: {integrity: sha512-Ny/iyOzSSa8M5ML46IAx3iXc6tfOsYU2R4AXi2UpHk60Zrgyq6eqPj/xiOfS0rRl/iiQ/rdJkVjw/5cdUyCntQ==} engines: {node: '>= 0.10'} @@ -12106,21 +11686,22 @@ packages: sver-compat: 1.5.0 dev: false - /semver-regex/2.0.0: - resolution: {integrity: sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==} - engines: {node: '>=6'} + /semver-regex/4.0.5: + resolution: {integrity: sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw==} + engines: {node: '>=12'} dev: true - /semver-truncate/1.1.2: - resolution: {integrity: sha512-V1fGg9i4CL3qesB6U0L6XAm4xOJiHmt4QAacazumuasc03BvtFGIMCduv01JWQ69Nv+JST9TqhSCiJoxoY031w==} - engines: {node: '>=0.10.0'} + /semver-truncate/2.0.0: + resolution: {integrity: sha512-Rh266MLDYNeML5h90ttdMwfXe1+Nc4LAWd9X1KdJe8pPHP4kFmvLZALtsMNHNdvTyQygbEC0D59sIz47DIaq8w==} + engines: {node: '>=8'} dependencies: - semver: 5.7.1 + semver: 6.3.0 dev: true /semver/5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true + dev: false /semver/6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} @@ -12339,13 +11920,6 @@ packages: dependencies: is-plain-obj: 1.1.0 - /sort-keys/2.0.0: - resolution: {integrity: sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg==} - engines: {node: '>=4'} - dependencies: - is-plain-obj: 1.1.0 - dev: true - /sortablejs/1.14.0: resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==} dev: false @@ -12570,6 +12144,7 @@ packages: /strict-uri-encode/1.1.0: resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} engines: {node: '>=0.10.0'} + dev: false /string-length/4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} @@ -12620,12 +12195,12 @@ packages: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 + dev: false /string_decoder/1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - dev: false /stringz/2.1.0: resolution: {integrity: sha512-KlywLT+MZ+v0IRepfMxRtnSvDCMc3nR1qqCs3m/qIbSOWkNZYT8XHQA31rS3TnKp0c5xjZu3M4GY/2aRKSi/6A==} @@ -12662,12 +12237,6 @@ packages: engines: {node: '>=8'} dev: true - /strip-dirs/2.1.0: - resolution: {integrity: sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==} - dependencies: - is-natural-number: 4.0.1 - dev: true - /strip-eof/1.0.0: resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} engines: {node: '>=0.10.0'} @@ -12692,11 +12261,9 @@ packages: engines: {node: '>=8'} dev: true - /strip-outer/1.0.1: - resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} - engines: {node: '>=0.10.0'} - dependencies: - escape-string-regexp: 1.0.5 + /strip-outer/2.0.0: + resolution: {integrity: sha512-A21Xsm1XzUkK0qK1ZrytDUvqsQWict2Cykhvi0fBQntGG5JSprESasEyV1EZ/4CiR5WB5KjzLTrP/bO37B0wPg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true /strnum/1.0.5: @@ -12709,7 +12276,6 @@ packages: dependencies: '@tokenizer/token': 0.3.0 peek-readable: 5.0.0 - dev: false /summaly/2.7.0: resolution: {integrity: sha512-pEz9LL8Gp0oPIQfn6TrnBCcv/HkFE14hxhH3W6LPGdopXlPXjRcMlDMJaO+VupUNMOGaMjCsjq7+0rWnu8sp7w==} @@ -12791,8 +12357,8 @@ packages: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} dev: false - /systeminformation/5.17.4: - resolution: {integrity: sha512-mEiIYrw7X5ABX8tJUgzbumQAuFQxNyHdZDz6+UtwNKUbKgIoZqLtug2z1spFB/LiXZne5tdPBJOlvVckbvfhiQ==} + /systeminformation/5.17.8: + resolution: {integrity: sha512-kMQsCOFQXqEjoDWKpYkC+ezJImrOnyTL3FZnYDZdWLTZcMW7Gomdp8zH9ztGlSo2L1iCAQXZ8HlV1bI8/Ts64g==} engines: {node: '>=8.0.0'} os: [darwin, linux, win32, freebsd, openbsd, netbsd, sunos, android] hasBin: true @@ -12811,19 +12377,6 @@ packages: tar-stream: 2.2.0 dev: false - /tar-stream/1.6.2: - resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==} - engines: {node: '>= 0.8.0'} - dependencies: - bl: 1.2.3 - buffer-alloc: 1.2.0 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - readable-stream: 2.3.7 - to-buffer: 1.1.1 - xtend: 4.0.2 - dev: true - /tar-stream/2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} @@ -12962,11 +12515,6 @@ packages: engines: {node: '>=0.10.0'} dev: false - /timed-out/4.0.1: - resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} - engines: {node: '>=0.10.0'} - dev: true - /tiny-lru/10.0.1: resolution: {integrity: sha512-Vst+6kEsWvb17Zpz14sRJV/f8bUWKhqm6Dc+v08iShmIJ/WxqWytHzCTd6m88pS33rE2zpX34TRmOpAJPloNCA==} engines: {node: '>=6'} @@ -12994,10 +12542,6 @@ packages: is-negated-glob: 1.0.0 dev: false - /to-buffer/1.1.1: - resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} - dev: true - /to-fast-properties/2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -13055,7 +12599,6 @@ packages: dependencies: '@tokenizer/token': 0.3.0 ieee754: 1.2.1 - dev: false /tough-cookie/2.5.0: resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} @@ -13092,11 +12635,11 @@ packages: resolution: {integrity: sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==} dev: false - /trim-repeated/1.0.0: - resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} - engines: {node: '>=0.10.0'} + /trim-repeated/2.0.0: + resolution: {integrity: sha512-QUHBFTJGdOwmp0tbOG505xAgOp/YliZP/6UgafFXYZ26WT1bvQmSMJUvkeVSASuJJHbqsFbynTvkd5W8RBTipg==} + engines: {node: '>=12'} dependencies: - escape-string-regexp: 1.0.5 + escape-string-regexp: 5.0.0 dev: true /tsc-alias/1.8.2: @@ -13141,14 +12684,14 @@ packages: engines: {node: '>=0.6.x'} dev: false - /tsutils/3.21.0_typescript@4.9.4: + /tsutils/3.21.0_typescript@4.9.5: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.9.4 + typescript: 4.9.5 dev: true /tunnel-agent/0.6.0: @@ -13217,7 +12760,7 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: false - /typeorm/0.3.11_ioredis@4.28.5+pg@8.8.0: + /typeorm/0.3.11_ioredis@4.28.5+pg@8.9.0: resolution: {integrity: sha512-pzdOyWbVuz/z8Ww6gqvBW4nylsM0KLdUCDExr2gR20/x1khGSVxQkjNV/3YqliG90jrWzrknYbYscpk8yxFJVg==} engines: {node: '>= 12.9.0'} hasBin: true @@ -13287,7 +12830,7 @@ packages: ioredis: 4.28.5 js-yaml: 4.1.0 mkdirp: 1.0.4 - pg: 8.8.0 + pg: 8.9.0 reflect-metadata: 0.1.13 sha.js: 2.4.11 tslib: 2.4.1 @@ -13298,11 +12841,18 @@ packages: - supports-color dev: false - /typescript/4.9.4: - resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} + /typescript/4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true + /uid/2.0.1: + resolution: {integrity: sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==} + engines: {node: '>=8'} + dependencies: + '@lukeed/csprng': 1.0.1 + dev: false + /ulid/2.3.0: resolution: {integrity: sha512-keqHubrlpvT6G2wH0OEfSW4mquYRcbe/J8NMmveoQOjUqmo+hXtO+ORCpWhdbZ7k72UtY61BL7haGxW6enBnjw==} hasBin: true @@ -13317,13 +12867,6 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /unbzip2-stream/1.4.3: - resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - dependencies: - buffer: 5.7.1 - through: 2.3.8 - dev: true - /unc-path-regex/0.1.2: resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} engines: {node: '>=0.10.0'} @@ -13464,13 +13007,6 @@ packages: deprecated: Please see https://github.com/lydell/urix#deprecated dev: false - /url-parse-lax/3.0.0: - resolution: {integrity: sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==} - engines: {node: '>=4'} - dependencies: - prepend-http: 2.0.0 - dev: true - /url-parse/1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} dependencies: @@ -13478,10 +13014,9 @@ packages: requires-port: 1.0.0 dev: false - /url-to-options/1.0.1: - resolution: {integrity: sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==} - engines: {node: '>= 4'} - dev: true + /url-polyfill/1.1.12: + resolution: {integrity: sha512-mYFmBHCapZjtcNHW0MDq9967t+z4Dmg5CJ0KqysK3+ZbyoNOWQHksGCTWwDhxGXllkWlOc10Xfko6v4a3ucM6A==} + dev: false /url/0.10.3: resolution: {integrity: sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==} @@ -13643,8 +13178,8 @@ packages: replace-ext: 1.0.1 dev: false - /vite/4.0.4_ovmyjmuuyckt3r3gpaexj2onji: - resolution: {integrity: sha512-xevPU7M8FU0i/80DMR+YhgrzR5KS2ORy1B4xcX/cXLsvnUWvfHuqMmVU6N0YiJ4JWGRJJsLCgjEzKjG9/GKoSw==} + /vite/4.1.1_f5vcjb3akvjdur4ffzogu2hewu: + resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -13672,8 +13207,8 @@ packages: esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 - rollup: 3.11.0 - sass: 1.57.1 + rollup: 3.12.1 + sass: 1.58.0 optionalDependencies: fsevents: 2.3.2 dev: false @@ -13683,14 +13218,14 @@ packages: engines: {node: '>=0.10.0'} dev: false - /vue-eslint-parser/9.1.0_eslint@8.32.0: + /vue-eslint-parser/9.1.0_eslint@8.33.0: resolution: {integrity: sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.32.0 + eslint: 8.33.0 eslint-scope: 7.1.1 eslint-visitor-keys: 3.3.0 espree: 9.4.1 @@ -13701,13 +13236,20 @@ packages: - supports-color dev: true - /vue-prism-editor/2.0.0-alpha.2_vue@3.2.45: + /vue-plyr/7.0.0: + resolution: {integrity: sha512-NvbO/ZzV1IxlBQQbQlon5Sk8hKuGAj3k4k0XVdi7gM4oSqu8mZMhJ3WM3FfAtNfV790jbLnb8P3dHYqaBqIv6g==} + dependencies: + plyr: github.com/sampotts/plyr/d434c9af16e641400aaee93188594208d88f2658 + vue: 2.7.14 + dev: false + + /vue-prism-editor/2.0.0-alpha.2_vue@3.2.47: resolution: {integrity: sha512-Gu42ba9nosrE+gJpnAEuEkDMqG9zSUysIR8SdXUw8MQKDjBnnNR9lHC18uOr/ICz7yrA/5c7jHJr9lpElODC7w==} engines: {node: '>=10'} peerDependencies: vue: ^3.0.0 dependencies: - vue: 3.2.45 + vue: 3.2.47 dev: false /vue-template-compiler/2.7.14: @@ -13717,7 +13259,7 @@ packages: he: 1.2.0 dev: true - /vue-tsc/1.0.24_typescript@4.9.4: + /vue-tsc/1.0.24_typescript@4.9.5: resolution: {integrity: sha512-mmU1s5SAqE1nByQAiQnao9oU4vX+mSdsgI8H57SfKH6UVzq/jP9+Dbi2GaV+0b4Cn361d2ln8m6xeU60ApiEXg==} hasBin: true peerDependencies: @@ -13725,26 +13267,33 @@ packages: dependencies: '@volar/vue-language-core': 1.0.24 '@volar/vue-typescript': 1.0.24 - typescript: 4.9.4 + typescript: 4.9.5 dev: true - /vue/3.2.45: - resolution: {integrity: sha512-9Nx/Mg2b2xWlXykmCwiTUCWHbWIj53bnkizBxKai1g61f2Xit700A1ljowpTIM11e3uipOeiPcSqnmBg6gyiaA==} + /vue/2.7.14: + resolution: {integrity: sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==} dependencies: - '@vue/compiler-dom': 3.2.45 - '@vue/compiler-sfc': 3.2.45 - '@vue/runtime-dom': 3.2.45 - '@vue/server-renderer': 3.2.45_vue@3.2.45 - '@vue/shared': 3.2.45 + '@vue/compiler-sfc': 2.7.14 + csstype: 3.1.1 dev: false - /vuedraggable/4.1.0_vue@3.2.45: + /vue/3.2.47: + resolution: {integrity: sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==} + dependencies: + '@vue/compiler-dom': 3.2.47 + '@vue/compiler-sfc': 3.2.47 + '@vue/runtime-dom': 3.2.47 + '@vue/server-renderer': 3.2.47_vue@3.2.47 + '@vue/shared': 3.2.47 + dev: false + + /vuedraggable/4.1.0_vue@3.2.47: resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==} peerDependencies: vue: ^3.0.1 dependencies: sortablejs: 1.14.0 - vue: 3.2.45 + vue: 3.2.47 dev: false /w3c-xmlserializer/4.0.0: @@ -14145,17 +13694,20 @@ packages: readable-stream: 3.6.0 dev: false - github.com/misskey-dev/SyslogPro/2772b33fa126784fc6e21377786471a918b22dc7: - resolution: {tarball: https://codeload.github.com/misskey-dev/SyslogPro/tar.gz/2772b33fa126784fc6e21377786471a918b22dc7} - name: '@zeit/syslog-pro' - version: 0.2.9-misskey.2 - engines: {node: '>=10.0.0'} - dependencies: - moment: 2.29.4 - dev: false - github.com/misskey-dev/browser-image-resizer/0227e860621e55cbed0aabe6dc601096a7748c4a: resolution: {tarball: https://codeload.github.com/misskey-dev/browser-image-resizer/tar.gz/0227e860621e55cbed0aabe6dc601096a7748c4a} name: browser-image-resizer version: 2.2.1-misskey.3 dev: false + + github.com/sampotts/plyr/d434c9af16e641400aaee93188594208d88f2658: + resolution: {tarball: https://codeload.github.com/sampotts/plyr/tar.gz/d434c9af16e641400aaee93188594208d88f2658} + name: plyr + version: 3.7.0 + dependencies: + core-js: 3.27.1 + custom-event-polyfill: 1.0.7 + loadjs: 4.2.0 + rangetouch: 2.0.1 + url-polyfill: 1.1.12 + dev: false |