summaryrefslogtreecommitdiff
path: root/packages/backend
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-01-27 00:17:13 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-01-27 00:17:13 +0900
commit5f5f68cdcd31653cef2ae6bd29ce8bfcf60113ff (patch)
tree51e9e6179f6d1bda3013d1412f6e43f9f8f70e86 /packages/backend
parentMerge branch 'develop' (diff)
parent12.102.0 (diff)
downloadmisskey-5f5f68cdcd31653cef2ae6bd29ce8bfcf60113ff.tar.gz
misskey-5f5f68cdcd31653cef2ae6bd29ce8bfcf60113ff.tar.bz2
misskey-5f5f68cdcd31653cef2ae6bd29ce8bfcf60113ff.zip
Merge branch 'develop'
Diffstat (limited to 'packages/backend')
-rw-r--r--packages/backend/migration/1637320813000-forwarded-report.js13
-rw-r--r--packages/backend/migration/1642611822809-emoji-url.js15
-rw-r--r--packages/backend/migration/1642613870898-drive-file-webpublic-type.js13
-rw-r--r--packages/backend/package.json105
-rw-r--r--packages/backend/src/const.ts45
-rw-r--r--packages/backend/src/db/postgre.ts8
-rw-r--r--packages/backend/src/games/reversi/core.ts263
-rw-r--r--packages/backend/src/games/reversi/maps.ts896
-rw-r--r--packages/backend/src/games/reversi/package.json18
-rw-r--r--packages/backend/src/games/reversi/tsconfig.json21
-rw-r--r--packages/backend/src/misc/gen-identicon.ts (renamed from packages/backend/src/misc/gen-avatar.ts)7
-rw-r--r--packages/backend/src/misc/populate-emojis.ts5
-rw-r--r--packages/backend/src/misc/schema.ts175
-rw-r--r--packages/backend/src/misc/simple-schema.ts15
-rw-r--r--packages/backend/src/models/entities/abuse-user-report.ts5
-rw-r--r--packages/backend/src/models/entities/drive-file.ts5
-rw-r--r--packages/backend/src/models/entities/emoji.ts8
-rw-r--r--packages/backend/src/models/entities/games/reversi/game.ts133
-rw-r--r--packages/backend/src/models/entities/games/reversi/matching.ts35
-rw-r--r--packages/backend/src/models/entities/user-profile.ts1
-rw-r--r--packages/backend/src/models/index.ts4
-rw-r--r--packages/backend/src/models/repositories/abuse-user-report.ts1
-rw-r--r--packages/backend/src/models/repositories/antenna.ts91
-rw-r--r--packages/backend/src/models/repositories/app.ts35
-rw-r--r--packages/backend/src/models/repositories/blocking.ts28
-rw-r--r--packages/backend/src/models/repositories/channel.ts53
-rw-r--r--packages/backend/src/models/repositories/clip.ts39
-rw-r--r--packages/backend/src/models/repositories/drive-file.ts113
-rw-r--r--packages/backend/src/models/repositories/drive-folder.ts41
-rw-r--r--packages/backend/src/models/repositories/emoji.ts41
-rw-r--r--packages/backend/src/models/repositories/federation-instance.ts104
-rw-r--r--packages/backend/src/models/repositories/following.ts38
-rw-r--r--packages/backend/src/models/repositories/gallery-post.ts71
-rw-r--r--packages/backend/src/models/repositories/games/reversi/game.ts191
-rw-r--r--packages/backend/src/models/repositories/games/reversi/matching.ts69
-rw-r--r--packages/backend/src/models/repositories/hashtag.ts36
-rw-r--r--packages/backend/src/models/repositories/messaging-message.ts75
-rw-r--r--packages/backend/src/models/repositories/muting.ts28
-rw-r--r--packages/backend/src/models/repositories/note-favorite.ts28
-rw-r--r--packages/backend/src/models/repositories/note-reaction.ts27
-rw-r--r--packages/backend/src/models/repositories/note.ts187
-rw-r--r--packages/backend/src/models/repositories/notification.ts66
-rw-r--r--packages/backend/src/models/repositories/page.ts53
-rw-r--r--packages/backend/src/models/repositories/queue.ts30
-rw-r--r--packages/backend/src/models/repositories/user-group.ts36
-rw-r--r--packages/backend/src/models/repositories/user-list.ts31
-rw-r--r--packages/backend/src/models/repositories/user.ts350
-rw-r--r--packages/backend/src/models/schema/antenna.ts89
-rw-r--r--packages/backend/src/models/schema/app.ts33
-rw-r--r--packages/backend/src/models/schema/blocking.ts26
-rw-r--r--packages/backend/src/models/schema/channel.ts51
-rw-r--r--packages/backend/src/models/schema/clip.ts38
-rw-r--r--packages/backend/src/models/schema/drive-file.ts107
-rw-r--r--packages/backend/src/models/schema/drive-folder.ts39
-rw-r--r--packages/backend/src/models/schema/emoji.ts36
-rw-r--r--packages/backend/src/models/schema/federation-instance.ts105
-rw-r--r--packages/backend/src/models/schema/following.ts36
-rw-r--r--packages/backend/src/models/schema/gallery-post.ts69
-rw-r--r--packages/backend/src/models/schema/hashtag.ts34
-rw-r--r--packages/backend/src/models/schema/messaging-message.ts73
-rw-r--r--packages/backend/src/models/schema/muting.ts26
-rw-r--r--packages/backend/src/models/schema/note-favorite.ts26
-rw-r--r--packages/backend/src/models/schema/note-reaction.ts25
-rw-r--r--packages/backend/src/models/schema/note.ts183
-rw-r--r--packages/backend/src/models/schema/notification.ts66
-rw-r--r--packages/backend/src/models/schema/page.ts51
-rw-r--r--packages/backend/src/models/schema/queue.ts25
-rw-r--r--packages/backend/src/models/schema/user-group.ts34
-rw-r--r--packages/backend/src/models/schema/user-list.ts29
-rw-r--r--packages/backend/src/models/schema/user.ts467
-rw-r--r--packages/backend/src/prelude/await-all.ts14
-rw-r--r--packages/backend/src/queue/index.ts10
-rw-r--r--packages/backend/src/queue/processors/db/export-blocking.ts4
-rw-r--r--packages/backend/src/queue/processors/db/export-custom-emojis.ts19
-rw-r--r--packages/backend/src/queue/processors/db/export-following.ts4
-rw-r--r--packages/backend/src/queue/processors/db/export-mute.ts4
-rw-r--r--packages/backend/src/queue/processors/db/export-notes.ts4
-rw-r--r--packages/backend/src/queue/processors/db/export-user-lists.ts4
-rw-r--r--packages/backend/src/queue/processors/db/import-custom-emojis.ts85
-rw-r--r--packages/backend/src/queue/processors/db/import-user-lists.ts4
-rw-r--r--packages/backend/src/queue/processors/db/index.ts2
-rw-r--r--packages/backend/src/remote/activitypub/models/image.ts12
-rw-r--r--packages/backend/src/remote/activitypub/models/note.ts12
-rw-r--r--packages/backend/src/remote/activitypub/renderer/emoji.ts2
-rw-r--r--packages/backend/src/remote/activitypub/renderer/flag.ts15
-rw-r--r--packages/backend/src/remote/activitypub/renderer/index.ts2
-rw-r--r--packages/backend/src/remote/resolve-user.ts2
-rw-r--r--packages/backend/src/server/activitypub.ts4
-rw-r--r--packages/backend/src/server/api/authenticate.ts2
-rw-r--r--packages/backend/src/server/api/call.ts2
-rw-r--r--packages/backend/src/server/api/common/signin.ts4
-rw-r--r--packages/backend/src/server/api/endpoints.ts44
-rw-r--r--packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts58
-rw-r--r--packages/backend/src/server/api/endpoints/admin/accounts/create.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/admin/accounts/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/ad/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/ad/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/ad/list.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/ad/update.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/announcements/create.ts37
-rw-r--r--packages/backend/src/server/api/endpoints/admin/announcements/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/announcements/list.ts41
-rw-r--r--packages/backend/src/server/api/endpoints/admin/announcements/update.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/delete-logs.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/drive/files.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/admin/drive/show-file.ts113
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts39
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/add.ts14
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/copy.ts23
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts37
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/delete.ts (renamed from packages/backend/src/server/api/endpoints/admin/emoji/remove.ts)7
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts21
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts41
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/list.ts41
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts39
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts35
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts35
-rw-r--r--packages/backend/src/server/api/endpoints/admin/emoji/update.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/get-index-stats.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/get-table-stats.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/admin/invite.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/admin/moderators/add.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/moderators/remove.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/promo/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/queue/clear.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts17
-rw-r--r--packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts17
-rw-r--r--packages/backend/src/server/api/endpoints/admin/queue/jobs.ts33
-rw-r--r--packages/backend/src/server/api/endpoints/admin/queue/stats.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/admin/relays/add.ts23
-rw-r--r--packages/backend/src/server/api/endpoints/admin/relays/list.ts27
-rw-r--r--packages/backend/src/server/api/endpoints/admin/relays/remove.ts7
-rw-r--r--packages/backend/src/server/api/endpoints/admin/reset-password.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts25
-rw-r--r--packages/backend/src/server/api/endpoints/admin/resync-chart.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/send-email.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/server-info.ts65
-rw-r--r--packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts39
-rw-r--r--packages/backend/src/server/api/endpoints/admin/show-user.ts137
-rw-r--r--packages/backend/src/server/api/endpoints/admin/show-users.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/admin/silence-user.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/suspend-user.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/unsilence-user.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/update-meta.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/admin/vacuum.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/announcements.ts41
-rw-r--r--packages/backend/src/server/api/endpoints/antennas/create.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/antennas/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/antennas/list.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/antennas/notes.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/antennas/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/antennas/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/ap/get.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/ap/show.ts58
-rw-r--r--packages/backend/src/server/api/endpoints/app/create.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/app/show.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/auth/accept.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/auth/session/generate.ts21
-rw-r--r--packages/backend/src/server/api/endpoints/auth/session/show.ts21
-rw-r--r--packages/backend/src/server/api/endpoints/auth/session/userkey.ts19
-rw-r--r--packages/backend/src/server/api/endpoints/blocking/create.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/blocking/delete.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/blocking/list.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/channels/create.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/channels/featured.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/channels/follow.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/channels/followed.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/channels/owned.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/channels/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/channels/timeline.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/channels/unfollow.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/channels/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/charts/active-users.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/drive.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/federation.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/hashtag.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/instance.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/network.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/notes.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/user/drive.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/user/following.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/user/notes.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/user/reactions.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/charts/users.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/clips/add-note.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/clips/create.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/clips/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/clips/list.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/clips/notes.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/clips/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/clips/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/drive.ts17
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/check-existence.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/create.ts19
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/find.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/drive/folders.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/drive/folders/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/drive/folders/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/drive/folders/find.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/drive/folders/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/drive/folders/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/drive/stream.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/email-address/available.ts17
-rw-r--r--packages/backend/src/server/api/endpoints/endpoint.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/endpoints.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/export-custom-emojis.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/federation/dns.ts43
-rw-r--r--packages/backend/src/server/api/endpoints/federation/followers.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/federation/following.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/federation/instances.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/federation/show-instance.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/federation/update-remote-user.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/federation/users.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/following/create.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/following/delete.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/following/invalidate.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/following/requests/accept.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/following/requests/cancel.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/following/requests/list.ts29
-rw-r--r--packages/backend/src/server/api/endpoints/following/requests/reject.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/featured.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/popular.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/posts.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/posts/create.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/posts/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/posts/like.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/posts/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/gallery/posts/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/games/reversi/games.ts156
-rw-r--r--packages/backend/src/server/api/endpoints/games/reversi/games/show.ts168
-rw-r--r--packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts67
-rw-r--r--packages/backend/src/server/api/endpoints/games/reversi/invitations.ts58
-rw-r--r--packages/backend/src/server/api/endpoints/games/reversi/match.ts108
-rw-r--r--packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts14
-rw-r--r--packages/backend/src/server/api/endpoints/get-online-users-count.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/hashtags/list.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/hashtags/search.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/hashtags/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/hashtags/trend.ts29
-rw-r--r--packages/backend/src/server/api/endpoints/hashtags/users.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/i.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/2fa/done.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/2fa/key-done.ts7
-rw-r--r--packages/backend/src/server/api/endpoints/i/2fa/password-less.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/2fa/register-key.ts7
-rw-r--r--packages/backend/src/server/api/endpoints/i/2fa/register.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/2fa/unregister.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/apps.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/authorized-apps.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/change-password.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/delete-account.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/export-blocking.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/export-following.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/export-mute.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/export-notes.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/export-user-lists.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/favorites.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/gallery/likes.ts17
-rw-r--r--packages/backend/src/server/api/endpoints/i/gallery/posts.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/import-blocking.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/import-following.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/import-muting.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/import-user-lists.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/notifications.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/page-likes.ts17
-rw-r--r--packages/backend/src/server/api/endpoints/i/pages.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/pin.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/read-announcement.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/regenerate-token.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/get-all.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/get-detail.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/get.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/keys.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/remove.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/scopes.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/registry/set.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/revoke-token.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/signin-history.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/unpin.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/update-email.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/i/update.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/i/user-group-invites.ts21
-rw-r--r--packages/backend/src/server/api/endpoints/messaging/history.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/messaging/messages.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/messaging/messages/create.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/messaging/messages/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/messaging/messages/read.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/meta.ts409
-rw-r--r--packages/backend/src/server/api/endpoints/miauth/gen-token.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/mute/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/mute/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/mute/list.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/my/apps.ts49
-rw-r--r--packages/backend/src/server/api/endpoints/notes.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/notes/children.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/clips.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/notes/conversation.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/create.ts19
-rw-r--r--packages/backend/src/server/api/endpoints/notes/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/favorites/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/favorites/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/featured.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/global-timeline.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/local-timeline.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/notes/mentions.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/polls/vote.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/reactions.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/reactions/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/reactions/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/renotes.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/replies.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/search-by-tag.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/notes/search.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/notes/state.ts21
-rw-r--r--packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/timeline.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/translate.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/notes/unrenote.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/notes/watching/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notes/watching/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notifications/create.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/notifications/read.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/page-push.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/pages/create.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/pages/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/pages/featured.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/pages/like.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/pages/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/pages/unlike.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/pages/update.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/ping.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/pinned-users.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/promo/read.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/request-reset-password.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/reset-db.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/reset-password.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/room/show.ts159
-rw-r--r--packages/backend/src/server/api/endpoints/room/update.ts51
-rw-r--r--packages/backend/src/server/api/endpoints/server-info.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/stats.ts37
-rw-r--r--packages/backend/src/server/api/endpoints/sw/register.ts17
-rw-r--r--packages/backend/src/server/api/endpoints/sw/unregister.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/username/available.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/users/clips.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/users/followers.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users/following.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users/gallery/posts.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts25
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/create.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/invite.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/joined.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/leave.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/owned.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/pull.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/transfer.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/users/groups/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/users/lists/create.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/users/lists/delete.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/lists/list.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users/lists/pull.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/lists/push.ts5
-rw-r--r--packages/backend/src/server/api/endpoints/users/lists/show.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/users/lists/update.ts9
-rw-r--r--packages/backend/src/server/api/endpoints/users/notes.ts11
-rw-r--r--packages/backend/src/server/api/endpoints/users/pages.ts3
-rw-r--r--packages/backend/src/server/api/endpoints/users/reactions.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users/recommendation.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/users/relation.ts80
-rw-r--r--packages/backend/src/server/api/endpoints/users/report-abuse.ts8
-rw-r--r--packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts15
-rw-r--r--packages/backend/src/server/api/endpoints/users/search.ts13
-rw-r--r--packages/backend/src/server/api/endpoints/users/show.ts24
-rw-r--r--packages/backend/src/server/api/endpoints/users/stats.ts13
-rw-r--r--packages/backend/src/server/api/limiter.ts8
-rw-r--r--packages/backend/src/server/api/openapi/gen-spec.ts2
-rw-r--r--packages/backend/src/server/api/openapi/schemas.ts8
-rw-r--r--packages/backend/src/server/api/stream/channels/games/reversi-game.ts372
-rw-r--r--packages/backend/src/server/api/stream/channels/games/reversi.ts34
-rw-r--r--packages/backend/src/server/api/stream/channels/index.ts4
-rw-r--r--packages/backend/src/server/api/stream/types.ts56
-rw-r--r--packages/backend/src/server/file/send-drive-file.ts18
-rw-r--r--packages/backend/src/server/index.ts6
-rw-r--r--packages/backend/src/server/nodeinfo.ts32
-rw-r--r--packages/backend/src/server/proxy/proxy-media.ts11
-rw-r--r--packages/backend/src/server/web/index.ts3
-rw-r--r--packages/backend/src/services/chart/core.ts14
-rw-r--r--packages/backend/src/services/create-notification.ts5
-rw-r--r--packages/backend/src/services/drive/add-file.ts80
-rw-r--r--packages/backend/src/services/drive/upload-from-url.ts31
-rw-r--r--packages/backend/src/services/following/create.ts5
-rw-r--r--packages/backend/src/services/following/requests/create.ts4
-rw-r--r--packages/backend/src/services/note/reaction/create.ts14
-rw-r--r--packages/backend/src/services/register-or-fetch-instance-doc.ts4
-rw-r--r--packages/backend/src/services/relay.ts4
-rw-r--r--packages/backend/src/services/stream.ts13
-rw-r--r--packages/backend/src/tools/add-emoji.ts33
-rw-r--r--packages/backend/test/docker-compose.yml4
-rw-r--r--packages/backend/yarn.lock2110
430 files changed, 5367 insertions, 7985 deletions
diff --git a/packages/backend/migration/1637320813000-forwarded-report.js b/packages/backend/migration/1637320813000-forwarded-report.js
new file mode 100644
index 0000000000..4056f7b5f4
--- /dev/null
+++ b/packages/backend/migration/1637320813000-forwarded-report.js
@@ -0,0 +1,13 @@
+const { QueryRunner } = require('typeorm');
+
+module.exports = class forwardedReport1637320813000 {
+ name = 'forwardedReport1637320813000';
+
+ async up(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "forwarded" boolean NOT NULL DEFAULT false`);
+ }
+
+ async down(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "forwarded"`);
+ }
+};
diff --git a/packages/backend/migration/1642611822809-emoji-url.js b/packages/backend/migration/1642611822809-emoji-url.js
new file mode 100644
index 0000000000..f229c403f4
--- /dev/null
+++ b/packages/backend/migration/1642611822809-emoji-url.js
@@ -0,0 +1,15 @@
+const { MigrationInterface, QueryRunner } = require("typeorm");
+
+module.exports = class emojiUrl1642611822809 {
+ name = 'emojiUrl1642611822809'
+
+ async up(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "emoji" RENAME COLUMN "url" TO "originalUrl"`);
+ await queryRunner.query(`ALTER TABLE "emoji" ADD "publicUrl" character varying(512) NOT NULL DEFAULT ''`);
+ }
+
+ async down(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "publicUrl"`);
+ await queryRunner.query(`ALTER TABLE "emoji" RENAME COLUMN "originalUrl" TO "url"`);
+ }
+}
diff --git a/packages/backend/migration/1642613870898-drive-file-webpublic-type.js b/packages/backend/migration/1642613870898-drive-file-webpublic-type.js
new file mode 100644
index 0000000000..e10c2ac2d2
--- /dev/null
+++ b/packages/backend/migration/1642613870898-drive-file-webpublic-type.js
@@ -0,0 +1,13 @@
+const { MigrationInterface, QueryRunner } = require("typeorm");
+
+module.exports = class driveFileWebpublicType1642613870898 {
+ name = 'driveFileWebpublicType1642613870898'
+
+ async up(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "drive_file" ADD "webpublicType" character varying(128)`);
+ }
+
+ async down(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "webpublicType"`);
+ }
+}
diff --git a/packages/backend/package.json b/packages/backend/package.json
index ffd179dfa3..3d3a901f34 100644
--- a/packages/backend/package.json
+++ b/packages/backend/package.json
@@ -22,87 +22,78 @@
"@sinonjs/fake-timers": "7.1.2",
"@syuilo/aiscript": "0.11.1",
"@types/bcryptjs": "2.4.2",
- "@types/bull": "3.15.5",
+ "@types/bull": "3.15.7",
"@types/cbor": "6.0.0",
"@types/dateformat": "3.0.1",
- "@types/escape-regexp": "0.0.0",
+ "@types/escape-regexp": "0.0.1",
"@types/glob": "7.2.0",
"@types/is-url": "1.2.30",
- "@types/js-yaml": "4.0.4",
- "@types/jsdom": "16.2.13",
+ "@types/js-yaml": "4.0.5",
+ "@types/jsdom": "16.2.14",
"@types/jsonld": "1.5.6",
"@types/koa": "2.13.4",
- "@types/koa-bodyparser": "4.3.3",
+ "@types/koa-bodyparser": "4.3.5",
"@types/koa-cors": "0.0.2",
"@types/koa-favicon": "2.0.21",
"@types/koa-logger": "3.1.2",
"@types/koa-mount": "4.0.1",
"@types/koa-send": "4.1.3",
"@types/koa-views": "7.0.0",
- "@types/koa__cors": "3.0.3",
+ "@types/koa__cors": "3.1.1",
"@types/koa__multer": "2.0.4",
- "@types/koa__router": "8.0.8",
+ "@types/koa__router": "8.0.11",
"@types/mocha": "8.2.3",
- "@types/node": "16.11.7",
- "@types/node-fetch": "2.5.12",
+ "@types/node": "17.0.10",
+ "@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.4",
"@types/oauth": "0.9.1",
"@types/parse5": "6.0.3",
"@types/portscanner": "2.1.1",
- "@types/pug": "2.0.5",
+ "@types/pug": "2.0.6",
"@types/punycode": "2.1.0",
- "@types/qrcode": "1.4.1",
+ "@types/qrcode": "1.4.2",
"@types/random-seed": "0.3.3",
- "@types/ratelimiter": "3.4.2",
- "@types/redis": "2.8.32",
+ "@types/ratelimiter": "3.4.3",
+ "@types/redis": "4.0.11",
"@types/rename": "1.0.4",
"@types/request-stats": "3.0.0",
- "@types/sanitize-html": "2.5.0",
+ "@types/sanitize-html": "2.6.2",
"@types/seedrandom": "2.4.28",
- "@types/sharp": "0.29.3",
+ "@types/sharp": "0.29.5",
"@types/sinonjs__fake-timers": "6.0.4",
- "@types/speakeasy": "2.0.6",
+ "@types/speakeasy": "2.0.7",
"@types/throttle-debounce": "2.1.0",
"@types/tinycolor2": "1.4.3",
- "@types/tmp": "0.2.2",
- "@types/uuid": "8.3.1",
+ "@types/tmp": "0.2.3",
+ "@types/uuid": "8.3.4",
"@types/web-push": "3.3.2",
"@types/webpack": "5.28.0",
"@types/webpack-stream": "3.2.12",
"@types/websocket": "1.0.4",
- "@types/ws": "8.2.0",
- "@typescript-eslint/eslint-plugin": "5.3.1",
- "@typescript-eslint/parser": "5.1.0",
+ "@types/ws": "8.2.2",
+ "@typescript-eslint/eslint-plugin": "5.10.0",
+ "@typescript-eslint/parser": "5.10.0",
"abort-controller": "3.0.0",
"archiver": "5.3.0",
"autobind-decorator": "2.4.0",
- "autosize": "4.0.4",
"autwh": "0.1.0",
- "aws-sdk": "2.1013.0",
+ "aws-sdk": "2.1061.0",
"bcryptjs": "2.4.3",
"blurhash": "1.1.4",
- "broadcast-channel": "4.5.0",
- "bull": "4.1.0",
+ "broadcast-channel": "4.9.0",
+ "bull": "4.2.1",
"cacheable-lookup": "6.0.4",
"cafy": "15.2.1",
"cbor": "8.1.0",
"chalk": "4.1.2",
- "chart.js": "3.6.0",
- "chartjs-adapter-date-fns": "2.0.0",
- "chartjs-plugin-zoom": "1.1.1",
"cli-highlight": "2.1.11",
- "compare-versions": "3.6.0",
- "content-disposition": "0.5.3",
+ "content-disposition": "0.5.4",
"crc-32": "1.2.0",
- "css-loader": "6.5.1",
- "cssnano": "5.0.10",
- "date-fns": "2.25.0",
"dateformat": "4.5.1",
- "deep-email-validator": "0.1.18",
+ "deep-email-validator": "0.1.21",
"escape-regexp": "0.0.1",
- "eslint": "8.2.0",
- "eslint-plugin-import": "2.25.3",
- "eslint-plugin-vue": "8.0.3",
+ "eslint": "8.7.0",
+ "eslint-plugin-import": "2.25.4",
"eventemitter3": "4.0.7",
"feed": "4.2.2",
"file-type": "16.5.3",
@@ -110,11 +101,9 @@
"glob": "7.2.0",
"got": "11.8.2",
"hpagent": "0.1.2",
- "http-signature": "1.3.5",
- "idb-keyval": "5.1.3",
- "insert-text-at-cursor": "0.3.0",
+ "http-signature": "1.3.6",
"ip-cidr": "3.0.4",
- "is-svg": "4.3.1",
+ "is-svg": "4.3.2",
"js-yaml": "4.1.0",
"jsdom": "16.7.0",
"json5": "2.2.0",
@@ -131,30 +120,29 @@
"koa-slow": "2.1.0",
"koa-views": "7.0.2",
"langmap": "0.0.16",
- "mfm-js": "0.20.0",
+ "mfm-js": "0.21.0",
"mime-types": "2.1.34",
- "misskey-js": "0.0.8",
+ "misskey-js": "0.0.13",
"mocha": "8.4.0",
"ms": "3.0.0-canary.1",
- "multer": "1.4.3",
+ "multer": "1.4.4",
"nested-property": "4.0.0",
"node-fetch": "2.6.1",
- "nodemailer": "6.7.0",
+ "nodemailer": "6.7.2",
"os-utils": "0.0.14",
"parse5": "6.0.1",
"pg": "8.7.1",
"portscanner": "2.2.0",
- "prismjs": "1.25.0",
"private-ip": "2.3.3",
- "probe-image-size": "7.2.1",
+ "probe-image-size": "7.2.2",
"promise-limit": "2.7.0",
"pug": "3.0.2",
"punycode": "2.1.1",
- "pureimage": "0.3.5",
- "qrcode": "1.4.4",
+ "pureimage": "0.3.8",
+ "qrcode": "1.5.0",
"random-seed": "0.3.0",
"ratelimiter": "3.4.1",
- "re2": "1.16.0",
+ "re2": "1.17.3",
"redis": "3.1.2",
"redis-lock": "0.1.4",
"reflect-metadata": "0.1.13",
@@ -163,9 +151,9 @@
"require-all": "3.0.0",
"rndstr": "1.0.0",
"s-age": "1.1.2",
- "sanitize-html": "2.5.3",
+ "sanitize-html": "2.6.1",
"seedrandom": "3.0.5",
- "sharp": "0.29.2",
+ "sharp": "0.29.3",
"speakeasy": "2.0.0",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
@@ -179,20 +167,21 @@
"ts-loader": "9.2.6",
"ts-node": "10.4.0",
"tsc-alias": "1.4.1",
- "tsconfig-paths": "3.11.0",
+ "tsconfig-paths": "3.12.0",
"twemoji-parser": "13.1.0",
- "typeorm": "0.2.39",
- "typescript": "4.4.4",
+ "typeorm": "0.2.41",
+ "typescript": "4.5.5",
"ulid": "2.3.0",
+ "unzipper": "0.10.11",
"uuid": "8.3.2",
"web-push": "3.4.5",
"websocket": "1.0.34",
- "ws": "8.2.3",
+ "ws": "8.4.2",
"xev": "2.0.1"
},
"devDependencies": {
- "@redocly/openapi-core": "1.0.0-beta.54",
- "@types/fluent-ffmpeg": "2.1.17",
+ "@redocly/openapi-core": "1.0.0-beta.79",
+ "@types/fluent-ffmpeg": "2.1.20",
"cross-env": "7.0.3",
"execa": "6.0.0"
}
diff --git a/packages/backend/src/const.ts b/packages/backend/src/const.ts
index 43f59f1e4f..b00bd81655 100644
--- a/packages/backend/src/const.ts
+++ b/packages/backend/src/const.ts
@@ -1,2 +1,47 @@
export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min
export const USER_ACTIVE_THRESHOLD = 1000 * 60 * 60 * 24 * 3; // 3days
+
+// ブラウザで直接表示することを許可するファイルの種類のリスト
+// ここに含まれないものは application/octet-stream としてレスポンスされる
+// SVGはXSSを生むので許可しない
+export const FILE_TYPE_BROWSERSAFE = [
+ // Images
+ 'image/png',
+ 'image/gif',
+ 'image/jpeg',
+ 'image/webp',
+ 'image/apng',
+ 'image/bmp',
+ 'image/tiff',
+ 'image/x-icon',
+
+ // OggS
+ 'audio/opus',
+ 'video/ogg',
+ 'audio/ogg',
+ 'application/ogg',
+
+ // ISO/IEC base media file format
+ 'video/quicktime',
+ 'video/mp4',
+ 'audio/mp4',
+ 'video/x-m4v',
+ 'audio/x-m4a',
+ 'video/3gpp',
+ 'video/3gpp2',
+
+ 'video/mpeg',
+ 'audio/mpeg',
+
+ 'video/webm',
+ 'audio/webm',
+
+ 'audio/aac',
+ 'audio/x-flac',
+ 'audio/vnd.wave',
+];
+/*
+https://github.com/sindresorhus/file-type/blob/main/supported.js
+https://github.com/sindresorhus/file-type/blob/main/core.js
+https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
+*/
diff --git a/packages/backend/src/db/postgre.ts b/packages/backend/src/db/postgre.ts
index b5f228d919..69336c2a46 100644
--- a/packages/backend/src/db/postgre.ts
+++ b/packages/backend/src/db/postgre.ts
@@ -40,8 +40,6 @@ import { Signin } from '@/models/entities/signin';
import { AuthSession } from '@/models/entities/auth-session';
import { FollowRequest } from '@/models/entities/follow-request';
import { Emoji } from '@/models/entities/emoji';
-import { ReversiGame } from '@/models/entities/games/reversi/game';
-import { ReversiMatching } from '@/models/entities/games/reversi/matching';
import { UserNotePining } from '@/models/entities/user-note-pining';
import { Poll } from '@/models/entities/poll';
import { UserKeypair } from '@/models/entities/user-keypair';
@@ -166,8 +164,6 @@ export const entities = [
AntennaNote,
PromoNote,
PromoRead,
- ReversiGame,
- ReversiMatching,
Relay,
MutedNote,
Channel,
@@ -224,7 +220,9 @@ export async function resetDb() {
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
AND C.relkind = 'r'
AND nspname !~ '^pg_toast';`);
- await Promise.all(tables.map(t => t.table).map(x => conn.query(`DELETE FROM "${x}" CASCADE`)));
+ for (const table of tables) {
+ await conn.query(`DELETE FROM "${table.table}" CASCADE`);
+ }
};
for (let i = 1; i <= 3; i++) {
diff --git a/packages/backend/src/games/reversi/core.ts b/packages/backend/src/games/reversi/core.ts
deleted file mode 100644
index 0cf7714543..0000000000
--- a/packages/backend/src/games/reversi/core.ts
+++ /dev/null
@@ -1,263 +0,0 @@
-import { count, concat } from '@/prelude/array';
-
-// MISSKEY REVERSI ENGINE
-
-/**
- * true ... 黒
- * false ... 白
- */
-export type Color = boolean;
-const BLACK = true;
-const WHITE = false;
-
-export type MapPixel = 'null' | 'empty';
-
-export type Options = {
- isLlotheo: boolean;
- canPutEverywhere: boolean;
- loopedBoard: boolean;
-};
-
-export type Undo = {
- /**
- * 色
- */
- color: Color;
-
- /**
- * どこに打ったか
- */
- pos: number;
-
- /**
- * 反転した石の位置の配列
- */
- effects: number[];
-
- /**
- * ターン
- */
- turn: Color | null;
-};
-
-/**
- * リバーシエンジン
- */
-export default class Reversi {
- public map: MapPixel[];
- public mapWidth: number;
- public mapHeight: number;
- public board: (Color | null | undefined)[];
- public turn: Color | null = BLACK;
- public opts: Options;
-
- public prevPos = -1;
- public prevColor: Color | null = null;
-
- private logs: Undo[] = [];
-
- /**
- * ゲームを初期化します
- */
- constructor(map: string[], opts: Options) {
- //#region binds
- this.put = this.put.bind(this);
- //#endregion
-
- //#region Options
- this.opts = opts;
- if (this.opts.isLlotheo == null) this.opts.isLlotheo = false;
- if (this.opts.canPutEverywhere == null) this.opts.canPutEverywhere = false;
- if (this.opts.loopedBoard == null) this.opts.loopedBoard = false;
- //#endregion
-
- //#region Parse map data
- this.mapWidth = map[0].length;
- this.mapHeight = map.length;
- const mapData = map.join('');
-
- this.board = mapData.split('').map(d => d === '-' ? null : d === 'b' ? BLACK : d === 'w' ? WHITE : undefined);
-
- this.map = mapData.split('').map(d => d === '-' || d === 'b' || d === 'w' ? 'empty' : 'null');
- //#endregion
-
- // ゲームが始まった時点で片方の色の石しかないか、始まった時点で勝敗が決定するようなマップの場合がある
- if (!this.canPutSomewhere(BLACK)) this.turn = this.canPutSomewhere(WHITE) ? WHITE : null;
- }
-
- /**
- * 黒石の数
- */
- public get blackCount() {
- return count(BLACK, this.board);
- }
-
- /**
- * 白石の数
- */
- public get whiteCount() {
- return count(WHITE, this.board);
- }
-
- public transformPosToXy(pos: number): number[] {
- const x = pos % this.mapWidth;
- const y = Math.floor(pos / this.mapWidth);
- return [x, y];
- }
-
- public transformXyToPos(x: number, y: number): number {
- return x + (y * this.mapWidth);
- }
-
- /**
- * 指定のマスに石を打ちます
- * @param color 石の色
- * @param pos 位置
- */
- public put(color: Color, pos: number) {
- this.prevPos = pos;
- this.prevColor = color;
-
- this.board[pos] = color;
-
- // 反転させられる石を取得
- const effects = this.effects(color, pos);
-
- // 反転させる
- for (const pos of effects) {
- this.board[pos] = color;
- }
-
- const turn = this.turn;
-
- this.logs.push({
- color,
- pos,
- effects,
- turn,
- });
-
- this.calcTurn();
- }
-
- private calcTurn() {
- // ターン計算
- this.turn =
- this.canPutSomewhere(!this.prevColor) ? !this.prevColor :
- this.canPutSomewhere(this.prevColor!) ? this.prevColor :
- null;
- }
-
- public undo() {
- const undo = this.logs.pop()!;
- this.prevColor = undo.color;
- this.prevPos = undo.pos;
- this.board[undo.pos] = null;
- for (const pos of undo.effects) {
- const color = this.board[pos];
- this.board[pos] = !color;
- }
- this.turn = undo.turn;
- }
-
- /**
- * 指定した位置のマップデータのマスを取得します
- * @param pos 位置
- */
- public mapDataGet(pos: number): MapPixel {
- const [x, y] = this.transformPosToXy(pos);
- return x < 0 || y < 0 || x >= this.mapWidth || y >= this.mapHeight ? 'null' : this.map[pos];
- }
-
- /**
- * 打つことができる場所を取得します
- */
- public puttablePlaces(color: Color): number[] {
- return Array.from(this.board.keys()).filter(i => this.canPut(color, i));
- }
-
- /**
- * 打つことができる場所があるかどうかを取得します
- */
- public canPutSomewhere(color: Color): boolean {
- return this.puttablePlaces(color).length > 0;
- }
-
- /**
- * 指定のマスに石を打つことができるかどうかを取得します
- * @param color 自分の色
- * @param pos 位置
- */
- public canPut(color: Color, pos: number): boolean {
- return (
- this.board[pos] !== null ? false : // 既に石が置いてある場所には打てない
- this.opts.canPutEverywhere ? this.mapDataGet(pos) == 'empty' : // 挟んでなくても置けるモード
- this.effects(color, pos).length !== 0); // 相手の石を1つでも反転させられるか
- }
-
- /**
- * 指定のマスに石を置いた時の、反転させられる石を取得します
- * @param color 自分の色
- * @param initPos 位置
- */
- public effects(color: Color, initPos: number): number[] {
- const enemyColor = !color;
-
- const diffVectors: [number, number][] = [
- [ 0, -1], // 上
- [ +1, -1], // 右上
- [ +1, 0], // 右
- [ +1, +1], // 右下
- [ 0, +1], // 下
- [ -1, +1], // 左下
- [ -1, 0], // 左
- [ -1, -1], // 左上
- ];
-
- const effectsInLine = ([dx, dy]: [number, number]): number[] => {
- const nextPos = (x: number, y: number): [number, number] => [x + dx, y + dy];
-
- const found: number[] = []; // 挟めるかもしれない相手の石を入れておく配列
- let [x, y] = this.transformPosToXy(initPos);
- while (true) {
- [x, y] = nextPos(x, y);
-
- // 座標が指し示す位置がボード外に出たとき
- if (this.opts.loopedBoard && this.transformXyToPos(
- (x = ((x % this.mapWidth) + this.mapWidth) % this.mapWidth),
- (y = ((y % this.mapHeight) + this.mapHeight) % this.mapHeight)) === initPos) {
- // 盤面の境界でループし、自分が石を置く位置に戻ってきたとき、挟めるようにしている (ref: Test4のマップ)
- return found;
- } else if (x === -1 || y === -1 || x === this.mapWidth || y === this.mapHeight) {
- return []; // 挟めないことが確定 (盤面外に到達)
- }
-
- const pos = this.transformXyToPos(x, y);
- if (this.mapDataGet(pos) === 'null') return []; // 挟めないことが確定 (配置不可能なマスに到達)
- const stone = this.board[pos];
- if (stone === null) return []; // 挟めないことが確定 (石が置かれていないマスに到達)
- if (stone === enemyColor) found.push(pos); // 挟めるかもしれない (相手の石を発見)
- if (stone === color) return found; // 挟めることが確定 (対となる自分の石を発見)
- }
- };
-
- return concat(diffVectors.map(effectsInLine));
- }
-
- /**
- * ゲームが終了したか否か
- */
- public get isEnded(): boolean {
- return this.turn === null;
- }
-
- /**
- * ゲームの勝者 (null = 引き分け)
- */
- public get winner(): Color | null {
- return this.isEnded ?
- this.blackCount == this.whiteCount ? null :
- this.opts.isLlotheo === this.blackCount > this.whiteCount ? WHITE : BLACK :
- undefined as never;
- }
-}
diff --git a/packages/backend/src/games/reversi/maps.ts b/packages/backend/src/games/reversi/maps.ts
deleted file mode 100644
index 8442c6d741..0000000000
--- a/packages/backend/src/games/reversi/maps.ts
+++ /dev/null
@@ -1,896 +0,0 @@
-/**
- * 組み込みマップ定義
- *
- * データ値:
- * (スペース) ... マス無し
- * - ... マス
- * b ... 初期配置される黒石
- * w ... 初期配置される白石
- */
-
-export type Map = {
- name?: string;
- category?: string;
- author?: string;
- data: string[];
-};
-
-export const fourfour: Map = {
- name: '4x4',
- category: '4x4',
- data: [
- '----',
- '-wb-',
- '-bw-',
- '----',
- ],
-};
-
-export const sixsix: Map = {
- name: '6x6',
- category: '6x6',
- data: [
- '------',
- '------',
- '--wb--',
- '--bw--',
- '------',
- '------',
- ],
-};
-
-export const roundedSixsix: Map = {
- name: '6x6 rounded',
- category: '6x6',
- author: 'syuilo',
- data: [
- ' ---- ',
- '------',
- '--wb--',
- '--bw--',
- '------',
- ' ---- ',
- ],
-};
-
-export const roundedSixsix2: Map = {
- name: '6x6 rounded 2',
- category: '6x6',
- author: 'syuilo',
- data: [
- ' -- ',
- ' ---- ',
- '--wb--',
- '--bw--',
- ' ---- ',
- ' -- ',
- ],
-};
-
-export const eighteight: Map = {
- name: '8x8',
- category: '8x8',
- data: [
- '--------',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- '--------',
- ],
-};
-
-export const eighteightH1: Map = {
- name: '8x8 handicap 1',
- category: '8x8',
- data: [
- 'b-------',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- '--------',
- ],
-};
-
-export const eighteightH2: Map = {
- name: '8x8 handicap 2',
- category: '8x8',
- data: [
- 'b-------',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- '-------b',
- ],
-};
-
-export const eighteightH3: Map = {
- name: '8x8 handicap 3',
- category: '8x8',
- data: [
- 'b------b',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- '-------b',
- ],
-};
-
-export const eighteightH4: Map = {
- name: '8x8 handicap 4',
- category: '8x8',
- data: [
- 'b------b',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- 'b------b',
- ],
-};
-
-export const eighteightH28: Map = {
- name: '8x8 handicap 28',
- category: '8x8',
- data: [
- 'bbbbbbbb',
- 'b------b',
- 'b------b',
- 'b--wb--b',
- 'b--bw--b',
- 'b------b',
- 'b------b',
- 'bbbbbbbb',
- ],
-};
-
-export const roundedEighteight: Map = {
- name: '8x8 rounded',
- category: '8x8',
- author: 'syuilo',
- data: [
- ' ------ ',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- ' ------ ',
- ],
-};
-
-export const roundedEighteight2: Map = {
- name: '8x8 rounded 2',
- category: '8x8',
- author: 'syuilo',
- data: [
- ' ---- ',
- ' ------ ',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- ' ------ ',
- ' ---- ',
- ],
-};
-
-export const roundedEighteight3: Map = {
- name: '8x8 rounded 3',
- category: '8x8',
- author: 'syuilo',
- data: [
- ' -- ',
- ' ---- ',
- ' ------ ',
- '---wb---',
- '---bw---',
- ' ------ ',
- ' ---- ',
- ' -- ',
- ],
-};
-
-export const eighteightWithNotch: Map = {
- name: '8x8 with notch',
- category: '8x8',
- author: 'syuilo',
- data: [
- '--- ---',
- '--------',
- '--------',
- ' --wb-- ',
- ' --bw-- ',
- '--------',
- '--------',
- '--- ---',
- ],
-};
-
-export const eighteightWithSomeHoles: Map = {
- name: '8x8 with some holes',
- category: '8x8',
- author: 'syuilo',
- data: [
- '--- ----',
- '----- --',
- '-- -----',
- '---wb---',
- '---bw- -',
- ' -------',
- '--- ----',
- '--------',
- ],
-};
-
-export const circle: Map = {
- name: 'Circle',
- category: '8x8',
- author: 'syuilo',
- data: [
- ' -- ',
- ' ------ ',
- ' ------ ',
- '---wb---',
- '---bw---',
- ' ------ ',
- ' ------ ',
- ' -- ',
- ],
-};
-
-export const smile: Map = {
- name: 'Smile',
- category: '8x8',
- author: 'syuilo',
- data: [
- ' ------ ',
- '--------',
- '-- -- --',
- '---wb---',
- '-- bw --',
- '--- ---',
- '--------',
- ' ------ ',
- ],
-};
-
-export const window: Map = {
- name: 'Window',
- category: '8x8',
- author: 'syuilo',
- data: [
- '--------',
- '- -- -',
- '- -- -',
- '---wb---',
- '---bw---',
- '- -- -',
- '- -- -',
- '--------',
- ],
-};
-
-export const reserved: Map = {
- name: 'Reserved',
- category: '8x8',
- author: 'Aya',
- data: [
- 'w------b',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- 'b------w',
- ],
-};
-
-export const x: Map = {
- name: 'X',
- category: '8x8',
- author: 'Aya',
- data: [
- 'w------b',
- '-w----b-',
- '--w--b--',
- '---wb---',
- '---bw---',
- '--b--w--',
- '-b----w-',
- 'b------w',
- ],
-};
-
-export const parallel: Map = {
- name: 'Parallel',
- category: '8x8',
- author: 'Aya',
- data: [
- '--------',
- '--------',
- '--------',
- '---bb---',
- '---ww---',
- '--------',
- '--------',
- '--------',
- ],
-};
-
-export const lackOfBlack: Map = {
- name: 'Lack of Black',
- category: '8x8',
- data: [
- '--------',
- '--------',
- '--------',
- '---w----',
- '---bw---',
- '--------',
- '--------',
- '--------',
- ],
-};
-
-export const squareParty: Map = {
- name: 'Square Party',
- category: '8x8',
- author: 'syuilo',
- data: [
- '--------',
- '-wwwbbb-',
- '-w-wb-b-',
- '-wwwbbb-',
- '-bbbwww-',
- '-b-bw-w-',
- '-bbbwww-',
- '--------',
- ],
-};
-
-export const minesweeper: Map = {
- name: 'Minesweeper',
- category: '8x8',
- author: 'syuilo',
- data: [
- 'b-b--w-w',
- '-w-wb-b-',
- 'w-b--w-b',
- '-b-wb-w-',
- '-w-bw-b-',
- 'b-w--b-w',
- '-b-bw-w-',
- 'w-w--b-b',
- ],
-};
-
-export const tenthtenth: Map = {
- name: '10x10',
- category: '10x10',
- data: [
- '----------',
- '----------',
- '----------',
- '----------',
- '----wb----',
- '----bw----',
- '----------',
- '----------',
- '----------',
- '----------',
- ],
-};
-
-export const hole: Map = {
- name: 'The Hole',
- category: '10x10',
- author: 'syuilo',
- data: [
- '----------',
- '----------',
- '--wb--wb--',
- '--bw--bw--',
- '---- ----',
- '---- ----',
- '--wb--wb--',
- '--bw--bw--',
- '----------',
- '----------',
- ],
-};
-
-export const grid: Map = {
- name: 'Grid',
- category: '10x10',
- author: 'syuilo',
- data: [
- '----------',
- '- - -- - -',
- '----------',
- '- - -- - -',
- '----wb----',
- '----bw----',
- '- - -- - -',
- '----------',
- '- - -- - -',
- '----------',
- ],
-};
-
-export const cross: Map = {
- name: 'Cross',
- category: '10x10',
- author: 'Aya',
- data: [
- ' ---- ',
- ' ---- ',
- ' ---- ',
- '----------',
- '----wb----',
- '----bw----',
- '----------',
- ' ---- ',
- ' ---- ',
- ' ---- ',
- ],
-};
-
-export const charX: Map = {
- name: 'Char X',
- category: '10x10',
- author: 'syuilo',
- data: [
- '--- ---',
- '---- ----',
- '----------',
- ' -------- ',
- ' --wb-- ',
- ' --bw-- ',
- ' -------- ',
- '----------',
- '---- ----',
- '--- ---',
- ],
-};
-
-export const charY: Map = {
- name: 'Char Y',
- category: '10x10',
- author: 'syuilo',
- data: [
- '--- ---',
- '---- ----',
- '----------',
- ' -------- ',
- ' --wb-- ',
- ' --bw-- ',
- ' ------ ',
- ' ------ ',
- ' ------ ',
- ' ------ ',
- ],
-};
-
-export const walls: Map = {
- name: 'Walls',
- category: '10x10',
- author: 'Aya',
- data: [
- ' bbbbbbbb ',
- 'w--------w',
- 'w--------w',
- 'w--------w',
- 'w---wb---w',
- 'w---bw---w',
- 'w--------w',
- 'w--------w',
- 'w--------w',
- ' bbbbbbbb ',
- ],
-};
-
-export const cpu: Map = {
- name: 'CPU',
- category: '10x10',
- author: 'syuilo',
- data: [
- ' b b b b ',
- 'w--------w',
- ' -------- ',
- 'w--------w',
- ' ---wb--- ',
- ' ---bw--- ',
- 'w--------w',
- ' -------- ',
- 'w--------w',
- ' b b b b ',
- ],
-};
-
-export const checker: Map = {
- name: 'Checker',
- category: '10x10',
- author: 'Aya',
- data: [
- '----------',
- '----------',
- '----------',
- '---wbwb---',
- '---bwbw---',
- '---wbwb---',
- '---bwbw---',
- '----------',
- '----------',
- '----------',
- ],
-};
-
-export const japaneseCurry: Map = {
- name: 'Japanese curry',
- category: '10x10',
- author: 'syuilo',
- data: [
- 'w-b-b-b-b-',
- '-w-b-b-b-b',
- 'w-w-b-b-b-',
- '-w-w-b-b-b',
- 'w-w-wwb-b-',
- '-w-wbb-b-b',
- 'w-w-w-b-b-',
- '-w-w-w-b-b',
- 'w-w-w-w-b-',
- '-w-w-w-w-b',
- ],
-};
-
-export const mosaic: Map = {
- name: 'Mosaic',
- category: '10x10',
- author: 'syuilo',
- data: [
- '- - - - - ',
- ' - - - - -',
- '- - - - - ',
- ' - w w - -',
- '- - b b - ',
- ' - w w - -',
- '- - b b - ',
- ' - - - - -',
- '- - - - - ',
- ' - - - - -',
- ],
-};
-
-export const arena: Map = {
- name: 'Arena',
- category: '10x10',
- author: 'syuilo',
- data: [
- '- - -- - -',
- ' - - - - ',
- '- ------ -',
- ' -------- ',
- '- --wb-- -',
- '- --bw-- -',
- ' -------- ',
- '- ------ -',
- ' - - - - ',
- '- - -- - -',
- ],
-};
-
-export const reactor: Map = {
- name: 'Reactor',
- category: '10x10',
- author: 'syuilo',
- data: [
- '-w------b-',
- 'b- - - -w',
- '- --wb-- -',
- '---b w---',
- '- b wb w -',
- '- w bw b -',
- '---w b---',
- '- --bw-- -',
- 'w- - - -b',
- '-b------w-',
- ],
-};
-
-export const sixeight: Map = {
- name: '6x8',
- category: 'Special',
- data: [
- '------',
- '------',
- '------',
- '--wb--',
- '--bw--',
- '------',
- '------',
- '------',
- ],
-};
-
-export const spark: Map = {
- name: 'Spark',
- category: 'Special',
- author: 'syuilo',
- data: [
- ' - - ',
- '----------',
- ' -------- ',
- ' -------- ',
- ' ---wb--- ',
- ' ---bw--- ',
- ' -------- ',
- ' -------- ',
- '----------',
- ' - - ',
- ],
-};
-
-export const islands: Map = {
- name: 'Islands',
- category: 'Special',
- author: 'syuilo',
- data: [
- '-------- ',
- '---wb--- ',
- '---bw--- ',
- '-------- ',
- ' - - ',
- ' - - ',
- ' --------',
- ' --------',
- ' --------',
- ' --------',
- ],
-};
-
-export const galaxy: Map = {
- name: 'Galaxy',
- category: 'Special',
- author: 'syuilo',
- data: [
- ' ------ ',
- ' --www--- ',
- ' ------w--- ',
- '---bbb--w---',
- '--b---b-w-b-',
- '-b--wwb-w-b-',
- '-b-w-bww--b-',
- '-b-w-b---b--',
- '---w--bbb---',
- ' ---w------ ',
- ' ---www-- ',
- ' ------ ',
- ],
-};
-
-export const triangle: Map = {
- name: 'Triangle',
- category: 'Special',
- author: 'syuilo',
- data: [
- ' -- ',
- ' -- ',
- ' ---- ',
- ' ---- ',
- ' --wb-- ',
- ' --bw-- ',
- ' -------- ',
- ' -------- ',
- '----------',
- '----------',
- ],
-};
-
-export const iphonex: Map = {
- name: 'iPhone X',
- category: 'Special',
- author: 'syuilo',
- data: [
- ' -- -- ',
- '--------',
- '--------',
- '--------',
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- '--------',
- '--------',
- '--------',
- ' ------ ',
- ],
-};
-
-export const dealWithIt: Map = {
- name: 'Deal with it!',
- category: 'Special',
- author: 'syuilo',
- data: [
- '------------',
- '--w-b-------',
- ' --b-w------',
- ' --w-b---- ',
- ' ------- ',
- ],
-};
-
-export const experiment: Map = {
- name: 'Let\'s experiment',
- category: 'Special',
- author: 'syuilo',
- data: [
- ' ------------ ',
- '------wb------',
- '------bw------',
- '--------------',
- ' - - ',
- '------ ------',
- 'bbbbbb wwwwww',
- 'bbbbbb wwwwww',
- 'bbbbbb wwwwww',
- 'bbbbbb wwwwww',
- 'wwwwww bbbbbb',
- ],
-};
-
-export const bigBoard: Map = {
- name: 'Big board',
- category: 'Special',
- data: [
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- '-------wb-------',
- '-------bw-------',
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- '----------------',
- ],
-};
-
-export const twoBoard: Map = {
- name: 'Two board',
- category: 'Special',
- author: 'Aya',
- data: [
- '-------- --------',
- '-------- --------',
- '-------- --------',
- '---wb--- ---wb---',
- '---bw--- ---bw---',
- '-------- --------',
- '-------- --------',
- '-------- --------',
- ],
-};
-
-export const test1: Map = {
- name: 'Test1',
- category: 'Test',
- data: [
- '--------',
- '---wb---',
- '---bw---',
- '--------',
- ],
-};
-
-export const test2: Map = {
- name: 'Test2',
- category: 'Test',
- data: [
- '------',
- '------',
- '-b--w-',
- '-w--b-',
- '-w--b-',
- ],
-};
-
-export const test3: Map = {
- name: 'Test3',
- category: 'Test',
- data: [
- '-w-',
- '--w',
- 'w--',
- '-w-',
- '--w',
- 'w--',
- '-w-',
- '--w',
- 'w--',
- '-w-',
- '---',
- 'b--',
- ],
-};
-
-export const test4: Map = {
- name: 'Test4',
- category: 'Test',
- data: [
- '-w--b-',
- '-w--b-',
- '------',
- '-w--b-',
- '-w--b-',
- ],
-};
-
-// 検証用: この盤面で藍(lv3)が黒で始めると何故か(?)A1に打ってしまう
-export const test6: Map = {
- name: 'Test6',
- category: 'Test',
- data: [
- '--wwwww-',
- 'wwwwwwww',
- 'wbbbwbwb',
- 'wbbbbwbb',
- 'wbwbbwbb',
- 'wwbwbbbb',
- '--wbbbbb',
- '-wwwww--',
- ],
-};
-
-// 検証用: この盤面で藍(lv3)が黒で始めると何故か(?)G7に打ってしまう
-export const test7: Map = {
- name: 'Test7',
- category: 'Test',
- data: [
- 'b--w----',
- 'b-wwww--',
- 'bwbwwwbb',
- 'wbwwwwb-',
- 'wwwwwww-',
- '-wwbbwwb',
- '--wwww--',
- '--wwww--',
- ],
-};
-
-// 検証用: この盤面で藍(lv5)が黒で始めると何故か(?)A1に打ってしまう
-export const test8: Map = {
- name: 'Test8',
- category: 'Test',
- data: [
- '--------',
- '-----w--',
- 'w--www--',
- 'wwwwww--',
- 'bbbbwww-',
- 'wwwwww--',
- '--www---',
- '--ww----',
- ],
-};
diff --git a/packages/backend/src/games/reversi/package.json b/packages/backend/src/games/reversi/package.json
deleted file mode 100644
index a4415ad141..0000000000
--- a/packages/backend/src/games/reversi/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "misskey-reversi",
- "version": "0.0.5",
- "description": "Misskey reversi engine",
- "keywords": [
- "misskey"
- ],
- "author": "syuilo <i@syuilo.com>",
- "license": "MIT",
- "repository": "https://github.com/misskey-dev/misskey.git",
- "bugs": "https://github.com/misskey-dev/misskey/issues",
- "main": "./built/core.js",
- "types": "./built/core.d.ts",
- "scripts": {
- "build": "tsc"
- },
- "dependencies": {}
-}
diff --git a/packages/backend/src/games/reversi/tsconfig.json b/packages/backend/src/games/reversi/tsconfig.json
deleted file mode 100644
index 851fb6b7e4..0000000000
--- a/packages/backend/src/games/reversi/tsconfig.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "compilerOptions": {
- "noEmitOnError": false,
- "noImplicitAny": false,
- "noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true,
- "experimentalDecorators": true,
- "declaration": true,
- "sourceMap": false,
- "target": "es2017",
- "module": "commonjs",
- "removeComments": false,
- "noLib": false,
- "outDir": "./built",
- "rootDir": "./"
- },
- "compileOnSave": false,
- "include": [
- "./core.ts"
- ]
-}
diff --git a/packages/backend/src/misc/gen-avatar.ts b/packages/backend/src/misc/gen-identicon.ts
index 8838ec8d15..5cedd7afaf 100644
--- a/packages/backend/src/misc/gen-avatar.ts
+++ b/packages/backend/src/misc/gen-identicon.ts
@@ -1,5 +1,6 @@
/**
- * Random avatar generator
+ * Identicon generator
+ * https://en.wikipedia.org/wiki/Identicon
*/
import * as p from 'pureimage';
@@ -34,9 +35,9 @@ const cellSize = actualSize / n;
const sideN = Math.floor(n / 2);
/**
- * Generate buffer of random avatar by seed
+ * Generate buffer of an identicon by seed
*/
-export function genAvatar(seed: string, stream: WriteStream): Promise<void> {
+export function genIdenticon(seed: string, stream: WriteStream): Promise<void> {
const rand = gen.create(seed);
const canvas = p.make(size, size);
const ctx = canvas.getContext('2d');
diff --git a/packages/backend/src/misc/populate-emojis.ts b/packages/backend/src/misc/populate-emojis.ts
index b021ec46eb..26c05e5fa6 100644
--- a/packages/backend/src/misc/populate-emojis.ts
+++ b/packages/backend/src/misc/populate-emojis.ts
@@ -62,7 +62,8 @@ export async function populateEmoji(emojiName: string, noteUserHost: string | nu
if (emoji == null) return null;
const isLocal = emoji.host == null;
- const url = isLocal ? emoji.url : `${config.url}/proxy/image.png?${query({ url: emoji.url })}`;
+ const emojiUrl = emoji.publicUrl || emoji.originalUrl; // || emoji.originalUrl してるのは後方互換性のため
+ const url = isLocal ? emojiUrl : `${config.url}/proxy/image.png?${query({ url: emojiUrl })}`;
return {
name: emojiName,
@@ -116,7 +117,7 @@ export async function prefetchEmojis(emojis: { name: string; host: string | null
}
const _emojis = emojisQuery.length > 0 ? await Emojis.find({
where: emojisQuery,
- select: ['name', 'host', 'url'],
+ select: ['name', 'host', 'originalUrl', 'publicUrl'],
}) : [];
for (const emoji of _emojis) {
cache.set(`${emoji.name} ${emoji.host}`, emoji);
diff --git a/packages/backend/src/misc/schema.ts b/packages/backend/src/misc/schema.ts
index 4131875ef7..2dae954af9 100644
--- a/packages/backend/src/misc/schema.ts
+++ b/packages/backend/src/misc/schema.ts
@@ -1,32 +1,44 @@
-import { SimpleObj, SimpleSchema } from './simple-schema';
-import { packedUserSchema } from '@/models/repositories/user';
-import { packedNoteSchema } from '@/models/repositories/note';
-import { packedUserListSchema } from '@/models/repositories/user-list';
-import { packedAppSchema } from '@/models/repositories/app';
-import { packedMessagingMessageSchema } from '@/models/repositories/messaging-message';
-import { packedNotificationSchema } from '@/models/repositories/notification';
-import { packedDriveFileSchema } from '@/models/repositories/drive-file';
-import { packedDriveFolderSchema } from '@/models/repositories/drive-folder';
-import { packedFollowingSchema } from '@/models/repositories/following';
-import { packedMutingSchema } from '@/models/repositories/muting';
-import { packedBlockingSchema } from '@/models/repositories/blocking';
-import { packedNoteReactionSchema } from '@/models/repositories/note-reaction';
-import { packedHashtagSchema } from '@/models/repositories/hashtag';
-import { packedPageSchema } from '@/models/repositories/page';
-import { packedUserGroupSchema } from '@/models/repositories/user-group';
-import { packedNoteFavoriteSchema } from '@/models/repositories/note-favorite';
-import { packedChannelSchema } from '@/models/repositories/channel';
-import { packedAntennaSchema } from '@/models/repositories/antenna';
-import { packedClipSchema } from '@/models/repositories/clip';
-import { packedFederationInstanceSchema } from '@/models/repositories/federation-instance';
-import { packedQueueCountSchema } from '@/models/repositories/queue';
-import { packedGalleryPostSchema } from '@/models/repositories/gallery-post';
-import { packedEmojiSchema } from '@/models/repositories/emoji';
-import { packedReversiGameSchema } from '@/models/repositories/games/reversi/game';
-import { packedReversiMatchingSchema } from '@/models/repositories/games/reversi/matching';
+import {
+ packedUserLiteSchema,
+ packedUserDetailedNotMeOnlySchema,
+ packedMeDetailedOnlySchema,
+ packedUserDetailedNotMeSchema,
+ packedMeDetailedSchema,
+ packedUserDetailedSchema,
+ packedUserSchema,
+} from '@/models/schema/user';
+import { packedNoteSchema } from '@/models/schema/note';
+import { packedUserListSchema } from '@/models/schema/user-list';
+import { packedAppSchema } from '@/models/schema/app';
+import { packedMessagingMessageSchema } from '@/models/schema/messaging-message';
+import { packedNotificationSchema } from '@/models/schema/notification';
+import { packedDriveFileSchema } from '@/models/schema/drive-file';
+import { packedDriveFolderSchema } from '@/models/schema/drive-folder';
+import { packedFollowingSchema } from '@/models/schema/following';
+import { packedMutingSchema } from '@/models/schema/muting';
+import { packedBlockingSchema } from '@/models/schema/blocking';
+import { packedNoteReactionSchema } from '@/models/schema/note-reaction';
+import { packedHashtagSchema } from '@/models/schema/hashtag';
+import { packedPageSchema } from '@/models/schema/page';
+import { packedUserGroupSchema } from '@/models/schema/user-group';
+import { packedNoteFavoriteSchema } from '@/models/schema/note-favorite';
+import { packedChannelSchema } from '@/models/schema/channel';
+import { packedAntennaSchema } from '@/models/schema/antenna';
+import { packedClipSchema } from '@/models/schema/clip';
+import { packedFederationInstanceSchema } from '@/models/schema/federation-instance';
+import { packedQueueCountSchema } from '@/models/schema/queue';
+import { packedGalleryPostSchema } from '@/models/schema/gallery-post';
+import { packedEmojiSchema } from '@/models/schema/emoji';
export const refs = {
+ UserLite: packedUserLiteSchema,
+ UserDetailedNotMeOnly: packedUserDetailedNotMeOnlySchema,
+ MeDetailedOnly: packedMeDetailedOnlySchema,
+ UserDetailedNotMe: packedUserDetailedNotMeSchema,
+ MeDetailed: packedMeDetailedSchema,
+ UserDetailed: packedUserDetailedSchema,
User: packedUserSchema,
+
UserList: packedUserListSchema,
UserGroup: packedUserGroupSchema,
App: packedAppSchema,
@@ -49,16 +61,52 @@ export const refs = {
FederationInstance: packedFederationInstanceSchema,
GalleryPost: packedGalleryPostSchema,
Emoji: packedEmojiSchema,
- ReversiGame: packedReversiGameSchema,
- ReversiMatching: packedReversiMatchingSchema,
};
-export type Packed<x extends keyof typeof refs> = ObjType<(typeof refs[x])['properties']>;
+// Packed = SchemaTypeDef<typeof refs[x]>; とすると展開されてマウスホバー時に型表示が使い物にならなくなる
+// ObjType<r['properties']>を指定すると(なぜか)展開されずにPacked<'Hoge'>と表示される
+type PackedDef<r extends { properties?: Obj; oneOf?: ReadonlyArray<MinimumSchema>; allOf?: ReadonlyArray<MinimumSchema> }> =
+ r['allOf'] extends ReadonlyArray<MinimumSchema> ? UnionToIntersection<UnionSchemaType<r['allOf']>> :
+ r['oneOf'] extends ReadonlyArray<MinimumSchema> ? UnionSchemaType<r['oneOf']> :
+ r['properties'] extends Obj ? ObjType<r['properties']> :
+ never;
+export type Packed<x extends keyof typeof refs> = PackedDef<typeof refs[x]>;
+
+type TypeStringef = 'boolean' | 'number' | 'string' | 'array' | 'object' | 'any';
+type StringDefToType<T extends TypeStringef> =
+ T extends 'boolean' ? boolean :
+ T extends 'number' ? number :
+ T extends 'string' ? string | Date :
+ T extends 'array' ? ReadonlyArray<any> :
+ T extends 'object' ? Record<string, any> :
+ any;
+
+// https://swagger.io/specification/?sbsearch=optional#schema-object
+type OfSchema = {
+ readonly anyOf?: ReadonlyArray<MinimumSchema>;
+ readonly oneOf?: ReadonlyArray<MinimumSchema>;
+ readonly allOf?: ReadonlyArray<MinimumSchema>;
+}
+
+export interface MinimumSchema extends OfSchema {
+ readonly type?: TypeStringef;
+ readonly nullable?: boolean;
+ readonly optional?: boolean;
+ readonly items?: MinimumSchema;
+ readonly properties?: Obj;
+ readonly description?: string;
+ readonly example?: any;
+ readonly format?: string;
+ readonly ref?: keyof typeof refs;
+ readonly enum?: ReadonlyArray<string>;
+ readonly default?: (this['type'] extends TypeStringef ? StringDefToType<this['type']> : any) | null;
+ readonly maxLength?: number;
+ readonly minLength?: number;
+}
-export interface Schema extends SimpleSchema {
- items?: Schema;
- properties?: Obj;
- ref?: keyof typeof refs;
+export interface Schema extends MinimumSchema {
+ readonly nullable: boolean;
+ readonly optional: boolean;
}
type NonUndefinedPropertyNames<T extends Obj> = {
@@ -69,22 +117,13 @@ type UndefinedPropertyNames<T extends Obj> = {
[K in keyof T]: T[K]['optional'] extends true ? K : never
}[keyof T];
-type OnlyRequired<T extends Obj> = Pick<T, NonUndefinedPropertyNames<T>>;
-type OnlyOptional<T extends Obj> = Pick<T, UndefinedPropertyNames<T>>;
-
-export interface Obj extends SimpleObj { [key: string]: Schema; }
+export interface Obj { [key: string]: Schema; }
export type ObjType<s extends Obj> =
- { [P in keyof OnlyOptional<s>]?: SchemaType<s[P]> } &
- { [P in keyof OnlyRequired<s>]: SchemaType<s[P]> };
-
-// https://qiita.com/hrsh7th@github/items/84e8968c3601009cdcf2
-type MyType<T extends Schema> = {
- 0: any;
- 1: SchemaType<T>;
-}[T extends Schema ? 1 : 0];
+ { -readonly [P in UndefinedPropertyNames<s>]?: SchemaType<s[P]> } &
+ { -readonly [P in NonUndefinedPropertyNames<s>]: SchemaType<s[P]> };
-type NullOrUndefined<p extends Schema, T> =
+type NullOrUndefined<p extends MinimumSchema, T> =
p['nullable'] extends true
? p['optional'] extends true
? (T | null | undefined)
@@ -93,15 +132,41 @@ type NullOrUndefined<p extends Schema, T> =
? (T | undefined)
: T;
-export type SchemaType<p extends Schema> =
- p['type'] extends 'number' ? NullOrUndefined<p, number> :
- p['type'] extends 'string' ? NullOrUndefined<p, string> :
- p['type'] extends 'boolean' ? NullOrUndefined<p, boolean> :
- p['type'] extends 'array' ? NullOrUndefined<p, MyType<NonNullable<p['items']>>[]> :
+// 共用体型を交差型にする型 https://stackoverflow.com/questions/54938141/typescript-convert-union-to-intersection
+type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
+
+// https://github.com/misskey-dev/misskey/pull/8144#discussion_r785287552
+// 単純にSchemaTypeDef<X>で判定するだけではダメ
+type UnionSchemaType<a extends readonly any[], X extends MinimumSchema = a[number]> = X extends any ? SchemaType<X> : never;
+type ArrayUnion<T> = T extends any ? Array<T> : never;
+
+export type SchemaTypeDef<p extends MinimumSchema> =
+ p['type'] extends 'number' ? number :
+ p['type'] extends 'string' ? (
+ p['enum'] extends readonly string[] ?
+ p['enum'][number] :
+ p['format'] extends 'date-time' ? string : // Dateにする??
+ string
+ ) :
+ p['type'] extends 'boolean' ? boolean :
p['type'] extends 'object' ? (
- p['ref'] extends keyof typeof refs
- ? NullOrUndefined<p, Packed<p['ref']>>
- : NullOrUndefined<p, ObjType<NonNullable<p['properties']>>>
+ p['ref'] extends keyof typeof refs ? Packed<p['ref']> :
+ p['properties'] extends NonNullable<Obj> ? ObjType<p['properties']> :
+ p['anyOf'] extends ReadonlyArray<MinimumSchema> ? UnionSchemaType<p['anyOf']> & Partial<UnionToIntersection<UnionSchemaType<p['anyOf']>>> :
+ p['allOf'] extends ReadonlyArray<MinimumSchema> ? UnionToIntersection<UnionSchemaType<p['allOf']>> :
+ any
+ ) :
+ p['type'] extends 'array' ? (
+ p['items'] extends OfSchema ? (
+ p['items']['anyOf'] extends ReadonlyArray<MinimumSchema> ? UnionSchemaType<NonNullable<p['items']['anyOf']>>[] :
+ p['items']['oneOf'] extends ReadonlyArray<MinimumSchema> ? ArrayUnion<UnionSchemaType<NonNullable<p['items']['oneOf']>>> :
+ p['items']['allOf'] extends ReadonlyArray<MinimumSchema> ? UnionToIntersection<UnionSchemaType<NonNullable<p['items']['allOf']>>>[] :
+ never
+ ) :
+ p['items'] extends NonNullable<MinimumSchema> ? SchemaTypeDef<p['items']>[] :
+ any[]
) :
- p['type'] extends 'any' ? NullOrUndefined<p, any> :
+ p['oneOf'] extends ReadonlyArray<MinimumSchema> ? UnionSchemaType<p['oneOf']> :
any;
+
+export type SchemaType<p extends MinimumSchema> = NullOrUndefined<p, SchemaTypeDef<p>>;
diff --git a/packages/backend/src/misc/simple-schema.ts b/packages/backend/src/misc/simple-schema.ts
deleted file mode 100644
index abbb348e24..0000000000
--- a/packages/backend/src/misc/simple-schema.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export interface SimpleSchema {
- type: 'boolean' | 'number' | 'string' | 'array' | 'object' | 'any';
- nullable: boolean;
- optional: boolean;
- items?: SimpleSchema;
- properties?: SimpleObj;
- description?: string;
- example?: any;
- format?: string;
- ref?: string;
- enum?: string[];
- default?: boolean | null;
-}
-
-export interface SimpleObj { [key: string]: SimpleSchema; }
diff --git a/packages/backend/src/models/entities/abuse-user-report.ts b/packages/backend/src/models/entities/abuse-user-report.ts
index 019d613f76..27c1e47fd8 100644
--- a/packages/backend/src/models/entities/abuse-user-report.ts
+++ b/packages/backend/src/models/entities/abuse-user-report.ts
@@ -51,6 +51,11 @@ export class AbuseUserReport {
})
public resolved: boolean;
+ @Column('boolean', {
+ default: false
+ })
+ public forwarded: boolean;
+
@Column('varchar', {
length: 2048,
})
diff --git a/packages/backend/src/models/entities/drive-file.ts b/packages/backend/src/models/entities/drive-file.ts
index 0af52d7cc0..cec86880f5 100644
--- a/packages/backend/src/models/entities/drive-file.ts
+++ b/packages/backend/src/models/entities/drive-file.ts
@@ -101,6 +101,11 @@ export class DriveFile {
})
public webpublicUrl: string | null;
+ @Column('varchar', {
+ length: 128, nullable: true,
+ })
+ public webpublicType: string | null;
+
@Index({ unique: true })
@Column('varchar', {
length: 256, nullable: true,
diff --git a/packages/backend/src/models/entities/emoji.ts b/packages/backend/src/models/entities/emoji.ts
index 1146908a88..2e9c11d21c 100644
--- a/packages/backend/src/models/entities/emoji.ts
+++ b/packages/backend/src/models/entities/emoji.ts
@@ -32,13 +32,19 @@ export class Emoji {
@Column('varchar', {
length: 512,
})
- public url: string;
+ public originalUrl: string;
+
+ @Column('varchar', {
+ length: 512,
+ })
+ public publicUrl: string;
@Column('varchar', {
length: 512, nullable: true,
})
public uri: string | null;
+ // publicUrlの方のtypeが入る
@Column('varchar', {
length: 64, nullable: true,
})
diff --git a/packages/backend/src/models/entities/games/reversi/game.ts b/packages/backend/src/models/entities/games/reversi/game.ts
deleted file mode 100644
index fe9b8a5ba5..0000000000
--- a/packages/backend/src/models/entities/games/reversi/game.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { User } from '../../user';
-import { id } from '../../../id';
-
-@Entity()
-export class ReversiGame {
- @PrimaryColumn(id())
- public id: string;
-
- @Index()
- @Column('timestamp with time zone', {
- comment: 'The created date of the ReversiGame.',
- })
- public createdAt: Date;
-
- @Column('timestamp with time zone', {
- nullable: true,
- comment: 'The started date of the ReversiGame.',
- })
- public startedAt: Date | null;
-
- @Column(id())
- public user1Id: User['id'];
-
- @ManyToOne(type => User, {
- onDelete: 'CASCADE',
- })
- @JoinColumn()
- public user1: User | null;
-
- @Column(id())
- public user2Id: User['id'];
-
- @ManyToOne(type => User, {
- onDelete: 'CASCADE',
- })
- @JoinColumn()
- public user2: User | null;
-
- @Column('boolean', {
- default: false,
- })
- public user1Accepted: boolean;
-
- @Column('boolean', {
- default: false,
- })
- public user2Accepted: boolean;
-
- /**
- * どちらのプレイヤーが先行(黒)か
- * 1 ... user1
- * 2 ... user2
- */
- @Column('integer', {
- nullable: true,
- })
- public black: number | null;
-
- @Column('boolean', {
- default: false,
- })
- public isStarted: boolean;
-
- @Column('boolean', {
- default: false,
- })
- public isEnded: boolean;
-
- @Column({
- ...id(),
- nullable: true,
- })
- public winnerId: User['id'] | null;
-
- @Column({
- ...id(),
- nullable: true,
- })
- public surrendered: User['id'] | null;
-
- @Column('jsonb', {
- default: [],
- })
- public logs: {
- at: Date;
- color: boolean;
- pos: number;
- }[];
-
- @Column('varchar', {
- array: true, length: 64,
- })
- public map: string[];
-
- @Column('varchar', {
- length: 32,
- })
- public bw: string;
-
- @Column('boolean', {
- default: false,
- })
- public isLlotheo: boolean;
-
- @Column('boolean', {
- default: false,
- })
- public canPutEverywhere: boolean;
-
- @Column('boolean', {
- default: false,
- })
- public loopedBoard: boolean;
-
- @Column('jsonb', {
- nullable: true, default: null,
- })
- public form1: any | null;
-
- @Column('jsonb', {
- nullable: true, default: null,
- })
- public form2: any | null;
-
- /**
- * ログのposを文字列としてすべて連結したもののCRC32値
- */
- @Column('varchar', {
- length: 32, nullable: true,
- })
- public crc32: string | null;
-}
diff --git a/packages/backend/src/models/entities/games/reversi/matching.ts b/packages/backend/src/models/entities/games/reversi/matching.ts
deleted file mode 100644
index 70bb555e2f..0000000000
--- a/packages/backend/src/models/entities/games/reversi/matching.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { User } from '../../user';
-import { id } from '../../../id';
-
-@Entity()
-export class ReversiMatching {
- @PrimaryColumn(id())
- public id: string;
-
- @Index()
- @Column('timestamp with time zone', {
- comment: 'The created date of the ReversiMatching.',
- })
- public createdAt: Date;
-
- @Index()
- @Column(id())
- public parentId: User['id'];
-
- @ManyToOne(type => User, {
- onDelete: 'CASCADE',
- })
- @JoinColumn()
- public parent: User | null;
-
- @Index()
- @Column(id())
- public childId: User['id'];
-
- @ManyToOne(type => User, {
- onDelete: 'CASCADE',
- })
- @JoinColumn()
- public child: User | null;
-}
diff --git a/packages/backend/src/models/entities/user-profile.ts b/packages/backend/src/models/entities/user-profile.ts
index eb8cdadd19..d8317de8d3 100644
--- a/packages/backend/src/models/entities/user-profile.ts
+++ b/packages/backend/src/models/entities/user-profile.ts
@@ -124,6 +124,7 @@ export class UserProfile {
})
public clientData: Record<string, any>;
+ // TODO: そのうち消す
@Column('jsonb', {
default: {},
comment: 'The room data of the User.',
diff --git a/packages/backend/src/models/index.ts b/packages/backend/src/models/index.ts
index 7154cca550..67da347395 100644
--- a/packages/backend/src/models/index.ts
+++ b/packages/backend/src/models/index.ts
@@ -18,7 +18,6 @@ import { AccessToken } from './entities/access-token';
import { UserNotePining } from './entities/user-note-pining';
import { SigninRepository } from './repositories/signin';
import { MessagingMessageRepository } from './repositories/messaging-message';
-import { ReversiGameRepository } from './repositories/games/reversi/game';
import { UserListRepository } from './repositories/user-list';
import { UserListJoining } from './entities/user-list-joining';
import { UserGroupRepository } from './repositories/user-group';
@@ -30,7 +29,6 @@ import { BlockingRepository } from './repositories/blocking';
import { NoteReactionRepository } from './repositories/note-reaction';
import { NotificationRepository } from './repositories/notification';
import { NoteFavoriteRepository } from './repositories/note-favorite';
-import { ReversiMatchingRepository } from './repositories/games/reversi/matching';
import { UserPublickey } from './entities/user-publickey';
import { UserKeypair } from './entities/user-keypair';
import { AppRepository } from './repositories/app';
@@ -107,8 +105,6 @@ export const AuthSessions = getCustomRepository(AuthSessionRepository);
export const AccessTokens = getRepository(AccessToken);
export const Signins = getCustomRepository(SigninRepository);
export const MessagingMessages = getCustomRepository(MessagingMessageRepository);
-export const ReversiGames = getCustomRepository(ReversiGameRepository);
-export const ReversiMatchings = getCustomRepository(ReversiMatchingRepository);
export const Pages = getCustomRepository(PageRepository);
export const PageLikes = getCustomRepository(PageLikeRepository);
export const GalleryPosts = getCustomRepository(GalleryPostRepository);
diff --git a/packages/backend/src/models/repositories/abuse-user-report.ts b/packages/backend/src/models/repositories/abuse-user-report.ts
index 5e267b3c2b..943b65eb64 100644
--- a/packages/backend/src/models/repositories/abuse-user-report.ts
+++ b/packages/backend/src/models/repositories/abuse-user-report.ts
@@ -27,6 +27,7 @@ export class AbuseUserReportRepository extends Repository<AbuseUserReport> {
assignee: report.assigneeId ? Users.pack(report.assignee || report.assigneeId, null, {
detail: true,
}) : null,
+ forwarded: report.forwarded,
});
}
diff --git a/packages/backend/src/models/repositories/antenna.ts b/packages/backend/src/models/repositories/antenna.ts
index 548f44f1b7..3bf0645a7f 100644
--- a/packages/backend/src/models/repositories/antenna.ts
+++ b/packages/backend/src/models/repositories/antenna.ts
@@ -31,94 +31,3 @@ export class AntennaRepository extends Repository<Antenna> {
};
}
}
-
-export const packedAntennaSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- keywords: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
- excludeKeywords: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
- src: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- enum: ['home', 'all', 'users', 'list', 'group'],
- },
- userListId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- userGroupId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- users: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
- caseSensitive: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- default: false,
- },
- notify: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- withReplies: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- default: false,
- },
- withFile: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- hasUnreadNote: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- default: false,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/app.ts b/packages/backend/src/models/repositories/app.ts
index bec0765ac2..6bac4d9598 100644
--- a/packages/backend/src/models/repositories/app.ts
+++ b/packages/backend/src/models/repositories/app.ts
@@ -38,38 +38,3 @@ export class AppRepository extends Repository<App> {
};
}
}
-
-export const packedAppSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- callbackUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- permission: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
- secret: {
- type: 'string' as const,
- optional: true as const, nullable: false as const,
- },
- isAuthorized: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/blocking.ts b/packages/backend/src/models/repositories/blocking.ts
index a6895eabf4..c20b02f501 100644
--- a/packages/backend/src/models/repositories/blocking.ts
+++ b/packages/backend/src/models/repositories/blocking.ts
@@ -30,31 +30,3 @@ export class BlockingRepository extends Repository<Blocking> {
return Promise.all(blockings.map(x => this.pack(x, me)));
}
}
-
-export const packedBlockingSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- blockeeId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- blockee: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User' as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/channel.ts b/packages/backend/src/models/repositories/channel.ts
index 0a6b02f495..b3afb823ab 100644
--- a/packages/backend/src/models/repositories/channel.ts
+++ b/packages/backend/src/models/repositories/channel.ts
@@ -40,56 +40,3 @@ export class ChannelRepository extends Repository<Channel> {
};
}
}
-
-export const packedChannelSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- lastNotedAt: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'date-time',
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- description: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
- },
- bannerUrl: {
- type: 'string' as const,
- format: 'url',
- nullable: true as const, optional: false as const,
- },
- notesCount: {
- type: 'number' as const,
- nullable: false as const, optional: false as const,
- },
- usersCount: {
- type: 'number' as const,
- nullable: false as const, optional: false as const,
- },
- isFollowing: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- userId: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
- format: 'id',
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/clip.ts b/packages/backend/src/models/repositories/clip.ts
index 7892811d48..6f9ceeb50a 100644
--- a/packages/backend/src/models/repositories/clip.ts
+++ b/packages/backend/src/models/repositories/clip.ts
@@ -29,42 +29,3 @@ export class ClipRepository extends Repository<Clip> {
}
}
-export const packedClipSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- userId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user: {
- type: 'object' as const,
- ref: 'User' as const,
- optional: false as const, nullable: false as const,
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- description: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- isPublic: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/drive-file.ts b/packages/backend/src/models/repositories/drive-file.ts
index 79b890aa6e..44db9a0a58 100644
--- a/packages/backend/src/models/repositories/drive-file.ts
+++ b/packages/backend/src/models/repositories/drive-file.ts
@@ -3,7 +3,7 @@ import { DriveFile } from '@/models/entities/drive-file';
import { Users, DriveFolders } from '../index';
import { User } from '@/models/entities/user';
import { toPuny } from '@/misc/convert-host';
-import { awaitAll } from '@/prelude/await-all';
+import { awaitAll, Promiseable } from '@/prelude/await-all';
import { Packed } from '@/misc/schema';
import config from '@/config/index';
import { query, appendQuery } from '@/prelude/url';
@@ -126,7 +126,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
const meta = await fetchMeta();
- return await awaitAll({
+ return await awaitAll<Packed<'DriveFile'>>({
id: file.id,
createdAt: file.createdAt.toISOString(),
name: file.name,
@@ -156,112 +156,3 @@ export class DriveFileRepository extends Repository<DriveFile> {
return items.filter(x => x != null);
}
}
-
-export const packedDriveFileSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- example: 'lenna.jpg',
- },
- type: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- example: 'image/jpeg',
- },
- md5: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'md5',
- example: '15eca7fba0480996e2245f5185bf39f2',
- },
- size: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- example: 51469,
- },
- isSensitive: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- blurhash: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- properties: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- width: {
- type: 'number' as const,
- optional: true as const, nullable: false as const,
- example: 1280,
- },
- height: {
- type: 'number' as const,
- optional: true as const, nullable: false as const,
- example: 720,
- },
- orientation: {
- type: 'number' as const,
- optional: true as const, nullable: false as const,
- example: 8,
- },
- avgColor: {
- type: 'string' as const,
- optional: true as const, nullable: false as const,
- example: 'rgb(40,65,87)',
- },
- },
- },
- url: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'url',
- },
- thumbnailUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'url',
- },
- comment: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- folderId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- folder: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'DriveFolder' as const,
- },
- userId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- user: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'User' as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/drive-folder.ts b/packages/backend/src/models/repositories/drive-folder.ts
index 4ee4a68e08..b2e6cee9b8 100644
--- a/packages/backend/src/models/repositories/drive-folder.ts
+++ b/packages/backend/src/models/repositories/drive-folder.ts
@@ -48,44 +48,3 @@ export class DriveFolderRepository extends Repository<DriveFolder> {
});
}
}
-
-export const packedDriveFolderSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- foldersCount: {
- type: 'number' as const,
- optional: true as const, nullable: false as const,
- },
- filesCount: {
- type: 'number' as const,
- optional: true as const, nullable: false as const,
- },
- parentId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- parent: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'DriveFolder' as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/emoji.ts b/packages/backend/src/models/repositories/emoji.ts
index b7529595a9..b9dc6ed0ac 100644
--- a/packages/backend/src/models/repositories/emoji.ts
+++ b/packages/backend/src/models/repositories/emoji.ts
@@ -15,7 +15,8 @@ export class EmojiRepository extends Repository<Emoji> {
name: emoji.name,
category: emoji.category,
host: emoji.host,
- url: emoji.url,
+ // || emoji.originalUrl してるのは後方互換性のため
+ url: emoji.publicUrl || emoji.originalUrl,
};
}
@@ -25,41 +26,3 @@ export class EmojiRepository extends Repository<Emoji> {
return Promise.all(emojis.map(x => this.pack(x)));
}
}
-
-export const packedEmojiSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- aliases: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- category: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- host: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- url: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/federation-instance.ts b/packages/backend/src/models/repositories/federation-instance.ts
index 90dbbaab1c..426fd5bfc3 100644
--- a/packages/backend/src/models/repositories/federation-instance.ts
+++ b/packages/backend/src/models/repositories/federation-instance.ts
@@ -1,106 +1,2 @@
import config from '@/config/index';
-export const packedFederationInstanceSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- caughtAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- host: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- example: 'misskey.example.com',
- },
- usersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- notesCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- followingCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- followersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- driveUsage: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- driveFiles: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- latestRequestSentAt: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'date-time',
- },
- lastCommunicatedAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- isNotResponding: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- isSuspended: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- softwareName: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- example: 'misskey',
- },
- softwareVersion: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- example: config.version,
- },
- openRegistrations: {
- type: 'boolean' as const,
- optional: false as const, nullable: true as const,
- example: true,
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- description: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- maintainerName: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- maintainerEmail: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- iconUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'url',
- },
- infoUpdatedAt: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'date-time',
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/following.ts b/packages/backend/src/models/repositories/following.ts
index 1dfaaf908a..9d20f442df 100644
--- a/packages/backend/src/models/repositories/following.ts
+++ b/packages/backend/src/models/repositories/following.ts
@@ -84,41 +84,3 @@ export class FollowingRepository extends Repository<Following> {
return Promise.all(followings.map(x => this.pack(x, me, opts)));
}
}
-
-export const packedFollowingSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- followeeId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- followee: {
- type: 'object' as const,
- optional: true as const, nullable: false as const,
- ref: 'User' as const,
- },
- followerId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- follower: {
- type: 'object' as const,
- optional: true as const, nullable: false as const,
- ref: 'User' as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/gallery-post.ts b/packages/backend/src/models/repositories/gallery-post.ts
index 6d37e3120e..e9233bb91e 100644
--- a/packages/backend/src/models/repositories/gallery-post.ts
+++ b/packages/backend/src/models/repositories/gallery-post.ts
@@ -38,74 +38,3 @@ export class GalleryPostRepository extends Repository<GalleryPost> {
return Promise.all(posts.map(x => this.pack(x, me)));
}
}
-
-export const packedGalleryPostSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- updatedAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- title: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- description: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- userId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user: {
- type: 'object' as const,
- ref: 'User' as const,
- optional: false as const, nullable: false as const,
- },
- fileIds: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- },
- files: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'DriveFile' as const,
- },
- },
- tags: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
- isSensitive: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/games/reversi/game.ts b/packages/backend/src/models/repositories/games/reversi/game.ts
deleted file mode 100644
index a9e0496760..0000000000
--- a/packages/backend/src/models/repositories/games/reversi/game.ts
+++ /dev/null
@@ -1,191 +0,0 @@
-import { User } from '@/models/entities/user';
-import { EntityRepository, Repository } from 'typeorm';
-import { Users } from '../../../index';
-import { ReversiGame } from '@/models/entities/games/reversi/game';
-import { Packed } from '@/misc/schema';
-
-@EntityRepository(ReversiGame)
-export class ReversiGameRepository extends Repository<ReversiGame> {
- public async pack(
- src: ReversiGame['id'] | ReversiGame,
- me?: { id: User['id'] } | null | undefined,
- options?: {
- detail?: boolean
- }
- ): Promise<Packed<'ReversiGame'>> {
- const opts = Object.assign({
- detail: true,
- }, options);
-
- const game = typeof src === 'object' ? src : await this.findOneOrFail(src);
-
- return {
- id: game.id,
- createdAt: game.createdAt.toISOString(),
- startedAt: game.startedAt && game.startedAt.toISOString(),
- isStarted: game.isStarted,
- isEnded: game.isEnded,
- form1: game.form1,
- form2: game.form2,
- user1Accepted: game.user1Accepted,
- user2Accepted: game.user2Accepted,
- user1Id: game.user1Id,
- user2Id: game.user2Id,
- user1: await Users.pack(game.user1Id, me),
- user2: await Users.pack(game.user2Id, me),
- winnerId: game.winnerId,
- winner: game.winnerId ? await Users.pack(game.winnerId, me) : null,
- surrendered: game.surrendered,
- black: game.black,
- bw: game.bw,
- isLlotheo: game.isLlotheo,
- canPutEverywhere: game.canPutEverywhere,
- loopedBoard: game.loopedBoard,
- ...(opts.detail ? {
- logs: game.logs.map(log => ({
- at: log.at.toISOString(),
- color: log.color,
- pos: log.pos,
- })),
- map: game.map,
- } : {}),
- };
- }
-}
-
-export const packedReversiGameSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- startedAt: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'date-time',
- },
- isStarted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- isEnded: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- form1: {
- type: 'any' as const,
- optional: false as const, nullable: true as const,
- },
- form2: {
- type: 'any' as const,
- optional: false as const, nullable: true as const,
- },
- user1Accepted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- user2Accepted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- user1Id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- user2Id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- user1: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User' as const,
- },
- user2: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User' as const,
- },
- winnerId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- winner: {
- type: 'object' as const,
- optional: false as const, nullable: true as const,
- ref: 'User' as const,
- },
- surrendered: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- black: {
- type: 'number' as const,
- optional: false as const, nullable: true as const,
- },
- bw: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- isLlotheo: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- canPutEverywhere: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- loopedBoard: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- logs: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: true as const, nullable: false as const,
- properties: {
- at: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- color: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- pos: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
- },
- map: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/games/reversi/matching.ts b/packages/backend/src/models/repositories/games/reversi/matching.ts
deleted file mode 100644
index b55f598068..0000000000
--- a/packages/backend/src/models/repositories/games/reversi/matching.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { EntityRepository, Repository } from 'typeorm';
-import { ReversiMatching } from '@/models/entities/games/reversi/matching';
-import { Users } from '../../../index';
-import { awaitAll } from '@/prelude/await-all';
-import { User } from '@/models/entities/user';
-import { Packed } from '@/misc/schema';
-
-@EntityRepository(ReversiMatching)
-export class ReversiMatchingRepository extends Repository<ReversiMatching> {
- public async pack(
- src: ReversiMatching['id'] | ReversiMatching,
- me: { id: User['id'] }
- ): Promise<Packed<'ReversiMatching'>> {
- const matching = typeof src === 'object' ? src : await this.findOneOrFail(src);
-
- return await awaitAll({
- id: matching.id,
- createdAt: matching.createdAt.toISOString(),
- parentId: matching.parentId,
- parent: Users.pack(matching.parentId, me, {
- detail: true,
- }),
- childId: matching.childId,
- child: Users.pack(matching.childId, me, {
- detail: true,
- }),
- });
- }
-}
-
-export const packedReversiMatchingSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- parentId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- parent: {
- type: 'object' as const,
- optional: false as const, nullable: true as const,
- ref: 'User' as const,
- },
- childId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- child: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User' as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/hashtag.ts b/packages/backend/src/models/repositories/hashtag.ts
index 6e513c7ebb..c4b8d50c4e 100644
--- a/packages/backend/src/models/repositories/hashtag.ts
+++ b/packages/backend/src/models/repositories/hashtag.ts
@@ -24,39 +24,3 @@ export class HashtagRepository extends Repository<Hashtag> {
return Promise.all(hashtags.map(x => this.pack(x)));
}
}
-
-export const packedHashtagSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- tag: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- example: 'misskey',
- },
- mentionedUsersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- mentionedLocalUsersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- mentionedRemoteUsersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- attachedUsersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- attachedLocalUsersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- attachedRemoteUsersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/messaging-message.ts b/packages/backend/src/models/repositories/messaging-message.ts
index 1b2dd3a246..0a342430b9 100644
--- a/packages/backend/src/models/repositories/messaging-message.ts
+++ b/packages/backend/src/models/repositories/messaging-message.ts
@@ -42,78 +42,3 @@ export class MessagingMessageRepository extends Repository<MessagingMessage> {
};
}
}
-
-export const packedMessagingMessageSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- userId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user: {
- type: 'object' as const,
- ref: 'User' as const,
- optional: true as const, nullable: false as const,
- },
- text: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- fileId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- format: 'id',
- },
- file: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'DriveFile' as const,
- },
- recipientId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- recipient: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'User' as const,
- },
- groupId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- group: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'UserGroup' as const,
- },
- isRead: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- reads: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/muting.ts b/packages/backend/src/models/repositories/muting.ts
index b82d1f0daa..bdbe9b47da 100644
--- a/packages/backend/src/models/repositories/muting.ts
+++ b/packages/backend/src/models/repositories/muting.ts
@@ -30,31 +30,3 @@ export class MutingRepository extends Repository<Muting> {
return Promise.all(mutings.map(x => this.pack(x, me)));
}
}
-
-export const packedMutingSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- muteeId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- mutee: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User' as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/note-favorite.ts b/packages/backend/src/models/repositories/note-favorite.ts
index 47586a9116..c5de55c0c0 100644
--- a/packages/backend/src/models/repositories/note-favorite.ts
+++ b/packages/backend/src/models/repositories/note-favorite.ts
@@ -26,31 +26,3 @@ export class NoteFavoriteRepository extends Repository<NoteFavorite> {
return Promise.all(favorites.map(x => this.pack(x, me)));
}
}
-
-export const packedNoteFavoriteSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- note: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'Note' as const,
- },
- noteId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/note-reaction.ts b/packages/backend/src/models/repositories/note-reaction.ts
index dfb25cbea1..097574effa 100644
--- a/packages/backend/src/models/repositories/note-reaction.ts
+++ b/packages/backend/src/models/repositories/note-reaction.ts
@@ -31,30 +31,3 @@ export class NoteReactionRepository extends Repository<NoteReaction> {
};
}
}
-
-export const packedNoteReactionSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- user: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User' as const,
- },
- type: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts
index 96dfad70e9..9a7fef4977 100644
--- a/packages/backend/src/models/repositories/note.ts
+++ b/packages/backend/src/models/repositories/note.ts
@@ -218,7 +218,7 @@ export class NoteRepository extends Repository<Note> {
const reactionEmojiNames = Object.keys(note.reactions).filter(x => x?.startsWith(':')).map(x => decodeReaction(x).reaction).map(x => x.replace(/:/g, ''));
- const packed = await awaitAll({
+ const packed: Packed<'Note'> = await awaitAll({
id: note.id,
createdAt: note.createdAt.toISOString(),
userId: note.userId,
@@ -320,188 +320,3 @@ export class NoteRepository extends Repository<Note> {
})));
}
}
-
-export const packedNoteSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- text: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- cw: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- },
- userId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user: {
- type: 'object' as const,
- ref: 'User' as const,
- optional: false as const, nullable: false as const,
- },
- replyId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- renoteId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- reply: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'Note' as const,
- },
- renote: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- ref: 'Note' as const,
- },
- isHidden: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- visibility: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- mentions: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- },
- visibleUserIds: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- },
- fileIds: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- },
- files: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'DriveFile' as const,
- },
- },
- tags: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
- items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- },
- poll: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- },
- channelId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- channel: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- },
- },
- },
- localOnly: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- emojis: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- url: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- },
- },
- },
- reactions: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- },
- renoteCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- repliesCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- uri: {
- type: 'string' as const,
- optional: true as const, nullable: false as const,
- },
- url: {
- type: 'string' as const,
- optional: true as const, nullable: false as const,
- },
-
- myReaction: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/notification.ts b/packages/backend/src/models/repositories/notification.ts
index 47d569ed21..5e42798898 100644
--- a/packages/backend/src/models/repositories/notification.ts
+++ b/packages/backend/src/models/repositories/notification.ts
@@ -107,69 +107,3 @@ export class NotificationRepository extends Repository<Notification> {
})));
}
}
-
-export const packedNotificationSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- isRead: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- type: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- enum: [...notificationTypes],
- },
- user: {
- type: 'object' as const,
- ref: 'User' as const,
- optional: true as const, nullable: true as const,
- },
- userId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- format: 'id',
- },
- note: {
- type: 'object' as const,
- ref: 'Note' as const,
- optional: true as const, nullable: true as const,
- },
- reaction: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- },
- choice: {
- type: 'number' as const,
- optional: true as const, nullable: true as const,
- },
- invitation: {
- type: 'object' as const,
- optional: true as const, nullable: true as const,
- },
- body: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- },
- header: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- },
- icon: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/page.ts b/packages/backend/src/models/repositories/page.ts
index 46b453cad9..ec76c2e418 100644
--- a/packages/backend/src/models/repositories/page.ts
+++ b/packages/backend/src/models/repositories/page.ts
@@ -87,56 +87,3 @@ export class PageRepository extends Repository<Page> {
return Promise.all(pages.map(x => this.pack(x, me)));
}
}
-
-export const packedPageSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- updatedAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- title: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- summary: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- },
- content: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- },
- variables: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- },
- userId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user: {
- type: 'object' as const,
- ref: 'User' as const,
- optional: false as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/queue.ts b/packages/backend/src/models/repositories/queue.ts
deleted file mode 100644
index 521c634390..0000000000
--- a/packages/backend/src/models/repositories/queue.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-export const packedQueueCountSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- waiting: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- active: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- completed: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- failed: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- delayed: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- paused: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/user-group.ts b/packages/backend/src/models/repositories/user-group.ts
index 02a0348885..3ed37ca0ed 100644
--- a/packages/backend/src/models/repositories/user-group.ts
+++ b/packages/backend/src/models/repositories/user-group.ts
@@ -23,39 +23,3 @@ export class UserGroupRepository extends Repository<UserGroup> {
};
}
}
-
-export const packedUserGroupSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- ownerId: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- format: 'id',
- },
- userIds: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- items: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- format: 'id',
- },
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/user-list.ts b/packages/backend/src/models/repositories/user-list.ts
index 792a17cb49..a2bffe8357 100644
--- a/packages/backend/src/models/repositories/user-list.ts
+++ b/packages/backend/src/models/repositories/user-list.ts
@@ -22,34 +22,3 @@ export class UserListRepository extends Repository<UserList> {
};
}
}
-
-export const packedUserListSchema = {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- userIds: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- items: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- format: 'id',
- },
- },
- },
-};
diff --git a/packages/backend/src/models/repositories/user.ts b/packages/backend/src/models/repositories/user.ts
index 3dc7c67ec2..2b8398832d 100644
--- a/packages/backend/src/models/repositories/user.ts
+++ b/packages/backend/src/models/repositories/user.ts
@@ -4,11 +4,19 @@ import { User, ILocalUser, IRemoteUser } from '@/models/entities/user';
import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index';
import config from '@/config/index';
import { Packed } from '@/misc/schema';
-import { awaitAll } from '@/prelude/await-all';
+import { awaitAll, Promiseable } from '@/prelude/await-all';
import { populateEmojis } from '@/misc/populate-emojis';
import { getAntennas } from '@/misc/antenna-cache';
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const';
+type IsUserDetailed<Detailed extends boolean> = Detailed extends true ? Packed<'UserDetailed'> : Packed<'UserLite'>;
+type IsMeAndIsUserDetailed<ExpectsMe extends boolean | null, Detailed extends boolean> =
+ Detailed extends true ?
+ ExpectsMe extends true ? Packed<'MeDetailed'> :
+ ExpectsMe extends false ? Packed<'UserDetailedNotMe'> :
+ Packed<'UserDetailed'> :
+ Packed<'UserLite'>;
+
@EntityRepository(User)
export class UserRepository extends Repository<User> {
public async getRelation(me: User['id'], target: User['id']) {
@@ -144,7 +152,7 @@ export class UserRepository extends Repository<User> {
return count > 0;
}
- public getOnlineStatus(user: User): string {
+ public getOnlineStatus(user: User): 'unknown' | 'online' | 'active' | 'offline' {
if (user.hideOnlineStatus) return 'unknown';
if (user.lastActiveDate == null) return 'unknown';
const elapsed = Date.now() - user.lastActiveDate.getTime();
@@ -159,18 +167,18 @@ export class UserRepository extends Repository<User> {
if (user.avatarUrl) {
return user.avatarUrl;
} else {
- return `${config.url}/random-avatar/${user.id}`;
+ return `${config.url}/identicon/${user.id}`;
}
}
- public async pack(
+ public async pack<ExpectsMe extends boolean | null = null, D extends boolean = false>(
src: User['id'] | User,
me?: { id: User['id'] } | null | undefined,
options?: {
- detail?: boolean,
+ detail?: D,
includeSecrets?: boolean,
}
- ): Promise<Packed<'User'>> {
+ ): Promise<IsMeAndIsUserDetailed<ExpectsMe, D>> {
const opts = Object.assign({
detail: false,
includeSecrets: false,
@@ -178,8 +186,9 @@ export class UserRepository extends Repository<User> {
const user = typeof src === 'object' ? src : await this.findOneOrFail(src);
const meId = me ? me.id : null;
+ const isMe = meId === user.id;
- const relation = meId && (meId !== user.id) && opts.detail ? await this.getRelation(meId, user.id) : null;
+ const relation = meId && !isMe && opts.detail ? await this.getRelation(meId, user.id) : null;
const pins = opts.detail ? await UserNotePinings.createQueryBuilder('pin')
.where('pin.userId = :userId', { userId: user.id })
.innerJoinAndSelect('pin.note', 'note')
@@ -188,12 +197,12 @@ export class UserRepository extends Repository<User> {
const profile = opts.detail ? await UserProfiles.findOneOrFail(user.id) : null;
const followingCount = profile == null ? null :
- (profile.ffVisibility === 'public') || (meId === user.id) ? user.followingCount :
+ (profile.ffVisibility === 'public') || isMe ? user.followingCount :
(profile.ffVisibility === 'followers') && (relation && relation.isFollowing) ? user.followingCount :
null;
const followersCount = profile == null ? null :
- (profile.ffVisibility === 'public') || (meId === user.id) ? user.followersCount :
+ (profile.ffVisibility === 'public') || isMe ? user.followersCount :
(profile.ffVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount :
null;
@@ -227,12 +236,11 @@ export class UserRepository extends Repository<User> {
uri: user.uri,
createdAt: user.createdAt.toISOString(),
updatedAt: user.updatedAt ? user.updatedAt.toISOString() : null,
- lastFetchedAt: user.lastFetchedAt?.toISOString(),
+ lastFetchedAt: user.lastFetchedAt ? user.lastFetchedAt.toISOString() : null,
bannerUrl: user.bannerUrl,
bannerBlurhash: user.bannerBlurhash,
bannerColor: null, // 後方互換性のため
isLocked: user.isLocked,
- isModerator: user.isModerator || falsy,
isSilenced: user.isSilenced || falsy,
isSuspended: user.isSuspended || falsy,
description: profile!.description,
@@ -260,7 +268,7 @@ export class UserRepository extends Repository<User> {
: false,
} : {}),
- ...(opts.detail && meId === user.id ? {
+ ...(opts.detail && isMe ? {
avatarId: user.avatarId,
bannerId: user.bannerId,
injectFeaturedNote: profile!.injectFeaturedNote,
@@ -315,19 +323,19 @@ export class UserRepository extends Repository<User> {
isBlocked: relation.isBlocked,
isMuted: relation.isMuted,
} : {}),
- };
+ } as Promiseable<Packed<'User'>> as Promiseable<IsMeAndIsUserDetailed<ExpectsMe, D>>;
return await awaitAll(packed);
}
- public packMany(
+ public packMany<D extends boolean = false>(
users: (User['id'] | User)[],
me?: { id: User['id'] } | null | undefined,
options?: {
- detail?: boolean,
+ detail?: D,
includeSecrets?: boolean,
}
- ) {
+ ): Promise<IsUserDetailed<D>[]> {
return Promise.all(users.map(u => this.pack(u, me, options)));
}
@@ -352,313 +360,3 @@ export class UserRepository extends Repository<User> {
public validateBirthday = $.str.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/);
//#endregion
}
-
-export const packedUserSchema = {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
- properties: {
- id: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- format: 'id',
- example: 'xxxxxxxxxx',
- },
- name: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
- example: '藍',
- },
- username: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- example: 'ai',
- },
- host: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
- example: 'misskey.example.com',
- },
- avatarUrl: {
- type: 'string' as const,
- format: 'url',
- nullable: true as const, optional: false as const,
- },
- avatarBlurhash: {
- type: 'any' as const,
- nullable: true as const, optional: false as const,
- },
- avatarColor: {
- type: 'any' as const,
- nullable: true as const, optional: false as const,
- default: null,
- },
- isAdmin: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- default: false,
- },
- isModerator: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- default: false,
- },
- isBot: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- isCat: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- emojis: {
- type: 'array' as const,
- nullable: false as const, optional: false as const,
- items: {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
- properties: {
- name: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- },
- url: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- format: 'url',
- },
- },
- },
- },
- url: {
- type: 'string' as const,
- format: 'url',
- nullable: true as const, optional: true as const,
- },
- createdAt: {
- type: 'string' as const,
- nullable: false as const, optional: true as const,
- format: 'date-time',
- },
- updatedAt: {
- type: 'string' as const,
- nullable: true as const, optional: true as const,
- format: 'date-time',
- },
- bannerUrl: {
- type: 'string' as const,
- format: 'url',
- nullable: true as const, optional: true as const,
- },
- bannerBlurhash: {
- type: 'any' as const,
- nullable: true as const, optional: true as const,
- },
- bannerColor: {
- type: 'any' as const,
- nullable: true as const, optional: true as const,
- default: null,
- },
- isLocked: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- isSuspended: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- example: false,
- },
- description: {
- type: 'string' as const,
- nullable: true as const, optional: true as const,
- example: 'Hi masters, I am Ai!',
- },
- location: {
- type: 'string' as const,
- nullable: true as const, optional: true as const,
- },
- birthday: {
- type: 'string' as const,
- nullable: true as const, optional: true as const,
- example: '2018-03-12',
- },
- fields: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- items: {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
- properties: {
- name: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- },
- value: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- },
- },
- maxLength: 4,
- },
- },
- followersCount: {
- type: 'number' as const,
- nullable: false as const, optional: true as const,
- },
- followingCount: {
- type: 'number' as const,
- nullable: false as const, optional: true as const,
- },
- notesCount: {
- type: 'number' as const,
- nullable: false as const, optional: true as const,
- },
- pinnedNoteIds: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- items: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
- format: 'id',
- },
- },
- pinnedNotes: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- items: {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
- ref: 'Note' as const,
- },
- },
- pinnedPageId: {
- type: 'string' as const,
- nullable: true as const, optional: true as const,
- },
- pinnedPage: {
- type: 'object' as const,
- nullable: true as const, optional: true as const,
- ref: 'Page' as const,
- },
- twoFactorEnabled: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- default: false,
- },
- usePasswordLessLogin: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- default: false,
- },
- securityKeys: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- default: false,
- },
- avatarId: {
- type: 'string' as const,
- nullable: true as const, optional: true as const,
- format: 'id',
- },
- bannerId: {
- type: 'string' as const,
- nullable: true as const, optional: true as const,
- format: 'id',
- },
- autoWatch: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- injectFeaturedNote: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- alwaysMarkNsfw: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- carefulBot: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- autoAcceptFollowed: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasUnreadSpecifiedNotes: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasUnreadMentions: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasUnreadAnnouncement: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasUnreadAntenna: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasUnreadChannel: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasUnreadMessagingMessage: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasUnreadNotification: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- hasPendingReceivedFollowRequest: {
- type: 'boolean' as const,
- nullable: false as const, optional: true as const,
- },
- integrations: {
- type: 'object' as const,
- nullable: false as const, optional: true as const,
- },
- mutedWords: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- },
- mutedInstances: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- },
- mutingNotificationTypes: {
- type: 'array' as const,
- nullable: false as const, optional: true as const,
- },
- isFollowing: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- hasPendingFollowRequestFromYou: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- hasPendingFollowRequestToYou: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- isFollowed: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- isBlocking: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- isBlocked: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- isMuted: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
- },
- },
-};
diff --git a/packages/backend/src/models/schema/antenna.ts b/packages/backend/src/models/schema/antenna.ts
new file mode 100644
index 0000000000..9cf522802c
--- /dev/null
+++ b/packages/backend/src/models/schema/antenna.ts
@@ -0,0 +1,89 @@
+export const packedAntennaSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ keywords: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ },
+ excludeKeywords: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ },
+ src: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['home', 'all', 'users', 'list', 'group'],
+ },
+ userListId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ userGroupId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ users: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ caseSensitive: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ default: false,
+ },
+ notify: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ withReplies: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ default: false,
+ },
+ withFile: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ hasUnreadNote: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ default: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/app.ts b/packages/backend/src/models/schema/app.ts
new file mode 100644
index 0000000000..c80dc81c33
--- /dev/null
+++ b/packages/backend/src/models/schema/app.ts
@@ -0,0 +1,33 @@
+export const packedAppSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ callbackUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ permission: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ secret: {
+ type: 'string',
+ optional: true, nullable: false,
+ },
+ isAuthorized: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/blocking.ts b/packages/backend/src/models/schema/blocking.ts
new file mode 100644
index 0000000000..5532322420
--- /dev/null
+++ b/packages/backend/src/models/schema/blocking.ts
@@ -0,0 +1,26 @@
+export const packedBlockingSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ blockeeId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ blockee: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/channel.ts b/packages/backend/src/models/schema/channel.ts
new file mode 100644
index 0000000000..7f4f2a48b8
--- /dev/null
+++ b/packages/backend/src/models/schema/channel.ts
@@ -0,0 +1,51 @@
+export const packedChannelSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ lastNotedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ description: {
+ type: 'string',
+ nullable: true, optional: false,
+ },
+ bannerUrl: {
+ type: 'string',
+ format: 'url',
+ nullable: true, optional: false,
+ },
+ notesCount: {
+ type: 'number',
+ nullable: false, optional: false,
+ },
+ usersCount: {
+ type: 'number',
+ nullable: false, optional: false,
+ },
+ isFollowing: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ nullable: true, optional: false,
+ format: 'id',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/clip.ts b/packages/backend/src/models/schema/clip.ts
new file mode 100644
index 0000000000..f0ee2ce0c4
--- /dev/null
+++ b/packages/backend/src/models/schema/clip.ts
@@ -0,0 +1,38 @@
+export const packedClipSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ description: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ isPublic: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/drive-file.ts b/packages/backend/src/models/schema/drive-file.ts
new file mode 100644
index 0000000000..4359076612
--- /dev/null
+++ b/packages/backend/src/models/schema/drive-file.ts
@@ -0,0 +1,107 @@
+export const packedDriveFileSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ example: 'lenna.jpg',
+ },
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ example: 'image/jpeg',
+ },
+ md5: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'md5',
+ example: '15eca7fba0480996e2245f5185bf39f2',
+ },
+ size: {
+ type: 'number',
+ optional: false, nullable: false,
+ example: 51469,
+ },
+ isSensitive: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ blurhash: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ properties: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ width: {
+ type: 'number',
+ optional: true, nullable: false,
+ example: 1280,
+ },
+ height: {
+ type: 'number',
+ optional: true, nullable: false,
+ example: 720,
+ },
+ orientation: {
+ type: 'number',
+ optional: true, nullable: false,
+ example: 8,
+ },
+ avgColor: {
+ type: 'string',
+ optional: true, nullable: false,
+ example: 'rgb(40,65,87)',
+ },
+ },
+ },
+ url: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'url',
+ },
+ thumbnailUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'url',
+ },
+ comment: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ folderId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ folder: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'DriveFolder',
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ user: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'UserLite',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/drive-folder.ts b/packages/backend/src/models/schema/drive-folder.ts
new file mode 100644
index 0000000000..88cb8ab4a2
--- /dev/null
+++ b/packages/backend/src/models/schema/drive-folder.ts
@@ -0,0 +1,39 @@
+export const packedDriveFolderSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ foldersCount: {
+ type: 'number',
+ optional: true, nullable: false,
+ },
+ filesCount: {
+ type: 'number',
+ optional: true, nullable: false,
+ },
+ parentId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ parent: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'DriveFolder',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/emoji.ts b/packages/backend/src/models/schema/emoji.ts
new file mode 100644
index 0000000000..5f9af88db4
--- /dev/null
+++ b/packages/backend/src/models/schema/emoji.ts
@@ -0,0 +1,36 @@
+export const packedEmojiSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ aliases: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ category: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ host: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ url: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/federation-instance.ts b/packages/backend/src/models/schema/federation-instance.ts
new file mode 100644
index 0000000000..eef2f9e24f
--- /dev/null
+++ b/packages/backend/src/models/schema/federation-instance.ts
@@ -0,0 +1,105 @@
+import config from "@/config";
+
+export const packedFederationInstanceSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ caughtAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ host: {
+ type: 'string',
+ optional: false, nullable: false,
+ example: 'misskey.example.com',
+ },
+ usersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ notesCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ followingCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ followersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ driveUsage: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ driveFiles: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ latestRequestSentAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ lastCommunicatedAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ isNotResponding: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ isSuspended: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ softwareName: {
+ type: 'string',
+ optional: false, nullable: true,
+ example: 'misskey',
+ },
+ softwareVersion: {
+ type: 'string',
+ optional: false, nullable: true,
+ example: config.version,
+ },
+ openRegistrations: {
+ type: 'boolean',
+ optional: false, nullable: true,
+ example: true,
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ description: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ maintainerName: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ maintainerEmail: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ iconUrl: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'url',
+ },
+ infoUpdatedAt: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'date-time',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/following.ts b/packages/backend/src/models/schema/following.ts
new file mode 100644
index 0000000000..2bcffbfc4d
--- /dev/null
+++ b/packages/backend/src/models/schema/following.ts
@@ -0,0 +1,36 @@
+export const packedFollowingSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ followeeId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ followee: {
+ type: 'object',
+ optional: true, nullable: false,
+ ref: 'UserDetailed',
+ },
+ followerId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ follower: {
+ type: 'object',
+ optional: true, nullable: false,
+ ref: 'UserDetailed',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/gallery-post.ts b/packages/backend/src/models/schema/gallery-post.ts
new file mode 100644
index 0000000000..fc503d4a64
--- /dev/null
+++ b/packages/backend/src/models/schema/gallery-post.ts
@@ -0,0 +1,69 @@
+export const packedGalleryPostSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ updatedAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ title: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ description: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ fileIds: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ files: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'DriveFile',
+ },
+ },
+ tags: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ isSensitive: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/hashtag.ts b/packages/backend/src/models/schema/hashtag.ts
new file mode 100644
index 0000000000..98f8827640
--- /dev/null
+++ b/packages/backend/src/models/schema/hashtag.ts
@@ -0,0 +1,34 @@
+export const packedHashtagSchema = {
+ type: 'object',
+ properties: {
+ tag: {
+ type: 'string',
+ optional: false, nullable: false,
+ example: 'misskey',
+ },
+ mentionedUsersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ mentionedLocalUsersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ mentionedRemoteUsersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ attachedUsersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ attachedLocalUsersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ attachedRemoteUsersCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/messaging-message.ts b/packages/backend/src/models/schema/messaging-message.ts
new file mode 100644
index 0000000000..b1ffa45955
--- /dev/null
+++ b/packages/backend/src/models/schema/messaging-message.ts
@@ -0,0 +1,73 @@
+export const packedMessagingMessageSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: true, nullable: false,
+ },
+ text: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ fileId: {
+ type: 'string',
+ optional: true, nullable: true,
+ format: 'id',
+ },
+ file: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'DriveFile',
+ },
+ recipientId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ recipient: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'UserLite',
+ },
+ groupId: {
+ type: 'string',
+ optional: false, nullable: true,
+ format: 'id',
+ },
+ group: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'UserGroup',
+ },
+ isRead: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ },
+ reads: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/muting.ts b/packages/backend/src/models/schema/muting.ts
new file mode 100644
index 0000000000..d75a4fbfed
--- /dev/null
+++ b/packages/backend/src/models/schema/muting.ts
@@ -0,0 +1,26 @@
+export const packedMutingSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ muteeId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ mutee: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/note-favorite.ts b/packages/backend/src/models/schema/note-favorite.ts
new file mode 100644
index 0000000000..d133f7367d
--- /dev/null
+++ b/packages/backend/src/models/schema/note-favorite.ts
@@ -0,0 +1,26 @@
+export const packedNoteFavoriteSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ note: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'Note',
+ },
+ noteId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/note-reaction.ts b/packages/backend/src/models/schema/note-reaction.ts
new file mode 100644
index 0000000000..0d8fc5449b
--- /dev/null
+++ b/packages/backend/src/models/schema/note-reaction.ts
@@ -0,0 +1,25 @@
+export const packedNoteReactionSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ user: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
+ },
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/note.ts b/packages/backend/src/models/schema/note.ts
new file mode 100644
index 0000000000..cdf4b9a544
--- /dev/null
+++ b/packages/backend/src/models/schema/note.ts
@@ -0,0 +1,183 @@
+export const packedNoteSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ text: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ cw: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ replyId: {
+ type: 'string',
+ optional: true, nullable: true,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ renoteId: {
+ type: 'string',
+ optional: true, nullable: true,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ reply: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'Note',
+ },
+ renote: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'Note',
+ },
+ isHidden: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ },
+ visibility: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ mentions: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ visibleUserIds: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ fileIds: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ },
+ files: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'DriveFile',
+ },
+ },
+ tags: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ poll: {
+ type: 'object',
+ optional: true, nullable: true,
+ },
+ channelId: {
+ type: 'string',
+ optional: true, nullable: true,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ channel: {
+ type: 'object',
+ optional: true, nullable: true,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ },
+ },
+ },
+ localOnly: {
+ type: 'boolean',
+ optional: true, nullable: false,
+ },
+ emojis: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ url: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ },
+ },
+ },
+ reactions: {
+ type: 'object',
+ optional: false, nullable: false,
+ },
+ renoteCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ repliesCount: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ uri: {
+ type: 'string',
+ optional: true, nullable: false,
+ },
+ url: {
+ type: 'string',
+ optional: true, nullable: false,
+ },
+
+ myReaction: {
+ type: 'object',
+ optional: true, nullable: true,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/notification.ts b/packages/backend/src/models/schema/notification.ts
new file mode 100644
index 0000000000..f3c293c480
--- /dev/null
+++ b/packages/backend/src/models/schema/notification.ts
@@ -0,0 +1,66 @@
+import { notificationTypes } from "@/types";
+
+export const packedNotificationSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ isRead: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: [...notificationTypes],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: true, nullable: true,
+ },
+ userId: {
+ type: 'string',
+ optional: true, nullable: true,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: true, nullable: true,
+ },
+ reaction: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ choice: {
+ type: 'number',
+ optional: true, nullable: true,
+ },
+ invitation: {
+ type: 'object',
+ optional: true, nullable: true,
+ },
+ body: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ header: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ icon: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/page.ts b/packages/backend/src/models/schema/page.ts
new file mode 100644
index 0000000000..55ba3ce7f7
--- /dev/null
+++ b/packages/backend/src/models/schema/page.ts
@@ -0,0 +1,51 @@
+export const packedPageSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ updatedAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ title: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ summary: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ content: {
+ type: 'array',
+ optional: false, nullable: false,
+ },
+ variables: {
+ type: 'array',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/queue.ts b/packages/backend/src/models/schema/queue.ts
new file mode 100644
index 0000000000..7ceeda26af
--- /dev/null
+++ b/packages/backend/src/models/schema/queue.ts
@@ -0,0 +1,25 @@
+export const packedQueueCountSchema = {
+ type: 'object',
+ properties: {
+ waiting: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ active: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ completed: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ failed: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ delayed: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/user-group.ts b/packages/backend/src/models/schema/user-group.ts
new file mode 100644
index 0000000000..a73bf82bb8
--- /dev/null
+++ b/packages/backend/src/models/schema/user-group.ts
@@ -0,0 +1,34 @@
+export const packedUserGroupSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ ownerId: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'id',
+ },
+ userIds: {
+ type: 'array',
+ nullable: false, optional: true,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'id',
+ },
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/user-list.ts b/packages/backend/src/models/schema/user-list.ts
new file mode 100644
index 0000000000..3ba5dc4a8a
--- /dev/null
+++ b/packages/backend/src/models/schema/user-list.ts
@@ -0,0 +1,29 @@
+export const packedUserListSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ userIds: {
+ type: 'array',
+ nullable: false, optional: true,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'id',
+ },
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/schema/user.ts b/packages/backend/src/models/schema/user.ts
new file mode 100644
index 0000000000..616bedc0dc
--- /dev/null
+++ b/packages/backend/src/models/schema/user.ts
@@ -0,0 +1,467 @@
+export const packedUserLiteSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ name: {
+ type: 'string',
+ nullable: true, optional: false,
+ example: '藍',
+ },
+ username: {
+ type: 'string',
+ nullable: false, optional: false,
+ example: 'ai',
+ },
+ host: {
+ type: 'string',
+ nullable: true, optional: false,
+ example: 'misskey.example.com',
+ },
+ avatarUrl: {
+ type: 'string',
+ format: 'url',
+ nullable: true, optional: false,
+ },
+ avatarBlurhash: {
+ type: 'any',
+ nullable: true, optional: false,
+ },
+ avatarColor: {
+ type: 'any',
+ nullable: true, optional: false,
+ default: null,
+ },
+ isAdmin: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ default: false,
+ },
+ isModerator: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ default: false,
+ },
+ isBot: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ isCat: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ emojis: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ type: 'object',
+ nullable: false, optional: false,
+ properties: {
+ name: {
+ type: 'string',
+ nullable: false, optional: false,
+ },
+ url: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'url',
+ },
+ },
+ },
+ },
+ onlineStatus: {
+ type: 'string',
+ format: 'url',
+ nullable: true, optional: false,
+ enum: ['unknown', 'online', 'active', 'offline'],
+ },
+ },
+} as const;
+
+export const packedUserDetailedNotMeOnlySchema = {
+ type: 'object',
+ properties: {
+ url: {
+ type: 'string',
+ format: 'url',
+ nullable: true, optional: false,
+ },
+ uri: {
+ type: 'string',
+ format: 'uri',
+ nullable: true, optional: false,
+ },
+ createdAt: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'date-time',
+ },
+ updatedAt: {
+ type: 'string',
+ nullable: true, optional: false,
+ format: 'date-time',
+ },
+ lastFetchedAt: {
+ type: 'string',
+ nullable: true, optional: false,
+ format: 'date-time',
+ },
+ bannerUrl: {
+ type: 'string',
+ format: 'url',
+ nullable: true, optional: false,
+ },
+ bannerBlurhash: {
+ type: 'any',
+ nullable: true, optional: false,
+ },
+ bannerColor: {
+ type: 'any',
+ nullable: true, optional: false,
+ default: null,
+ },
+ isLocked: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ isSilenced: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ isSuspended: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ example: false,
+ },
+ description: {
+ type: 'string',
+ nullable: true, optional: false,
+ example: 'Hi masters, I am Ai!',
+ },
+ location: {
+ type: 'string',
+ nullable: true, optional: false,
+ },
+ birthday: {
+ type: 'string',
+ nullable: true, optional: false,
+ example: '2018-03-12',
+ },
+ lang: {
+ type: 'string',
+ nullable: true, optional: false,
+ example: 'ja-JP',
+ },
+ fields: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ type: 'object',
+ nullable: false, optional: false,
+ properties: {
+ name: {
+ type: 'string',
+ nullable: false, optional: false,
+ },
+ value: {
+ type: 'string',
+ nullable: false, optional: false,
+ },
+ },
+ maxLength: 4,
+ },
+ },
+ followersCount: {
+ type: 'number',
+ nullable: false, optional: false,
+ },
+ followingCount: {
+ type: 'number',
+ nullable: false, optional: false,
+ },
+ notesCount: {
+ type: 'number',
+ nullable: false, optional: false,
+ },
+ pinnedNoteIds: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ format: 'id',
+ },
+ },
+ pinnedNotes: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ type: 'object',
+ nullable: false, optional: false,
+ ref: 'Note',
+ },
+ },
+ pinnedPageId: {
+ type: 'string',
+ nullable: true, optional: false,
+ },
+ pinnedPage: {
+ type: 'object',
+ nullable: true, optional: false,
+ ref: 'Page',
+ },
+ publicReactions: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ twoFactorEnabled: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ default: false,
+ },
+ usePasswordLessLogin: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ default: false,
+ },
+ securityKeys: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ default: false,
+ },
+ //#region relations
+ isFollowing: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ isFollowed: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ hasPendingFollowRequestFromYou: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ hasPendingFollowRequestToYou: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ isBlocking: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ isBlocked: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ isMuted: {
+ type: 'boolean',
+ nullable: false, optional: true,
+ },
+ //#endregion
+ },
+} as const;
+
+export const packedMeDetailedOnlySchema = {
+ type: 'object',
+ properties: {
+ avatarId: {
+ type: 'string',
+ nullable: true, optional: false,
+ format: 'id',
+ },
+ bannerId: {
+ type: 'string',
+ nullable: true, optional: false,
+ format: 'id',
+ },
+ injectFeaturedNote: {
+ type: 'boolean',
+ nullable: true, optional: false,
+ },
+ receiveAnnouncementEmail: {
+ type: 'boolean',
+ nullable: true, optional: false,
+ },
+ alwaysMarkNsfw: {
+ type: 'boolean',
+ nullable: true, optional: false,
+ },
+ carefulBot: {
+ type: 'boolean',
+ nullable: true, optional: false,
+ },
+ autoAcceptFollowed: {
+ type: 'boolean',
+ nullable: true, optional: false,
+ },
+ noCrawle: {
+ type: 'boolean',
+ nullable: true, optional: false,
+ },
+ isExplorable: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ isDeleted: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hideOnlineStatus: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasUnreadSpecifiedNotes: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasUnreadMentions: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasUnreadAnnouncement: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasUnreadAntenna: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasUnreadChannel: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasUnreadMessagingMessage: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasUnreadNotification: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ hasPendingReceivedFollowRequest: {
+ type: 'boolean',
+ nullable: false, optional: false,
+ },
+ integrations: {
+ type: 'object',
+ nullable: true, optional: false,
+ },
+ mutedWords: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ type: 'array',
+ nullable: false, optional: false,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ },
+ },
+ },
+ mutedInstances: {
+ type: 'array',
+ nullable: true, optional: false,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ },
+ },
+ mutingNotificationTypes: {
+ type: 'array',
+ nullable: true, optional: false,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ },
+ },
+ emailNotificationTypes: {
+ type: 'array',
+ nullable: true, optional: false,
+ items: {
+ type: 'string',
+ nullable: false, optional: false,
+ },
+ },
+ //#region secrets
+ email: {
+ type: 'string',
+ nullable: true, optional: true,
+ },
+ emailVerified: {
+ type: 'boolean',
+ nullable: true, optional: true,
+ },
+ securityKeysList: {
+ type: 'array',
+ nullable: false, optional: true,
+ items: {
+ type: 'object',
+ nullable: false, optional: false,
+ },
+ },
+ //#endregion
+ },
+} as const;
+
+export const packedUserDetailedNotMeSchema = {
+ type: 'object',
+ allOf: [
+ {
+ type: 'object',
+ ref: 'UserLite',
+ },
+ {
+ type: 'object',
+ ref: 'UserDetailedNotMeOnly',
+ },
+ ],
+} as const;
+
+export const packedMeDetailedSchema = {
+ type: 'object',
+ allOf: [
+ {
+ type: 'object',
+ ref: 'UserLite',
+ },
+ {
+ type: 'object',
+ ref: 'UserDetailedNotMeOnly',
+ },
+ {
+ type: 'object',
+ ref: 'MeDetailedOnly',
+ },
+ ],
+} as const;
+
+export const packedUserDetailedSchema = {
+ oneOf: [
+ {
+ type: 'object',
+ ref: 'UserDetailedNotMe',
+ },
+ {
+ type: 'object',
+ ref: 'MeDetailed',
+ },
+ ],
+} as const;
+
+export const packedUserSchema = {
+ oneOf: [
+ {
+ type: 'object',
+ ref: 'UserLite',
+ },
+ {
+ type: 'object',
+ ref: 'UserDetailed',
+ },
+ ],
+} as const;
diff --git a/packages/backend/src/prelude/await-all.ts b/packages/backend/src/prelude/await-all.ts
index 24795f3ae5..b955c3a5d8 100644
--- a/packages/backend/src/prelude/await-all.ts
+++ b/packages/backend/src/prelude/await-all.ts
@@ -1,13 +1,11 @@
-type Await<T> = T extends Promise<infer U> ? U : T;
-
-type AwaitAll<T> = {
- [P in keyof T]: Await<T[P]>;
+export type Promiseable<T> = {
+ [K in keyof T]: Promise<T[K]> | T[K];
};
-export async function awaitAll<T>(obj: T): Promise<AwaitAll<T>> {
- const target = {} as any;
- const keys = Object.keys(obj);
- const values = Object.values(obj);
+export async function awaitAll<T>(obj: Promiseable<T>): Promise<T> {
+ const target = {} as T;
+ const keys = Object.keys(obj) as unknown as (keyof T)[];
+ const values = Object.values(obj) as any[];
const resolvedValues = await Promise.all(values.map(value =>
(!value || !value.constructor || value.constructor.name !== 'Object')
diff --git a/packages/backend/src/queue/index.ts b/packages/backend/src/queue/index.ts
index 2fbc1b1c01..f9994c3b59 100644
--- a/packages/backend/src/queue/index.ts
+++ b/packages/backend/src/queue/index.ts
@@ -213,6 +213,16 @@ export function createImportUserListsJob(user: ThinUser, fileId: DriveFile['id']
});
}
+export function createImportCustomEmojisJob(user: ThinUser, fileId: DriveFile['id']) {
+ return dbQueue.add('importCustomEmojis', {
+ user: user,
+ fileId: fileId,
+ }, {
+ removeOnComplete: true,
+ removeOnFail: true,
+ });
+}
+
export function createDeleteAccountJob(user: ThinUser, opts: { soft?: boolean; } = {}) {
return dbQueue.add('deleteAccount', {
user: user,
diff --git a/packages/backend/src/queue/processors/db/export-blocking.ts b/packages/backend/src/queue/processors/db/export-blocking.ts
index 8c886d3b4e..01edaaeb63 100644
--- a/packages/backend/src/queue/processors/db/export-blocking.ts
+++ b/packages/backend/src/queue/processors/db/export-blocking.ts
@@ -3,7 +3,7 @@ import * as tmp from 'tmp';
import * as fs from 'fs';
import { queueLogger } from '../../logger';
-import addFile from '@/services/drive/add-file';
+import { addFile } from '@/services/drive/add-file';
import * as dateFormat from 'dateformat';
import { getFullApAccount } from '@/misc/convert-host';
import { Users, Blockings } from '@/models/index';
@@ -86,7 +86,7 @@ export async function exportBlocking(job: Bull.Job<DbUserJobData>, done: any): P
logger.succ(`Exported to: ${path}`);
const fileName = 'blocking-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
- const driveFile = await addFile(user, path, fileName, null, null, true);
+ const driveFile = await addFile({ user, path, name: fileName, force: true });
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
diff --git a/packages/backend/src/queue/processors/db/export-custom-emojis.ts b/packages/backend/src/queue/processors/db/export-custom-emojis.ts
index 3930b9d6d4..240a542fec 100644
--- a/packages/backend/src/queue/processors/db/export-custom-emojis.ts
+++ b/packages/backend/src/queue/processors/db/export-custom-emojis.ts
@@ -6,11 +6,12 @@ import { ulid } from 'ulid';
const mime = require('mime-types');
const archiver = require('archiver');
import { queueLogger } from '../../logger';
-import addFile from '@/services/drive/add-file';
+import { addFile } from '@/services/drive/add-file';
import * as dateFormat from 'dateformat';
import { Users, Emojis } from '@/models/index';
import { } from '@/queue/types';
import { downloadUrl } from '@/misc/download-url';
+import config from '@/config/index';
const logger = queueLogger.createSubLogger('export-custom-emojis');
@@ -52,7 +53,7 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi
});
};
- await writeMeta(`{"metaVersion":1,"emojis":[`);
+ await writeMeta(`{"metaVersion":2,"host":"${config.host}","exportedAt":"${new Date().toString()}","emojis":[`);
const customEmojis = await Emojis.find({
where: {
@@ -64,21 +65,25 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi
});
for (const emoji of customEmojis) {
- const exportId = ulid().toLowerCase();
const ext = mime.extension(emoji.type);
- const emojiPath = path + '/' + exportId + (ext ? '.' + ext : '');
+ const fileName = emoji.name + (ext ? '.' + ext : '');
+ const emojiPath = path + '/' + fileName;
fs.writeFileSync(emojiPath, '', 'binary');
let downloaded = false;
try {
- await downloadUrl(emoji.url, emojiPath);
+ await downloadUrl(emoji.originalUrl, emojiPath);
downloaded = true;
} catch (e) { // TODO: 何度か再試行
logger.error(e);
}
+ if (!downloaded) {
+ fs.unlinkSync(emojiPath);
+ }
+
const content = JSON.stringify({
- id: exportId,
+ fileName: fileName,
downloaded: downloaded,
emoji: emoji,
});
@@ -106,7 +111,7 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi
logger.succ(`Exported to: ${archivePath}`);
const fileName = 'custom-emojis-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.zip';
- const driveFile = await addFile(user, archivePath, fileName, null, null, true);
+ const driveFile = await addFile({ user, path: archivePath, name: fileName, force: true });
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
diff --git a/packages/backend/src/queue/processors/db/export-following.ts b/packages/backend/src/queue/processors/db/export-following.ts
index fbb9e25247..06572acec1 100644
--- a/packages/backend/src/queue/processors/db/export-following.ts
+++ b/packages/backend/src/queue/processors/db/export-following.ts
@@ -3,7 +3,7 @@ import * as tmp from 'tmp';
import * as fs from 'fs';
import { queueLogger } from '../../logger';
-import addFile from '@/services/drive/add-file';
+import { addFile } from '@/services/drive/add-file';
import * as dateFormat from 'dateformat';
import { getFullApAccount } from '@/misc/convert-host';
import { Users, Followings, Mutings } from '@/models/index';
@@ -87,7 +87,7 @@ export async function exportFollowing(job: Bull.Job<DbUserJobData>, done: () =>
logger.succ(`Exported to: ${path}`);
const fileName = 'following-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
- const driveFile = await addFile(user, path, fileName, null, null, true);
+ const driveFile = await addFile({ user, path, name: fileName, force: true });
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
diff --git a/packages/backend/src/queue/processors/db/export-mute.ts b/packages/backend/src/queue/processors/db/export-mute.ts
index 0b1fd24fe0..4a856f8ef9 100644
--- a/packages/backend/src/queue/processors/db/export-mute.ts
+++ b/packages/backend/src/queue/processors/db/export-mute.ts
@@ -3,7 +3,7 @@ import * as tmp from 'tmp';
import * as fs from 'fs';
import { queueLogger } from '../../logger';
-import addFile from '@/services/drive/add-file';
+import { addFile } from '@/services/drive/add-file';
import * as dateFormat from 'dateformat';
import { getFullApAccount } from '@/misc/convert-host';
import { Users, Mutings } from '@/models/index';
@@ -86,7 +86,7 @@ export async function exportMute(job: Bull.Job<DbUserJobData>, done: any): Promi
logger.succ(`Exported to: ${path}`);
const fileName = 'mute-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
- const driveFile = await addFile(user, path, fileName, null, null, true);
+ const driveFile = await addFile({ user, path, name: fileName, force: true });
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
diff --git a/packages/backend/src/queue/processors/db/export-notes.ts b/packages/backend/src/queue/processors/db/export-notes.ts
index e64e763513..305abf44cf 100644
--- a/packages/backend/src/queue/processors/db/export-notes.ts
+++ b/packages/backend/src/queue/processors/db/export-notes.ts
@@ -3,7 +3,7 @@ import * as tmp from 'tmp';
import * as fs from 'fs';
import { queueLogger } from '../../logger';
-import addFile from '@/services/drive/add-file';
+import { addFile } from '@/services/drive/add-file';
import * as dateFormat from 'dateformat';
import { Users, Notes, Polls } from '@/models/index';
import { MoreThan } from 'typeorm';
@@ -95,7 +95,7 @@ export async function exportNotes(job: Bull.Job<DbUserJobData>, done: any): Prom
logger.succ(`Exported to: ${path}`);
const fileName = 'notes-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.json';
- const driveFile = await addFile(user, path, fileName, null, null, true);
+ const driveFile = await addFile({ user, path, name: fileName, force: true });
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
diff --git a/packages/backend/src/queue/processors/db/export-user-lists.ts b/packages/backend/src/queue/processors/db/export-user-lists.ts
index 44a8f9f671..f907cf9526 100644
--- a/packages/backend/src/queue/processors/db/export-user-lists.ts
+++ b/packages/backend/src/queue/processors/db/export-user-lists.ts
@@ -3,7 +3,7 @@ import * as tmp from 'tmp';
import * as fs from 'fs';
import { queueLogger } from '../../logger';
-import addFile from '@/services/drive/add-file';
+import { addFile } from '@/services/drive/add-file';
import * as dateFormat from 'dateformat';
import { getFullApAccount } from '@/misc/convert-host';
import { Users, UserLists, UserListJoinings } from '@/models/index';
@@ -63,7 +63,7 @@ export async function exportUserLists(job: Bull.Job<DbUserJobData>, done: any):
logger.succ(`Exported to: ${path}`);
const fileName = 'user-lists-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
- const driveFile = await addFile(user, path, fileName, null, null, true);
+ const driveFile = await addFile({ user, path, name: fileName, force: true });
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
diff --git a/packages/backend/src/queue/processors/db/import-custom-emojis.ts b/packages/backend/src/queue/processors/db/import-custom-emojis.ts
new file mode 100644
index 0000000000..04e93671ed
--- /dev/null
+++ b/packages/backend/src/queue/processors/db/import-custom-emojis.ts
@@ -0,0 +1,85 @@
+import * as Bull from 'bull';
+import * as tmp from 'tmp';
+import * as fs from 'fs';
+const unzipper = require('unzipper');
+import { getConnection } from 'typeorm';
+
+import { queueLogger } from '../../logger';
+import { downloadUrl } from '@/misc/download-url';
+import { DriveFiles, Emojis } from '@/models/index';
+import { DbUserImportJobData } from '@/queue/types';
+import { addFile } from '@/services/drive/add-file';
+import { genId } from '@/misc/gen-id';
+
+const logger = queueLogger.createSubLogger('import-custom-emojis');
+
+// TODO: 名前衝突時の動作を選べるようにする
+export async function importCustomEmojis(job: Bull.Job<DbUserImportJobData>, done: any): Promise<void> {
+ logger.info(`Importing custom emojis ...`);
+
+ const file = await DriveFiles.findOne({
+ id: job.data.fileId,
+ });
+ if (file == null) {
+ done();
+ return;
+ }
+
+ // Create temp dir
+ const [path, cleanup] = await new Promise<[string, () => void]>((res, rej) => {
+ tmp.dir((e, path, cleanup) => {
+ if (e) return rej(e);
+ res([path, cleanup]);
+ });
+ });
+
+ logger.info(`Temp dir is ${path}`);
+
+ const destPath = path + '/emojis.zip';
+
+ try {
+ fs.writeFileSync(destPath, '', 'binary');
+ await downloadUrl(file.url, destPath);
+ } catch (e) { // TODO: 何度か再試行
+ logger.error(e);
+ throw e;
+ }
+
+ const outputPath = path + '/emojis';
+ const unzipStream = fs.createReadStream(destPath);
+ const extractor = unzipper.Extract({ path: outputPath });
+ extractor.on('close', async () => {
+ const metaRaw = fs.readFileSync(outputPath + '/meta.json', 'utf-8');
+ const meta = JSON.parse(metaRaw);
+
+ for (const record of meta.emojis) {
+ if (!record.downloaded) continue;
+ const emojiInfo = record.emoji;
+ const emojiPath = outputPath + '/' + record.fileName;
+ await Emojis.delete({
+ name: emojiInfo.name,
+ });
+ const driveFile = await addFile({ user: null, path: emojiPath, name: record.fileName, force: true });
+ const emoji = await Emojis.insert({
+ id: genId(),
+ updatedAt: new Date(),
+ name: emojiInfo.name,
+ category: emojiInfo.category,
+ host: null,
+ aliases: emojiInfo.aliases,
+ originalUrl: driveFile.url,
+ publicUrl: driveFile.webpublicUrl ?? driveFile.url,
+ type: driveFile.webpublicType ?? driveFile.type,
+ }).then(x => Emojis.findOneOrFail(x.identifiers[0]));
+ }
+
+ await getConnection().queryResultCache!.remove(['meta_emojis']);
+
+ cleanup();
+
+ logger.succ('Imported');
+ done();
+ });
+ unzipStream.pipe(extractor);
+ logger.succ(`Unzipping to ${outputPath}`);
+}
diff --git a/packages/backend/src/queue/processors/db/import-user-lists.ts b/packages/backend/src/queue/processors/db/import-user-lists.ts
index 8245010de0..e060e86dd8 100644
--- a/packages/backend/src/queue/processors/db/import-user-lists.ts
+++ b/packages/backend/src/queue/processors/db/import-user-lists.ts
@@ -46,13 +46,13 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
});
if (list == null) {
- list = await UserLists.save({
+ list = await UserLists.insert({
id: genId(),
createdAt: new Date(),
userId: user.id,
name: listName,
userIds: [],
- });
+ }).then(x => UserLists.findOneOrFail(x.identifiers[0]));
}
let target = isSelfHost(host!) ? await Users.findOne({
diff --git a/packages/backend/src/queue/processors/db/index.ts b/packages/backend/src/queue/processors/db/index.ts
index 1542f401ef..5fffa378f5 100644
--- a/packages/backend/src/queue/processors/db/index.ts
+++ b/packages/backend/src/queue/processors/db/index.ts
@@ -12,6 +12,7 @@ import { importUserLists } from './import-user-lists';
import { deleteAccount } from './delete-account';
import { importMuting } from './import-muting';
import { importBlocking } from './import-blocking';
+import { importCustomEmojis } from './import-custom-emojis';
const jobs = {
deleteDriveFiles,
@@ -25,6 +26,7 @@ const jobs = {
importMuting,
importBlocking,
importUserLists,
+ importCustomEmojis,
deleteAccount,
} as Record<string, Bull.ProcessCallbackFunction<DbJobData> | Bull.ProcessPromiseFunction<DbJobData>>;
diff --git a/packages/backend/src/remote/activitypub/models/image.ts b/packages/backend/src/remote/activitypub/models/image.ts
index 902eb36a17..6f60b7827d 100644
--- a/packages/backend/src/remote/activitypub/models/image.ts
+++ b/packages/backend/src/remote/activitypub/models/image.ts
@@ -1,4 +1,4 @@
-import uploadFromUrl from '@/services/drive/upload-from-url';
+import { uploadFromUrl } from '@/services/drive/upload-from-url';
import { IRemoteUser } from '@/models/entities/user';
import Resolver from '../resolver';
import { fetchMeta } from '@/misc/fetch-meta';
@@ -28,9 +28,15 @@ export async function createImage(actor: IRemoteUser, value: any): Promise<Drive
logger.info(`Creating the Image: ${image.url}`);
const instance = await fetchMeta();
- const cache = instance.cacheRemoteFiles;
- let file = await uploadFromUrl(image.url, actor, null, image.url, image.sensitive, false, !cache, truncate(image.name, DB_MAX_IMAGE_COMMENT_LENGTH));
+ let file = await uploadFromUrl({
+ url: image.url,
+ user: actor,
+ uri: image.url,
+ sensitive: image.sensitive,
+ isLink: !instance.cacheRemoteFiles,
+ comment: truncate(image.name, DB_MAX_IMAGE_COMMENT_LENGTH)
+ });
if (file.isLink) {
// URLが異なっている場合、同じ画像が以前に異なるURLで登録されていたということなので、
diff --git a/packages/backend/src/remote/activitypub/models/note.ts b/packages/backend/src/remote/activitypub/models/note.ts
index cca054b52e..6847925a51 100644
--- a/packages/backend/src/remote/activitypub/models/note.ts
+++ b/packages/backend/src/remote/activitypub/models/note.ts
@@ -320,14 +320,15 @@ export async function extractEmojis(tags: IObject | IObject[], host: string): Pr
if ((tag.updated != null && exists.updatedAt == null)
|| (tag.id != null && exists.uri == null)
|| (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt)
- || (tag.icon!.url !== exists.url)
+ || (tag.icon!.url !== exists.originalUrl)
) {
await Emojis.update({
host,
name,
}, {
uri: tag.id,
- url: tag.icon!.url,
+ originalUrl: tag.icon!.url,
+ publicUrl: tag.icon!.url,
updatedAt: new Date(),
});
@@ -342,14 +343,15 @@ export async function extractEmojis(tags: IObject | IObject[], host: string): Pr
logger.info(`register emoji host=${host}, name=${name}`);
- return await Emojis.save({
+ return await Emojis.insert({
id: genId(),
host,
name,
uri: tag.id,
- url: tag.icon!.url,
+ originalUrl: tag.icon!.url,
+ publicUrl: tag.icon!.url,
updatedAt: new Date(),
aliases: [],
- } as Partial<Emoji>);
+ } as Partial<Emoji>).then(x => Emojis.findOneOrFail(x.identifiers[0]));
}));
}
diff --git a/packages/backend/src/remote/activitypub/renderer/emoji.ts b/packages/backend/src/remote/activitypub/renderer/emoji.ts
index 9d08c8ba81..e7ae7d959a 100644
--- a/packages/backend/src/remote/activitypub/renderer/emoji.ts
+++ b/packages/backend/src/remote/activitypub/renderer/emoji.ts
@@ -9,6 +9,6 @@ export default (emoji: Emoji) => ({
icon: {
type: 'Image',
mediaType: emoji.type || 'image/png',
- url: emoji.url,
+ url: emoji.publicUrl || emoji.originalUrl, // || emoji.originalUrl してるのは後方互換性のため
},
});
diff --git a/packages/backend/src/remote/activitypub/renderer/flag.ts b/packages/backend/src/remote/activitypub/renderer/flag.ts
new file mode 100644
index 0000000000..60ac496509
--- /dev/null
+++ b/packages/backend/src/remote/activitypub/renderer/flag.ts
@@ -0,0 +1,15 @@
+import config from '@/config/index';
+import { IObject, IActivity } from '@/remote/activitypub/type';
+import { ILocalUser, IRemoteUser } from '@/models/entities/user';
+import { getInstanceActor } from '@/services/instance-actor';
+
+// to anonymise reporters, the reporting actor must be a system user
+// object has to be a uri or array of uris
+export const renderFlag = (user: ILocalUser, object: [string], content: string): IActivity => {
+ return {
+ type: 'Flag',
+ actor: `${config.url}/users/${user.id}`,
+ content,
+ object,
+ };
+};
diff --git a/packages/backend/src/remote/activitypub/renderer/index.ts b/packages/backend/src/remote/activitypub/renderer/index.ts
index 911118e4c9..cffc9bfe04 100644
--- a/packages/backend/src/remote/activitypub/renderer/index.ts
+++ b/packages/backend/src/remote/activitypub/renderer/index.ts
@@ -32,7 +32,7 @@ export const renderActivity = (x: any): IActivity | null => {
PropertyValue: 'schema:PropertyValue',
value: 'schema:value',
// Misskey
- misskey: `${config.url}/ns#`,
+ misskey: 'https://misskey-hub.net/ns#',
'_misskey_content': 'misskey:_misskey_content',
'_misskey_quote': 'misskey:_misskey_quote',
'_misskey_reaction': 'misskey:_misskey_reaction',
diff --git a/packages/backend/src/remote/resolve-user.ts b/packages/backend/src/remote/resolve-user.ts
index df6226cc50..747735ecaa 100644
--- a/packages/backend/src/remote/resolve-user.ts
+++ b/packages/backend/src/remote/resolve-user.ts
@@ -37,7 +37,7 @@ export async function resolveUser(username: string, host: string | null, option?
});
}
- const user = await Users.findOne({ usernameLower, host }, option) as IRemoteUser;
+ const user = await Users.findOne({ usernameLower, host }, option) as IRemoteUser | null;
const acctLower = `${usernameLower}@${host}`;
diff --git a/packages/backend/src/server/activitypub.ts b/packages/backend/src/server/activitypub.ts
index da6a00e58e..bbbc231b8c 100644
--- a/packages/backend/src/server/activitypub.ts
+++ b/packages/backend/src/server/activitypub.ts
@@ -67,7 +67,7 @@ router.get('/notes/:note', async (ctx, next) => {
const note = await Notes.findOne({
id: ctx.params.note,
- visibility: In(['public', 'home']),
+ visibility: In(['public' as const, 'home' as const]),
localOnly: false,
});
@@ -96,7 +96,7 @@ router.get('/notes/:note/activity', async ctx => {
const note = await Notes.findOne({
id: ctx.params.note,
userHost: null,
- visibility: In(['public', 'home']),
+ visibility: In(['public' as const, 'home' as const]),
localOnly: false,
});
diff --git a/packages/backend/src/server/api/authenticate.ts b/packages/backend/src/server/api/authenticate.ts
index d33e9e3753..9e2f3eb743 100644
--- a/packages/backend/src/server/api/authenticate.ts
+++ b/packages/backend/src/server/api/authenticate.ts
@@ -10,7 +10,7 @@ export class AuthenticationError extends Error {
}
}
-export default async (token: string): Promise<[User | null | undefined, App | null | undefined]> => {
+export default async (token: string | null): Promise<[User | null | undefined, AccessToken | null | undefined]> => {
if (token == null) {
return [null, null];
}
diff --git a/packages/backend/src/server/api/call.ts b/packages/backend/src/server/api/call.ts
index 36aadb532b..399ee65bde 100644
--- a/packages/backend/src/server/api/call.ts
+++ b/packages/backend/src/server/api/call.ts
@@ -1,5 +1,5 @@
import { performance } from 'perf_hooks';
-import limiter from './limiter';
+import { limiter } from './limiter';
import { User } from '@/models/entities/user';
import endpoints from './endpoints';
import { ApiError } from './error';
diff --git a/packages/backend/src/server/api/common/signin.ts b/packages/backend/src/server/api/common/signin.ts
index b713260ac6..df986fc457 100644
--- a/packages/backend/src/server/api/common/signin.ts
+++ b/packages/backend/src/server/api/common/signin.ts
@@ -29,14 +29,14 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) {
(async () => {
// Append signin history
- const record = await Signins.save({
+ const record = await Signins.insert({
id: genId(),
createdAt: new Date(),
userId: user.id,
ip: ctx.ip,
headers: ctx.headers,
success: true,
- });
+ }).then(x => Signins.findOneOrFail(x.identifiers[0]));
// Publish signin event
publishMainStream(user.id, 'signin', await Signins.pack(record));
diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts
index a61b3f564c..bb4e972b8e 100644
--- a/packages/backend/src/server/api/endpoints.ts
+++ b/packages/backend/src/server/api/endpoints.ts
@@ -3,7 +3,7 @@ import { dirname } from 'path';
import { Context } from 'cafy';
import * as path from 'path';
import * as glob from 'glob';
-import { SimpleSchema } from '@/misc/simple-schema';
+import { Schema } from '@/misc/schema';
//const _filename = fileURLToPath(import.meta.url);
const _filename = __filename;
@@ -18,87 +18,87 @@ export type Param = {
};
export interface IEndpointMeta {
- stability?: string; //'deprecated' | 'experimental' | 'stable';
+ readonly stability?: 'deprecated' | 'experimental' | 'stable';
- tags?: string[];
+ readonly tags?: ReadonlyArray<string>;
- params?: {
- [key: string]: Param;
+ readonly params?: {
+ readonly [key: string]: Param;
};
- errors?: {
- [key: string]: {
- message: string;
- code: string;
- id: string;
+ readonly errors?: {
+ readonly [key: string]: {
+ readonly message: string;
+ readonly code: string;
+ readonly id: string;
};
};
- res?: SimpleSchema;
+ readonly res?: Schema;
/**
* このエンドポイントにリクエストするのにユーザー情報が必須か否か
* 省略した場合は false として解釈されます。
*/
- requireCredential?: boolean;
+ readonly requireCredential?: boolean;
/**
* 管理者のみ使えるエンドポイントか否か
*/
- requireAdmin?: boolean;
+ readonly requireAdmin?: boolean;
/**
* 管理者またはモデレーターのみ使えるエンドポイントか否か
*/
- requireModerator?: boolean;
+ readonly requireModerator?: boolean;
/**
* エンドポイントのリミテーションに関するやつ
* 省略した場合はリミテーションは無いものとして解釈されます。
* また、withCredential が false の場合はリミテーションを行うことはできません。
*/
- limit?: {
+ readonly limit?: {
/**
* 複数のエンドポイントでリミットを共有したい場合に指定するキー
*/
- key?: string;
+ readonly key?: string;
/**
* リミットを適用する期間(ms)
* このプロパティを設定する場合、max プロパティも設定する必要があります。
*/
- duration?: number;
+ readonly duration?: number;
/**
* durationで指定した期間内にいくつまでリクエストできるのか
* このプロパティを設定する場合、duration プロパティも設定する必要があります。
*/
- max?: number;
+ readonly max?: number;
/**
* 最低でもどれくらいの間隔を開けてリクエストしなければならないか(ms)
*/
- minInterval?: number;
+ readonly minInterval?: number;
};
/**
* ファイルの添付を必要とするか否か
* 省略した場合は false として解釈されます。
*/
- requireFile?: boolean;
+ readonly requireFile?: boolean;
/**
* サードパーティアプリからはリクエストすることができないか否か
* 省略した場合は false として解釈されます。
*/
- secure?: boolean;
+ readonly secure?: boolean;
/**
* エンドポイントの種類
* パーミッションの実現に利用されます。
*/
- kind?: string;
+ readonly kind?: string;
}
export interface IEndpoint {
diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts
index 774506bf0d..ed7b146d03 100644
--- a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts
+++ b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -46,70 +46,76 @@ export const meta = {
]),
default: 'combined',
},
+
+ forwarded: {
+ validator: $.optional.bool,
+ default: false,
+ },
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
format: 'date-time',
},
comment: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
},
resolved: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
example: false,
},
reporterId: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
format: 'id',
},
targetUserId: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
format: 'id',
},
assigneeId: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
format: 'id',
},
reporter: {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
+ type: 'object',
+ nullable: false, optional: false,
ref: 'User',
},
targetUser: {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
+ type: 'object',
+ nullable: false, optional: false,
ref: 'User',
},
assignee: {
- type: 'object' as const,
- nullable: true as const, optional: true as const,
+ type: 'object',
+ nullable: true, optional: true,
ref: 'User',
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const query = makePaginationQuery(AbuseUserReports.createQueryBuilder('report'), ps.sinceId, ps.untilId);
diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
index b1cdb29a56..20f1232959 100644
--- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
@@ -16,18 +16,19 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'User',
properties: {
token: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, _me) => {
const me = _me ? await Users.findOneOrFail(_me.id) : null;
const noUsers = (await Users.count({
diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts
index 3881e02bba..1701c1e3a7 100644
--- a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts
+++ b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts
@@ -9,7 +9,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -17,8 +17,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId);
diff --git a/packages/backend/src/server/api/endpoints/admin/ad/create.ts b/packages/backend/src/server/api/endpoints/admin/ad/create.ts
index e41d015646..00ad2012fe 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/create.ts
@@ -6,7 +6,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -32,8 +32,9 @@ export const meta = {
validator: $.str.min(1),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
await Ads.insert({
id: genId(),
diff --git a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts
index ab5cd96d0f..c0124e2484 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts
@@ -7,7 +7,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -23,8 +23,9 @@ export const meta = {
id: 'ccac9863-3a03-416e-b899-8a64041118b1',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const ad = await Ads.findOne(ps.id);
diff --git a/packages/backend/src/server/api/endpoints/admin/ad/list.ts b/packages/backend/src/server/api/endpoints/admin/ad/list.ts
index f22dd0e961..7a83637f3b 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../../common/make-pagination-query';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -24,8 +24,9 @@ export const meta = {
validator: $.optional.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const query = makePaginationQuery(Ads.createQueryBuilder('ad'), ps.sinceId, ps.untilId)
.andWhere('ad.expiresAt > :now', { now: new Date() });
diff --git a/packages/backend/src/server/api/endpoints/admin/ad/update.ts b/packages/backend/src/server/api/endpoints/admin/ad/update.ts
index 1d91cfd162..c2b09ab9cf 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/update.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/update.ts
@@ -7,7 +7,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -44,8 +44,9 @@ export const meta = {
id: 'b7aa1727-1354-47bc-a182-3a9c3973d300',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const ad = await Ads.findOne(ps.id);
diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts
index 886cacff73..24c4caa37d 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts
@@ -6,7 +6,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -22,50 +22,51 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'date-time',
},
updatedAt: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'date-time',
},
title: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
text: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
imageUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
- const announcement = await Announcements.save({
+ const announcement = await Announcements.insert({
id: genId(),
createdAt: new Date(),
updatedAt: null,
title: ps.title,
text: ps.text,
imageUrl: ps.imageUrl,
- });
+ }).then(x => Announcements.findOneOrFail(x.identifiers[0]));
return announcement;
});
diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts
index ade9ef581e..5548f99006 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts
@@ -7,7 +7,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -23,8 +23,9 @@ export const meta = {
id: 'ecad8040-a276-4e85-bda9-015a708d291e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const announcement = await Announcements.findOne(ps.id);
diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
index f25b5e8efc..e5cc53ccdd 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../../common/make-pagination-query';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -26,49 +26,50 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'date-time',
},
updatedAt: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'date-time',
},
text: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
title: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
imageUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
reads: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts
index 3fa8440ebd..f66293bb18 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts
@@ -7,7 +7,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -32,8 +32,9 @@ export const meta = {
id: 'd3aae5a7-6372-4cb4-b61c-f511ffc2d7cc',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const announcement = await Announcements.findOne(ps.id);
diff --git a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts
index 50979d53e8..249e63a0f8 100644
--- a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts
@@ -7,7 +7,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -15,8 +15,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const files = await DriveFiles.find({
userId: ps.userId,
diff --git a/packages/backend/src/server/api/endpoints/admin/delete-logs.ts b/packages/backend/src/server/api/endpoints/admin/delete-logs.ts
deleted file mode 100644
index 9d37ceb434..0000000000
--- a/packages/backend/src/server/api/endpoints/admin/delete-logs.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import define from '../../define';
-import { Logs } from '@/models/index';
-
-export const meta = {
- tags: ['admin'],
-
- requireCredential: true as const,
- requireModerator: true,
-};
-
-export default define(meta, async (ps) => {
- await Logs.clear(); // TRUNCATE
-});
diff --git a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts
index 76a6acff59..acabbfef5c 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts
@@ -4,10 +4,11 @@ import { createCleanRemoteFilesJob } from '@/queue/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
createCleanRemoteFilesJob();
});
diff --git a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
index ae0e396b4f..452e7069a8 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
@@ -6,10 +6,11 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const files = await DriveFiles.find({
userId: IsNull(),
diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts
index ee07245db7..264f549867 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts
@@ -7,7 +7,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['admin'],
- requireCredential: false as const,
+ requireCredential: false,
requireModerator: true,
params: {
@@ -44,16 +44,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId);
diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
index ab8e3d68e9..5d9a1f2703 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
@@ -7,7 +7,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -29,138 +29,139 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'date-time',
},
userId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'id',
example: 'xxxxxxxxxx',
},
userHost: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
md5: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'md5',
example: '15eca7fba0480996e2245f5185bf39f2',
},
name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
example: 'lenna.jpg',
},
type: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
example: 'image/jpeg',
},
size: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
example: 51469,
},
comment: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
blurhash: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
properties: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
width: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
example: 1280,
},
height: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
example: 720,
},
avgColor: {
- type: 'string' as const,
- optional: true as const, nullable: false as const,
+ type: 'string',
+ optional: true, nullable: false,
example: 'rgb(40,65,87)',
},
},
},
storedInternal: {
- type: 'boolean' as const,
- optional: false as const, nullable: true as const,
+ type: 'boolean',
+ optional: false, nullable: true,
example: true,
},
url: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'url',
},
thumbnailUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'url',
},
webpublicUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'url',
},
accessKey: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
thumbnailAccessKey: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
webpublicAccessKey: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
uri: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
src: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
folderId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'id',
example: 'xxxxxxxxxx',
},
isSensitive: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isLink: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const file = ps.fileId ? await DriveFiles.findOne(ps.fileId) : await DriveFiles.findOne({
where: [{
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts
new file mode 100644
index 0000000000..f0fd73c276
--- /dev/null
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts
@@ -0,0 +1,39 @@
+import $ from 'cafy';
+import define from '../../../define';
+import { ID } from '@/misc/cafy-id';
+import { Emojis } from '@/models/index';
+import { getConnection, In } from 'typeorm';
+import { ApiError } from '../../../error';
+
+export const meta = {
+ tags: ['admin'],
+
+ requireCredential: true,
+ requireModerator: true,
+
+ params: {
+ ids: {
+ validator: $.arr($.type(ID)),
+ },
+
+ aliases: {
+ validator: $.arr($.str),
+ },
+ },
+} as const;
+
+// eslint-disable-next-line import/no-default-export
+export default define(meta, async (ps) => {
+ const emojis = await Emojis.find({
+ id: In(ps.ids),
+ });
+
+ for (const emoji of emojis) {
+ await Emojis.update(emoji.id, {
+ updatedAt: new Date(),
+ aliases: [...new Set(emoji.aliases.concat(ps.aliases))],
+ });
+ }
+
+ await getConnection().queryResultCache!.remove(['meta_emojis']);
+});
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts
index 407d9920d9..1dfeae262f 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts
@@ -12,7 +12,7 @@ import { publishBroadcastStream } from '@/services/stream';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -28,8 +28,9 @@ export const meta = {
id: 'fc46b5a4-6b92-4c33-ac66-b806659bb5cf',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const file = await DriveFiles.findOne(ps.fileId);
@@ -37,16 +38,17 @@ export default define(meta, async (ps, me) => {
const name = file.name.split('.')[0].match(/^[a-z0-9_]+$/) ? file.name.split('.')[0] : `_${rndstr('a-z0-9', 8)}_`;
- const emoji = await Emojis.save({
+ const emoji = await Emojis.insert({
id: genId(),
updatedAt: new Date(),
name: name,
category: null,
host: null,
aliases: [],
- url: file.url,
- type: file.type,
- });
+ originalUrl: file.url,
+ publicUrl: file.webpublicUrl ?? file.url,
+ type: file.webpublicType ?? file.type,
+ }).then(x => Emojis.findOneOrFail(x.identifiers[0]));
await getConnection().queryResultCache!.remove(['meta_emojis']);
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
index ae02df65e2..17cbf208aa 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
@@ -6,13 +6,13 @@ import { getConnection } from 'typeorm';
import { ApiError } from '../../../error';
import { DriveFile } from '@/models/entities/drive-file';
import { ID } from '@/misc/cafy-id';
-import uploadFromUrl from '@/services/drive/upload-from-url';
+import { uploadFromUrl } from '@/services/drive/upload-from-url';
import { publishBroadcastStream } from '@/services/stream';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -30,18 +30,19 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const emoji = await Emojis.findOne(ps.emojiId);
@@ -53,7 +54,7 @@ export default define(meta, async (ps, me) => {
try {
// Create file
- driveFile = await uploadFromUrl(emoji.url, null, null, null, false, true);
+ driveFile = await uploadFromUrl({ url: emoji.originalUrl, user: null, force: true });
} catch (e) {
throw new ApiError();
}
@@ -64,9 +65,9 @@ export default define(meta, async (ps, me) => {
name: emoji.name,
host: null,
aliases: [],
- url: driveFile.url,
- type: driveFile.type,
- fileId: driveFile.id,
+ originalUrl: driveFile.url,
+ publicUrl: driveFile.webpublicUrl ?? driveFile.url,
+ type: driveFile.webpublicType ?? driveFile.type,
}).then(x => Emojis.findOneOrFail(x.identifiers[0]));
await getConnection().queryResultCache!.remove(['meta_emojis']);
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts
new file mode 100644
index 0000000000..797a5de672
--- /dev/null
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts
@@ -0,0 +1,37 @@
+import $ from 'cafy';
+import define from '../../../define';
+import { ID } from '@/misc/cafy-id';
+import { Emojis } from '@/models/index';
+import { getConnection, In } from 'typeorm';
+import { insertModerationLog } from '@/services/insert-moderation-log';
+import { ApiError } from '../../../error';
+
+export const meta = {
+ tags: ['admin'],
+
+ requireCredential: true,
+ requireModerator: true,
+
+ params: {
+ ids: {
+ validator: $.arr($.type(ID)),
+ },
+ },
+} as const;
+
+// eslint-disable-next-line import/no-default-export
+export default define(meta, async (ps, me) => {
+ const emojis = await Emojis.find({
+ id: In(ps.ids),
+ });
+
+ for (const emoji of emojis) {
+ await Emojis.delete(emoji.id);
+
+ await getConnection().queryResultCache!.remove(['meta_emojis']);
+
+ insertModerationLog(me, 'deleteEmoji', {
+ emoji: emoji,
+ });
+ }
+});
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts
index 78085470a9..1580439024 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/remove.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts
@@ -9,7 +9,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -25,8 +25,9 @@ export const meta = {
id: 'be83669b-773a-44b7-b1f8-e5e5170ac3c2',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const emoji = await Emojis.findOne(ps.id);
@@ -36,7 +37,7 @@ export default define(meta, async (ps, me) => {
await getConnection().queryResultCache!.remove(['meta_emojis']);
- insertModerationLog(me, 'removeEmoji', {
+ insertModerationLog(me, 'deleteEmoji', {
emoji: emoji,
});
});
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts
new file mode 100644
index 0000000000..8856a38f24
--- /dev/null
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts
@@ -0,0 +1,21 @@
+import $ from 'cafy';
+import define from '../../../define';
+import { createImportCustomEmojisJob } from '@/queue/index';
+import ms from 'ms';
+import { ID } from '@/misc/cafy-id';
+
+export const meta = {
+ secure: true,
+ requireCredential: true,
+ requireModerator: true,
+ params: {
+ fileId: {
+ validator: $.type(ID),
+ },
+ },
+} as const;
+
+// eslint-disable-next-line import/no-default-export
+export default define(meta, async (ps, user) => {
+ createImportCustomEmojisJob(user, ps.fileId);
+});
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts
index 090ba2b64a..6e502547f5 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts
@@ -8,7 +8,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -37,46 +37,47 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
aliases: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
category: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
host: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
url: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId);
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
index 89cb60acaf..76ef190f94 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
@@ -8,7 +8,7 @@ import { Emoji } from '@/models/entities/emoji';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -32,46 +32,47 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
aliases: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
category: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
host: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
url: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId)
.andWhere(`emoji.host IS NULL`);
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts
new file mode 100644
index 0000000000..c49f84b7fb
--- /dev/null
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts
@@ -0,0 +1,39 @@
+import $ from 'cafy';
+import define from '../../../define';
+import { ID } from '@/misc/cafy-id';
+import { Emojis } from '@/models/index';
+import { getConnection, In } from 'typeorm';
+import { ApiError } from '../../../error';
+
+export const meta = {
+ tags: ['admin'],
+
+ requireCredential: true,
+ requireModerator: true,
+
+ params: {
+ ids: {
+ validator: $.arr($.type(ID)),
+ },
+
+ aliases: {
+ validator: $.arr($.str),
+ },
+ },
+} as const;
+
+// eslint-disable-next-line import/no-default-export
+export default define(meta, async (ps) => {
+ const emojis = await Emojis.find({
+ id: In(ps.ids),
+ });
+
+ for (const emoji of emojis) {
+ await Emojis.update(emoji.id, {
+ updatedAt: new Date(),
+ aliases: emoji.aliases.filter(x => !ps.aliases.includes(x)),
+ });
+ }
+
+ await getConnection().queryResultCache!.remove(['meta_emojis']);
+});
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
new file mode 100644
index 0000000000..06197820f0
--- /dev/null
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
@@ -0,0 +1,35 @@
+import $ from 'cafy';
+import define from '../../../define';
+import { ID } from '@/misc/cafy-id';
+import { Emojis } from '@/models/index';
+import { getConnection, In } from 'typeorm';
+import { ApiError } from '../../../error';
+
+export const meta = {
+ tags: ['admin'],
+
+ requireCredential: true,
+ requireModerator: true,
+
+ params: {
+ ids: {
+ validator: $.arr($.type(ID)),
+ },
+
+ aliases: {
+ validator: $.arr($.str),
+ },
+ },
+} as const;
+
+// eslint-disable-next-line import/no-default-export
+export default define(meta, async (ps) => {
+ await Emojis.update({
+ id: In(ps.ids),
+ }, {
+ updatedAt: new Date(),
+ aliases: ps.aliases,
+ });
+
+ await getConnection().queryResultCache!.remove(['meta_emojis']);
+});
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts
new file mode 100644
index 0000000000..f0645f111b
--- /dev/null
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts
@@ -0,0 +1,35 @@
+import $ from 'cafy';
+import define from '../../../define';
+import { ID } from '@/misc/cafy-id';
+import { Emojis } from '@/models/index';
+import { getConnection, In } from 'typeorm';
+import { ApiError } from '../../../error';
+
+export const meta = {
+ tags: ['admin'],
+
+ requireCredential: true,
+ requireModerator: true,
+
+ params: {
+ ids: {
+ validator: $.arr($.type(ID)),
+ },
+
+ category: {
+ validator: $.optional.nullable.str,
+ },
+ },
+} as const;
+
+// eslint-disable-next-line import/no-default-export
+export default define(meta, async (ps) => {
+ await Emojis.update({
+ id: In(ps.ids),
+ }, {
+ updatedAt: new Date(),
+ category: ps.category,
+ });
+
+ await getConnection().queryResultCache!.remove(['meta_emojis']);
+});
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts
index c61d8cb320..54a2cf9517 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts
@@ -8,7 +8,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -36,8 +36,9 @@ export const meta = {
id: '684dec9d-a8c2-4364-9aa8-456c49cb1dc8',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const emoji = await Emojis.findOne(ps.id);
diff --git a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts
index d9e003d35d..db023c6f0b 100644
--- a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts
+++ b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts
@@ -6,7 +6,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -14,8 +14,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const files = await DriveFiles.find({
userHost: ps.host,
diff --git a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts
index 9e7a8ec476..b68252ef2e 100644
--- a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts
+++ b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts
@@ -7,7 +7,7 @@ import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -15,8 +15,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const instance = await Instances.findOne({ host: toPuny(ps.host) });
diff --git a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts
index 8fc964fd2f..4de8ad1336 100644
--- a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts
+++ b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts
@@ -6,7 +6,7 @@ import { Followings, Users } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -14,8 +14,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const followings = await Followings.find({
followerHost: ps.host,
diff --git a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts
index 4ea1275f7c..6ac2f1f467 100644
--- a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts
+++ b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts
@@ -6,7 +6,7 @@ import { toPuny } from '@/misc/convert-host';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -18,8 +18,9 @@ export const meta = {
validator: $.bool,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const instance = await Instances.findOne({ host: toPuny(ps.host) });
diff --git a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts
index f2b06d0ef2..9a2bccec77 100644
--- a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts
+++ b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts
@@ -2,15 +2,16 @@ import define from '../../define';
import { getConnection } from 'typeorm';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
tags: ['admin'],
params: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const stats = await
getConnection().query(`SELECT * FROM pg_indexes;`)
diff --git a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts
index 64f0292943..1c5f250676 100644
--- a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts
+++ b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts
@@ -2,7 +2,7 @@ import define from '../../define';
import { getConnection } from 'typeorm';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
tags: ['admin'],
@@ -11,8 +11,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
example: {
migrations: {
count: 66,
@@ -20,8 +20,9 @@ export const meta = {
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const sizes = await
getConnection().query(`
diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts
index b9452c83d2..3428709c04 100644
--- a/packages/backend/src/server/api/endpoints/admin/invite.ts
+++ b/packages/backend/src/server/api/endpoints/admin/invite.ts
@@ -6,26 +6,27 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
code: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
example: '2ERUA5VR',
maxLength: 8,
minLength: 8,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const code = rndstr({
length: 8,
diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts
index 8e3419bf66..0308cf2761 100644
--- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts
+++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts
@@ -6,7 +6,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireAdmin: true,
params: {
@@ -14,8 +14,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const user = await Users.findOne(ps.userId as string);
diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts
index 5a5a91e9ce..bdb976e9ec 100644
--- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts
+++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts
@@ -6,7 +6,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireAdmin: true,
params: {
@@ -14,8 +14,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const user = await Users.findOne(ps.userId as string);
diff --git a/packages/backend/src/server/api/endpoints/admin/promo/create.ts b/packages/backend/src/server/api/endpoints/admin/promo/create.ts
index 245780c2d1..f2735ac9f8 100644
--- a/packages/backend/src/server/api/endpoints/admin/promo/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/promo/create.ts
@@ -8,7 +8,7 @@ import { PromoNotes } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -34,8 +34,9 @@ export const meta = {
id: 'ae427aa2-7a41-484f-a18c-2c1104051604',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts
index 3a7ae6b4b0..3c8e7a27a2 100644
--- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts
+++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts
@@ -5,12 +5,13 @@ import { insertModerationLog } from '@/services/insert-moderation-log';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
destroy();
diff --git a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts
index cb2d1d0d79..4760e2c310 100644
--- a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts
+++ b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts
@@ -5,25 +5,25 @@ import define from '../../../define';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
anyOf: [
{
- type: 'string' as const,
+ type: 'string',
},
{
- type: 'number' as const,
+ type: 'number',
},
],
},
@@ -33,8 +33,9 @@ export const meta = {
12,
]],
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const jobs = await deliverQueue.getJobs(['delayed']);
diff --git a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts
index d524002faf..a95aabc506 100644
--- a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts
+++ b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts
@@ -5,25 +5,25 @@ import { inboxQueue } from '@/queue/queues';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
anyOf: [
{
- type: 'string' as const,
+ type: 'string',
},
{
- type: 'number' as const,
+ type: 'number',
},
],
},
@@ -33,8 +33,9 @@ export const meta = {
12,
]],
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const jobs = await inboxQueue.getJobs(['delayed']);
diff --git a/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts b/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts
index ece1d46f3f..df0b4a8f13 100644
--- a/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts
+++ b/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts
@@ -5,7 +5,7 @@ import define from '../../../define';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -24,38 +24,39 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
data: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
},
attempts: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
maxAttempts: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
timestamp: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const queue =
ps.domain === 'deliver' ? deliverQueue :
diff --git a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts
index 1fc42ea0b5..dab0be5dbc 100644
--- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts
+++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts
@@ -4,31 +4,36 @@ import define from '../../../define';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
deliver: {
+ optional: false, nullable: false,
ref: 'QueueCount',
},
inbox: {
+ optional: false, nullable: false,
ref: 'QueueCount',
},
db: {
+ optional: false, nullable: false,
ref: 'QueueCount',
},
objectStorage: {
+ optional: false, nullable: false,
ref: 'QueueCount',
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const deliverJobCounts = await deliverQueue.getJobCounts();
const inboxJobCounts = await inboxQueue.getJobCounts();
diff --git a/packages/backend/src/server/api/endpoints/admin/relays/add.ts b/packages/backend/src/server/api/endpoints/admin/relays/add.ts
index 80609aee94..65890a00f7 100644
--- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts
+++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts
@@ -7,8 +7,8 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
- requireModerator: true as const,
+ requireCredential: true,
+ requireModerator: true,
params: {
inbox: {
@@ -25,22 +25,22 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
inbox: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'url',
},
status: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
default: 'requesting',
enum: [
'requesting',
@@ -50,8 +50,9 @@ export const meta = {
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
try {
if (new URL(ps.inbox).protocol !== 'https:') throw 'https only';
diff --git a/packages/backend/src/server/api/endpoints/admin/relays/list.ts b/packages/backend/src/server/api/endpoints/admin/relays/list.ts
index ef103fbb31..bdddf13374 100644
--- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts
@@ -4,32 +4,32 @@ import { listRelay } from '@/services/relay';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
- requireModerator: true as const,
+ requireCredential: true,
+ requireModerator: true,
params: {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
inbox: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'url',
},
status: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
default: 'requesting',
enum: [
'requesting',
@@ -40,8 +40,9 @@ export const meta = {
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
return await listRelay();
});
diff --git a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts
index e7ddef30fc..4b04e620c1 100644
--- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts
+++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts
@@ -5,16 +5,17 @@ import { removeRelay } from '@/services/relay';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
- requireModerator: true as const,
+ requireCredential: true,
+ requireModerator: true,
params: {
inbox: {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
return await removeRelay(ps.inbox);
});
diff --git a/packages/backend/src/server/api/endpoints/admin/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/reset-password.ts
index bdd7ef27b8..b6cf1ee2d0 100644
--- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts
+++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts
@@ -8,7 +8,7 @@ import { Users, UserProfiles } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -18,19 +18,20 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
password: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
minLength: 8,
maxLength: 8,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const user = await Users.findOne(ps.userId as string);
diff --git a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts
index 94158ecfdb..b00457f092 100644
--- a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts
+++ b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts
@@ -1,21 +1,32 @@
import $ from 'cafy';
import { ID } from '@/misc/cafy-id';
import define from '../../define';
-import { AbuseUserReports } from '@/models/index';
+import { AbuseUserReports, Users } from '@/models/index';
+import { getInstanceActor } from '@/services/instance-actor';
+import { deliver } from '@/queue/index';
+import { renderActivity } from '@/remote/activitypub/renderer/index';
+import { renderFlag } from '@/remote/activitypub/renderer/flag';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
reportId: {
validator: $.type(ID),
},
+
+ forward: {
+ validator: $.optional.boolean,
+ required: false,
+ default: false,
+ },
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const report = await AbuseUserReports.findOne(ps.reportId);
@@ -23,8 +34,16 @@ export default define(meta, async (ps, me) => {
throw new Error('report not found');
}
+ if (ps.forward && report.targetUserHost != null) {
+ const actor = await getInstanceActor();
+ const targetUser = await Users.findOne(report.targetUserId);
+
+ deliver(actor, renderActivity(renderFlag(actor, [targetUser.uri], report.comment)), targetUser.inbox);
+ }
+
await AbuseUserReports.update(report.id, {
resolved: true,
assigneeId: me.id,
+ forwarded: ps.forward && report.targetUserHost != null,
});
});
diff --git a/packages/backend/src/server/api/endpoints/admin/resync-chart.ts b/packages/backend/src/server/api/endpoints/admin/resync-chart.ts
index e01dfce1b6..d80d2b0426 100644
--- a/packages/backend/src/server/api/endpoints/admin/resync-chart.ts
+++ b/packages/backend/src/server/api/endpoints/admin/resync-chart.ts
@@ -5,10 +5,11 @@ import { insertModerationLog } from '@/services/insert-moderation-log';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
insertModerationLog(me, 'chartResync');
diff --git a/packages/backend/src/server/api/endpoints/admin/send-email.ts b/packages/backend/src/server/api/endpoints/admin/send-email.ts
index 4797aa7a2b..c2972c35fa 100644
--- a/packages/backend/src/server/api/endpoints/admin/send-email.ts
+++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts
@@ -5,7 +5,7 @@ import { sendEmail } from '@/services/send-email';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -19,8 +19,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
await sendEmail(ps.to, ps.subject, ps.text, ps.text);
});
diff --git a/packages/backend/src/server/api/endpoints/admin/server-info.ts b/packages/backend/src/server/api/endpoints/admin/server-info.ts
index 4ddc39deb0..cd282e364c 100644
--- a/packages/backend/src/server/api/endpoints/admin/server-info.ts
+++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts
@@ -5,7 +5,7 @@ import define from '../../define';
import { redisClient } from '../../../../db/redis';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
tags: ['admin', 'meta'],
@@ -14,82 +14,83 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
machine: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
os: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
example: 'linux',
},
node: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
psql: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
cpu: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
model: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
cores: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
mem: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
total: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
format: 'bytes',
},
},
},
fs: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
total: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
format: 'bytes',
},
used: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
format: 'bytes',
},
},
},
net: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
interface: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
example: 'eth0',
},
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const memStats = await si.mem();
const fsStats = await si.fsSize();
diff --git a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
index 19d4be973f..84e2b84bb5 100644
--- a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
+++ b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -26,45 +26,46 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'date-time',
},
type: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
info: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
},
userId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
user: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const query = makePaginationQuery(ModerationLogs.createQueryBuilder('report'), ps.sinceId, ps.untilId);
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 21cc9e5abc..c2a6a294b5 100644
--- a/packages/backend/src/server/api/endpoints/admin/show-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts
@@ -6,7 +6,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -16,149 +16,150 @@ export const meta = {
},
res: {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
+ type: 'object',
+ nullable: false, optional: false,
properties: {
id: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
format: 'id',
},
createdAt: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
format: 'date-time',
},
updatedAt: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
format: 'date-time',
},
lastFetchedAt: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
username: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
},
name: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
folowersCount: {
- type: 'number' as const,
- nullable: false as const, optional: false as const,
+ type: 'number',
+ nullable: false, optional: true,
},
followingCount: {
- type: 'number' as const,
- nullable: false as const, optional: false as const,
+ type: 'number',
+ nullable: false, optional: false,
},
notesCount: {
- type: 'number' as const,
- nullable: false as const, optional: false as const,
+ type: 'number',
+ nullable: false, optional: false,
},
avatarId: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
bannerId: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
tags: {
- type: 'array' as const,
- nullable: false as const, optional: false as const,
+ type: 'array',
+ nullable: false, optional: false,
items: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
},
},
avatarUrl: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
format: 'url',
},
bannerUrl: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
format: 'url',
},
avatarBlurhash: {
- type: 'any' as const,
- nullable: true as const, optional: false as const,
+ type: 'any',
+ nullable: true, optional: false,
default: null,
},
bannerBlurhash: {
- type: 'any' as const,
- nullable: true as const, optional: false as const,
+ type: 'any',
+ nullable: true, optional: false,
default: null,
},
isSuspended: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
},
isSilenced: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
},
isLocked: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
},
isBot: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
},
isCat: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
},
isAdmin: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
},
isModerator: {
- type: 'boolean' as const,
- nullable: false as const, optional: false as const,
+ type: 'boolean',
+ nullable: false, optional: false,
},
emojis: {
- type: 'array' as const,
- nullable: false as const, optional: false as const,
+ type: 'array',
+ nullable: false, optional: false,
items: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: false, optional: false,
},
},
host: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
inbox: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
sharedInbox: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
featured: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
uri: {
- type: 'string' as const,
- nullable: true as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
},
token: {
- type: 'string' as const,
- nullable: false as const, optional: false as const,
+ type: 'string',
+ nullable: true, optional: false,
default: '<MASKED>',
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId as string);
diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts
index 9c57917cb2..d3dde99b72 100644
--- a/packages/backend/src/server/api/endpoints/admin/show-users.ts
+++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts
@@ -5,7 +5,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -64,16 +64,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- nullable: false as const, optional: false as const,
+ type: 'array',
+ nullable: false, optional: false,
items: {
- type: 'object' as const,
- nullable: false as const, optional: false as const,
- ref: 'User',
+ type: 'object',
+ nullable: false, optional: false,
+ ref: 'UserDetailed',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Users.createQueryBuilder('user');
diff --git a/packages/backend/src/server/api/endpoints/admin/silence-user.ts b/packages/backend/src/server/api/endpoints/admin/silence-user.ts
index 9f5135b1a6..872bd2a6ac 100644
--- a/packages/backend/src/server/api/endpoints/admin/silence-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/silence-user.ts
@@ -7,7 +7,7 @@ import { insertModerationLog } from '@/services/insert-moderation-log';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -15,8 +15,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId as string);
diff --git a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
index c062dcc93f..2bb1875fc0 100644
--- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
@@ -11,7 +11,7 @@ import { publishUserEvent } from '@/services/stream';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -19,8 +19,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId as string);
diff --git a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts
index bc081c8487..a4c6ff2ade 100644
--- a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts
@@ -7,7 +7,7 @@ import { insertModerationLog } from '@/services/insert-moderation-log';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -15,8 +15,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId as string);
diff --git a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts
index 73a5bc739b..5ab56d51c7 100644
--- a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts
@@ -8,7 +8,7 @@ import { doPostUnsuspend } from '@/services/unsuspend-user';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -16,8 +16,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId as string);
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 e67088e0aa..aa2d1222f7 100644
--- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
@@ -9,7 +9,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireAdmin: true,
params: {
@@ -297,8 +297,9 @@ export const meta = {
validator: $.optional.bool,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const set = {} as Partial<Meta>;
diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts
index d08dfdd9ea..4229ef0d29 100644
--- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts
+++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts
@@ -6,7 +6,7 @@ import { insertModerationLog } from '@/services/insert-moderation-log';
export const meta = {
tags: ['admin'],
- requireCredential: true as const,
+ requireCredential: true,
requireModerator: true,
params: {
@@ -17,8 +17,9 @@ export const meta = {
validator: $.bool,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const params: string[] = [];
diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts
index 32ef49d889..0bd29607d6 100644
--- a/packages/backend/src/server/api/endpoints/announcements.ts
+++ b/packages/backend/src/server/api/endpoints/announcements.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../common/make-pagination-query';
export const meta = {
tags: ['meta'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
limit: {
@@ -30,49 +30,50 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'date-time',
},
updatedAt: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
format: 'date-time',
},
text: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
title: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
imageUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
isRead: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts
index 83c7d3e0a5..2092d177ba 100644
--- a/packages/backend/src/server/api/endpoints/antennas/create.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/create.ts
@@ -9,7 +9,7 @@ import { publishInternalEvent } from '@/services/stream';
export const meta = {
tags: ['antennas'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -74,12 +74,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Antenna',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
let userList;
let userGroupJoining;
diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts
index 721932f311..b2793fc70d 100644
--- a/packages/backend/src/server/api/endpoints/antennas/delete.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts
@@ -8,7 +8,7 @@ import { publishInternalEvent } from '@/services/stream';
export const meta = {
tags: ['antennas'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -25,8 +25,9 @@ export const meta = {
id: 'b34dcf9d-348f-44bb-99d0-6c9314cfe2df',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const antenna = await Antennas.findOne({
id: ps.antennaId,
diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts
index 4a9eed8563..bb58912612 100644
--- a/packages/backend/src/server/api/endpoints/antennas/list.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/list.ts
@@ -4,21 +4,22 @@ import { Antennas } from '@/models/index';
export const meta = {
tags: ['antennas', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Antenna',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const antennas = await Antennas.find({
userId: me.id,
diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts
index 968924831c..eb7de901c5 100644
--- a/packages/backend/src/server/api/endpoints/antennas/notes.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts
@@ -12,7 +12,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['antennas', 'account', 'notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
@@ -52,16 +52,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const antenna = await Antennas.findOne({
id: ps.antennaId,
diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts
index 79e988497d..a37d37d31c 100644
--- a/packages/backend/src/server/api/endpoints/antennas/show.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/show.ts
@@ -7,7 +7,7 @@ import { Antennas } from '@/models/index';
export const meta = {
tags: ['antennas', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
@@ -26,12 +26,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Antenna',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the antenna
const antenna = await Antennas.findOne({
diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts
index d5400a7926..900f725505 100644
--- a/packages/backend/src/server/api/endpoints/antennas/update.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/update.ts
@@ -8,7 +8,7 @@ import { publishInternalEvent } from '@/services/stream';
export const meta = {
tags: ['antennas'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -83,12 +83,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Antenna',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the antenna
const antenna = await Antennas.findOne({
diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts
index 000ed2d2df..ff8c677b91 100644
--- a/packages/backend/src/server/api/endpoints/ap/get.ts
+++ b/packages/backend/src/server/api/endpoints/ap/get.ts
@@ -7,7 +7,7 @@ import ms from 'ms';
export const meta = {
tags: ['federation'],
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
@@ -24,11 +24,12 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const resolver = new Resolver();
const object = await resolver.resolve(ps.uri);
diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts
index 709349262a..7d17d8edce 100644
--- a/packages/backend/src/server/api/endpoints/ap/show.ts
+++ b/packages/backend/src/server/api/endpoints/ap/show.ts
@@ -12,11 +12,12 @@ import { User } from '@/models/entities/user';
import { fetchMeta } from '@/misc/fetch-meta';
import { isActor, isPost, getApId } from '@/remote/activitypub/type';
import ms from 'ms';
+import { SchemaType } from '@/misc/schema';
export const meta = {
tags: ['federation'],
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
@@ -38,22 +39,43 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- type: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- enum: ['User', 'Note'],
- },
- object: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ optional: false, nullable: false,
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['User'],
+ },
+ object: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailedNotMe',
+ }
+ }
},
- },
+ {
+ type: 'object',
+ properties: {
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['Note'],
+ },
+ object: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'Note',
+ }
+ }
+ }
+ ],
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const object = await fetchAny(ps.uri);
if (object) {
@@ -66,7 +88,7 @@ export default define(meta, async (ps) => {
/***
* URIからUserかNoteを解決する
*/
-async function fetchAny(uri: string) {
+async function fetchAny(uri: string): Promise<SchemaType<typeof meta['res']> | null> {
// URIがこのサーバーを指しているなら、ローカルユーザーIDとしてDBからフェッチ
if (uri.startsWith(config.url + '/')) {
const parts = uri.split('/');
@@ -95,8 +117,8 @@ async function fetchAny(uri: string) {
}
// ブロックしてたら中断
- const meta = await fetchMeta();
- if (meta.blockedHosts.includes(extractDbHost(uri))) return null;
+ const fetchedMeta = await fetchMeta();
+ if (fetchedMeta.blockedHosts.includes(extractDbHost(uri))) return null;
// URI(AP Object id)としてDB検索
{
@@ -171,7 +193,7 @@ async function fetchAny(uri: string) {
return null;
}
-async function mergePack(user: User | null | undefined, note: Note | null | undefined) {
+async function mergePack(user: User | null | undefined, note: Note | null | undefined): Promise<SchemaType<typeof meta.res> | null> {
if (user != null) {
return {
type: 'User',
diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts
index 78586cbcf2..fbe6690f1d 100644
--- a/packages/backend/src/server/api/endpoints/app/create.ts
+++ b/packages/backend/src/server/api/endpoints/app/create.ts
@@ -8,7 +8,7 @@ import { secureRndstr } from '@/misc/secure-rndstr';
export const meta = {
tags: ['app'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
name: {
@@ -31,12 +31,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'App',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Generate secret
const secret = secureRndstr(32, true);
@@ -45,7 +46,7 @@ export default define(meta, async (ps, user) => {
const permission = unique(ps.permission.map(v => v.replace(/^(.+)(\/|-)(read|write)$/, '$3:$1')));
// Create account
- const app = await Apps.save({
+ const app = await Apps.insert({
id: genId(),
createdAt: new Date(),
userId: user ? user.id : null,
@@ -54,7 +55,7 @@ export default define(meta, async (ps, user) => {
permission,
callbackUrl: ps.callbackUrl,
secret: secret,
- });
+ }).then(x => Apps.findOneOrFail(x.identifiers[0]));
return await Apps.pack(app, null, {
detail: true,
diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts
index c83d576b43..9f4777b383 100644
--- a/packages/backend/src/server/api/endpoints/app/show.ts
+++ b/packages/backend/src/server/api/endpoints/app/show.ts
@@ -13,12 +13,6 @@ export const meta = {
},
},
- res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'App',
- },
-
errors: {
noSuchApp: {
message: 'No such app.',
@@ -28,12 +22,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'App',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user, token) => {
const isSecure = user != null && token == null;
diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts
index 989ebf8f25..f028135ca5 100644
--- a/packages/backend/src/server/api/endpoints/auth/accept.ts
+++ b/packages/backend/src/server/api/endpoints/auth/accept.ts
@@ -9,7 +9,7 @@ import { secureRndstr } from '@/misc/secure-rndstr';
export const meta = {
tags: ['auth'],
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -26,8 +26,9 @@ export const meta = {
id: '9c72d8de-391a-43c1-9d06-08d29efde8df',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch token
const session = await AuthSessions
diff --git a/packages/backend/src/server/api/endpoints/auth/session/generate.ts b/packages/backend/src/server/api/endpoints/auth/session/generate.ts
index 39ba5a972a..98987eba5b 100644
--- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts
+++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts
@@ -9,7 +9,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['auth'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
appSecret: {
@@ -18,16 +18,16 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
token: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
url: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'url',
},
},
@@ -40,8 +40,9 @@ export const meta = {
id: '92f93e63-428e-4f2f-a5a4-39e1407fe998',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
// Lookup app
const app = await Apps.findOne({
@@ -56,12 +57,12 @@ export default define(meta, async (ps) => {
const token = uuid();
// Create session token document
- const doc = await AuthSessions.save({
+ const doc = await AuthSessions.insert({
id: genId(),
createdAt: new Date(),
appId: app.id,
token: token,
- });
+ }).then(x => AuthSessions.findOneOrFail(x.identifiers[0]));
return {
token: doc.token,
diff --git a/packages/backend/src/server/api/endpoints/auth/session/show.ts b/packages/backend/src/server/api/endpoints/auth/session/show.ts
index e890dd95a3..ae0d016cea 100644
--- a/packages/backend/src/server/api/endpoints/auth/session/show.ts
+++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts
@@ -6,7 +6,7 @@ import { AuthSessions } from '@/models/index';
export const meta = {
tags: ['auth'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
token: {
@@ -23,27 +23,28 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
app: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'App',
},
token: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Lookup session
const session = await AuthSessions.findOne({
diff --git a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts
index 241b13d4da..fe0211ebe3 100644
--- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts
+++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts
@@ -6,7 +6,7 @@ import { Apps, AuthSessions, AccessTokens, Users } from '@/models/index';
export const meta = {
tags: ['auth'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
appSecret: {
@@ -19,18 +19,18 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
accessToken: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
user: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailedNotMe',
},
},
},
@@ -54,8 +54,9 @@ export const meta = {
id: '8c8a4145-02cc-4cca-8e66-29ba60445a8e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
// Lookup app
const app = await Apps.findOne({
diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts
index cb92589d19..6d555ff569 100644
--- a/packages/backend/src/server/api/endpoints/blocking/create.ts
+++ b/packages/backend/src/server/api/endpoints/blocking/create.ts
@@ -15,7 +15,7 @@ export const meta = {
max: 100,
},
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:blocks',
@@ -46,12 +46,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailedNotMe',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const blocker = await Users.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts
index 7a99fe0f49..942cddaedf 100644
--- a/packages/backend/src/server/api/endpoints/blocking/delete.ts
+++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts
@@ -15,7 +15,7 @@ export const meta = {
max: 100,
},
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:blocks',
@@ -46,12 +46,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailedNotMe',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const blocker = await Users.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts
index 901403d144..9a4f662140 100644
--- a/packages/backend/src/server/api/endpoints/blocking/list.ts
+++ b/packages/backend/src/server/api/endpoints/blocking/list.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:blocks',
@@ -27,16 +27,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Blocking',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(Blockings.createQueryBuilder('blocking'), ps.sinceId, ps.untilId)
.andWhere(`blocking.blockerId = :meId`, { meId: me.id });
diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts
index 0176f86e00..68cdf1143e 100644
--- a/packages/backend/src/server/api/endpoints/channels/create.ts
+++ b/packages/backend/src/server/api/endpoints/channels/create.ts
@@ -9,7 +9,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['channels'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:channels',
@@ -28,8 +28,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Channel',
},
@@ -40,8 +40,9 @@ export const meta = {
id: 'cd1e9f3e-5a12-4ab4-96f6-5d0a2cc32050',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
let banner = null;
if (ps.bannerId != null) {
@@ -55,14 +56,14 @@ export default define(meta, async (ps, user) => {
}
}
- const channel = await Channels.save({
+ const channel = await Channels.insert({
id: genId(),
createdAt: new Date(),
userId: user.id,
name: ps.name,
description: ps.description || null,
bannerId: banner ? banner.id : null,
- } as Channel);
+ } as Channel).then(x => Channels.findOneOrFail(x.identifiers[0]));
return await Channels.pack(channel, user);
});
diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts
index 8eab2402be..ceadde907c 100644
--- a/packages/backend/src/server/api/endpoints/channels/featured.ts
+++ b/packages/backend/src/server/api/endpoints/channels/featured.ts
@@ -4,19 +4,20 @@ import { Channels } from '@/models/index';
export const meta = {
tags: ['channels'],
- requireCredential: false as const,
+ requireCredential: false,
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Channel',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Channels.createQueryBuilder('channel')
.where('channel.lastNotedAt IS NOT NULL')
diff --git a/packages/backend/src/server/api/endpoints/channels/follow.ts b/packages/backend/src/server/api/endpoints/channels/follow.ts
index d30593acd9..bf580eea60 100644
--- a/packages/backend/src/server/api/endpoints/channels/follow.ts
+++ b/packages/backend/src/server/api/endpoints/channels/follow.ts
@@ -9,7 +9,7 @@ import { publishUserEvent } from '@/services/stream';
export const meta = {
tags: ['channels'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:channels',
@@ -26,8 +26,9 @@ export const meta = {
id: 'c0031718-d573-4e85-928e-10039f1fbb68',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const channel = await Channels.findOne({
id: ps.channelId,
diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts
index 28454c97fd..9e4c942af2 100644
--- a/packages/backend/src/server/api/endpoints/channels/followed.ts
+++ b/packages/backend/src/server/api/endpoints/channels/followed.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['channels', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:channels',
@@ -27,16 +27,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Channel',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(ChannelFollowings.createQueryBuilder(), ps.sinceId, ps.untilId)
.andWhere({ followerId: me.id });
diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts
index 44024b158e..5473636a85 100644
--- a/packages/backend/src/server/api/endpoints/channels/owned.ts
+++ b/packages/backend/src/server/api/endpoints/channels/owned.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['channels', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:channels',
@@ -27,16 +27,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Channel',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(Channels.createQueryBuilder(), ps.sinceId, ps.untilId)
.andWhere({ userId: me.id });
diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts
index e7ce4f22eb..598a87ec4e 100644
--- a/packages/backend/src/server/api/endpoints/channels/show.ts
+++ b/packages/backend/src/server/api/endpoints/channels/show.ts
@@ -7,7 +7,7 @@ import { Channels } from '@/models/index';
export const meta = {
tags: ['channels'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
channelId: {
@@ -16,8 +16,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Channel',
},
@@ -28,8 +28,9 @@ export const meta = {
id: '6f6c314b-7486-4897-8966-c04a66a02923',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const channel = await Channels.findOne({
id: ps.channelId,
diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts
index 56c205cae5..927ce7c741 100644
--- a/packages/backend/src/server/api/endpoints/channels/timeline.ts
+++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts
@@ -9,7 +9,7 @@ import { activeUsersChart } from '@/services/chart/index';
export const meta = {
tags: ['notes', 'channels'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
channelId: {
@@ -39,11 +39,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -55,8 +55,9 @@ export const meta = {
id: '4d0eeeba-a02c-4c3c-9966-ef60d38d2e7f',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const channel = await Channels.findOne({
id: ps.channelId,
diff --git a/packages/backend/src/server/api/endpoints/channels/unfollow.ts b/packages/backend/src/server/api/endpoints/channels/unfollow.ts
index 8ce9a7e644..ada0cb29fd 100644
--- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts
+++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts
@@ -8,7 +8,7 @@ import { publishUserEvent } from '@/services/stream';
export const meta = {
tags: ['channels'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:channels',
@@ -25,8 +25,9 @@ export const meta = {
id: '19959ee9-0153-4c51-bbd9-a98c49dc59d6',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const channel = await Channels.findOne({
id: ps.channelId,
diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts
index 0e6863ac76..1f7108a1cb 100644
--- a/packages/backend/src/server/api/endpoints/channels/update.ts
+++ b/packages/backend/src/server/api/endpoints/channels/update.ts
@@ -7,7 +7,7 @@ import { Channels, DriveFiles } from '@/models/index';
export const meta = {
tags: ['channels'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:channels',
@@ -30,8 +30,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Channel',
},
@@ -54,8 +54,9 @@ export const meta = {
id: 'e86c14a4-0da2-4032-8df3-e737a04c7f3b',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const channel = await Channels.findOne({
id: ps.channelId,
diff --git a/packages/backend/src/server/api/endpoints/charts/active-users.ts b/packages/backend/src/server/api/endpoints/charts/active-users.ts
index c4878f7d61..f7eadc7089 100644
--- a/packages/backend/src/server/api/endpoints/charts/active-users.ts
+++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts
@@ -23,8 +23,9 @@ export const meta = {
},
res: convertLog(activeUsersChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await activeUsersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts
index 07bff82cf4..364279da95 100644
--- a/packages/backend/src/server/api/endpoints/charts/drive.ts
+++ b/packages/backend/src/server/api/endpoints/charts/drive.ts
@@ -23,8 +23,9 @@ export const meta = {
},
res: convertLog(driveChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await driveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts
index 9575f9a7b7..6feb82b6d9 100644
--- a/packages/backend/src/server/api/endpoints/charts/federation.ts
+++ b/packages/backend/src/server/api/endpoints/charts/federation.ts
@@ -23,8 +23,9 @@ export const meta = {
},
res: convertLog(federationChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await federationChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts
index 53dc61e51e..99dc77998e 100644
--- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts
+++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts
@@ -27,8 +27,9 @@ export const meta = {
},
res: convertLog(hashtagChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await hashtagChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.tag);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts
index 4e96304d8c..23e6fbf2b0 100644
--- a/packages/backend/src/server/api/endpoints/charts/instance.ts
+++ b/packages/backend/src/server/api/endpoints/charts/instance.ts
@@ -27,8 +27,9 @@ export const meta = {
},
res: convertLog(instanceChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await instanceChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.host);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/network.ts b/packages/backend/src/server/api/endpoints/charts/network.ts
index b524df93be..c5a39bbd76 100644
--- a/packages/backend/src/server/api/endpoints/charts/network.ts
+++ b/packages/backend/src/server/api/endpoints/charts/network.ts
@@ -23,8 +23,9 @@ export const meta = {
},
res: convertLog(networkChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await networkChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts
index 676f302939..dcbd80c3e9 100644
--- a/packages/backend/src/server/api/endpoints/charts/notes.ts
+++ b/packages/backend/src/server/api/endpoints/charts/notes.ts
@@ -23,8 +23,9 @@ export const meta = {
},
res: convertLog(notesChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await notesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/user/drive.ts b/packages/backend/src/server/api/endpoints/charts/user/drive.ts
index 4fc12b3306..94787b4a57 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts
@@ -28,8 +28,9 @@ export const meta = {
},
res: convertLog(perUserDriveChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await perUserDriveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/user/following.ts b/packages/backend/src/server/api/endpoints/charts/user/following.ts
index 9207760a3c..effe0c54b9 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/following.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts
@@ -28,8 +28,9 @@ export const meta = {
},
res: convertLog(perUserFollowingChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await perUserFollowingChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/user/notes.ts b/packages/backend/src/server/api/endpoints/charts/user/notes.ts
index f543920572..df68a5fe52 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts
@@ -28,8 +28,9 @@ export const meta = {
},
res: convertLog(perUserNotesChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await perUserNotesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts
index 4ceb79f7f8..dcd067305f 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts
@@ -28,8 +28,9 @@ export const meta = {
},
res: convertLog(perUserReactionsChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await perUserReactionsChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
});
diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts
index deac89b59d..d32e14ad61 100644
--- a/packages/backend/src/server/api/endpoints/charts/users.ts
+++ b/packages/backend/src/server/api/endpoints/charts/users.ts
@@ -23,8 +23,9 @@ export const meta = {
},
res: convertLog(usersChart.schema),
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await usersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
});
diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts
index 99312a71b9..4a740b6cfe 100644
--- a/packages/backend/src/server/api/endpoints/clips/add-note.ts
+++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts
@@ -9,7 +9,7 @@ import { getNote } from '../../common/getters';
export const meta = {
tags: ['account', 'notes', 'clips'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -42,8 +42,9 @@ export const meta = {
id: '734806c4-542c-463a-9311-15c512803965',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const clip = await Clips.findOne({
id: ps.clipId,
diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts
index cb4ff56abd..852e66c9e4 100644
--- a/packages/backend/src/server/api/endpoints/clips/create.ts
+++ b/packages/backend/src/server/api/endpoints/clips/create.ts
@@ -6,7 +6,7 @@ import { Clips } from '@/models/index';
export const meta = {
tags: ['clips'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -25,12 +25,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Clip',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const clip = await Clips.insert({
id: genId(),
diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts
index 9ec6bc7eac..85c64a115d 100644
--- a/packages/backend/src/server/api/endpoints/clips/delete.ts
+++ b/packages/backend/src/server/api/endpoints/clips/delete.ts
@@ -7,7 +7,7 @@ import { Clips } from '@/models/index';
export const meta = {
tags: ['clips'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -24,8 +24,9 @@ export const meta = {
id: '70ca08ba-6865-4630-b6fb-8494759aa754',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const clip = await Clips.findOne({
id: ps.clipId,
diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts
index 3b32c02899..d88897d164 100644
--- a/packages/backend/src/server/api/endpoints/clips/list.ts
+++ b/packages/backend/src/server/api/endpoints/clips/list.ts
@@ -4,21 +4,22 @@ import { Clips } from '@/models/index';
export const meta = {
tags: ['clips', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Clip',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const clips = await Clips.find({
userId: me.id,
diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts
index 90ddd66a1f..eeb20631c1 100644
--- a/packages/backend/src/server/api/endpoints/clips/notes.ts
+++ b/packages/backend/src/server/api/endpoints/clips/notes.ts
@@ -11,7 +11,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['account', 'notes', 'clips'],
- requireCredential: false as const,
+ requireCredential: false,
kind: 'read:account',
@@ -43,16 +43,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const clip = await Clips.findOne({
id: ps.clipId,
diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts
index 8e9409fadd..0a45672019 100644
--- a/packages/backend/src/server/api/endpoints/clips/show.ts
+++ b/packages/backend/src/server/api/endpoints/clips/show.ts
@@ -7,7 +7,7 @@ import { Clips } from '@/models/index';
export const meta = {
tags: ['clips', 'account'],
- requireCredential: false as const,
+ requireCredential: false,
kind: 'read:account',
@@ -26,12 +26,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Clip',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the clip
const clip = await Clips.findOne({
diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts
index 9cf12499af..795483d5b2 100644
--- a/packages/backend/src/server/api/endpoints/clips/update.ts
+++ b/packages/backend/src/server/api/endpoints/clips/update.ts
@@ -7,7 +7,7 @@ import { Clips } from '@/models/index';
export const meta = {
tags: ['clips'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -38,12 +38,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Clip',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the clip
const clip = await Clips.findOne({
diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts
index b9741ba875..d9ab9883ca 100644
--- a/packages/backend/src/server/api/endpoints/drive.ts
+++ b/packages/backend/src/server/api/endpoints/drive.ts
@@ -5,26 +5,27 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['drive', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
capacity: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
usage: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const instance = await fetchMeta(true);
diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts
index 00ebb51e30..a5c0a626a1 100644
--- a/packages/backend/src/server/api/endpoints/drive/files.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -36,16 +36,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId)
.andWhere('file.userId = :userId', { userId: user.id });
diff --git a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts
index c8317c1cc8..835dde8058 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts
@@ -7,7 +7,7 @@ import { DriveFiles, Notes } from '@/models/index';
export const meta = {
tags: ['drive', 'notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -18,11 +18,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -34,8 +34,9 @@ export const meta = {
id: 'c118ece3-2e4b-4296-99d1-51756e32d232',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch file
const file = await DriveFiles.findOne({
diff --git a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts
index a6db160d2f..a45d357ee8 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts
@@ -5,7 +5,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -16,11 +16,12 @@ export const meta = {
},
res: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const file = await DriveFiles.findOne({
md5: ps.md5,
diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts
index 5523ae1967..dd65ab0611 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/create.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts
@@ -1,16 +1,17 @@
import ms from 'ms';
import $ from 'cafy';
import { ID } from '@/misc/cafy-id';
-import create from '@/services/drive/add-file';
+import { addFile } from '@/services/drive/add-file';
import define from '../../../define';
import { apiLogger } from '../../../logger';
import { ApiError } from '../../../error';
import { DriveFiles } from '@/models/index';
+import { DB_MAX_IMAGE_COMMENT_LENGTH } from '@/misc/hard-limits';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
@@ -32,6 +33,11 @@ export const meta = {
default: null,
},
+ comment: {
+ validator: $.optional.nullable.str.max(DB_MAX_IMAGE_COMMENT_LENGTH),
+ default: null,
+ },
+
isSensitive: {
validator: $.optional.either($.bool, $.str),
default: false,
@@ -46,8 +52,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
@@ -58,8 +64,9 @@ export const meta = {
id: 'f449b209-0c60-4e51-84d5-29486263bfd4',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user, _, file, cleanup) => {
// Get 'name' parameter
let name = ps.name || file.originalname;
@@ -78,7 +85,7 @@ export default define(meta, async (ps, user, _, file, cleanup) => {
try {
// Create file
- const driveFile = await create(user, file.path, name, null, ps.folderId, ps.force, false, null, null, ps.isSensitive);
+ const driveFile = await addFile({ user, path: file.path, name, comment: ps.comment, folderId: ps.folderId, force: ps.force, sensitive: ps.isSensitive });
return await DriveFiles.pack(driveFile, { self: true });
} catch (e) {
apiLogger.error(e);
diff --git a/packages/backend/src/server/api/endpoints/drive/files/delete.ts b/packages/backend/src/server/api/endpoints/drive/files/delete.ts
index 3a8e4b11f4..308beb58a4 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts
@@ -9,7 +9,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:drive',
@@ -32,8 +32,9 @@ export const meta = {
id: '5eb8d909-2540-4970-90b8-dd6f86088121',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const file = await DriveFiles.findOne(ps.fileId);
diff --git a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts
index 16717149ac..dc74dcb7e6 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts
@@ -5,7 +5,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -16,16 +16,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const files = await DriveFiles.find({
md5: ps.md5,
diff --git a/packages/backend/src/server/api/endpoints/drive/files/find.ts b/packages/backend/src/server/api/endpoints/drive/files/find.ts
index 108e08593a..2244df13cd 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/find.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts
@@ -4,7 +4,7 @@ import define from '../../../define';
import { DriveFiles } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
tags: ['drive'],
@@ -22,16 +22,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const files = await DriveFiles.find({
name: ps.name,
diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts
index 96f8e5c03a..18b17c4653 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/show.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts
@@ -8,7 +8,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -23,8 +23,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
@@ -47,8 +47,9 @@ export const meta = {
id: '89674805-722c-440c-8d88-5641830dc3e4',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
let file: DriveFile | undefined;
diff --git a/packages/backend/src/server/api/endpoints/drive/files/update.ts b/packages/backend/src/server/api/endpoints/drive/files/update.ts
index 04b2db9cf4..b7ca80e83c 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/update.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts
@@ -9,7 +9,7 @@ import { DB_MAX_IMAGE_COMMENT_LENGTH } from '@/misc/hard-limits';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:drive',
@@ -60,12 +60,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const file = await DriveFiles.findOne(ps.fileId);
diff --git a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts
index 8a2fbc36b5..40da1a4fb4 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts
@@ -1,7 +1,7 @@
import $ from 'cafy';
import { ID } from '@/misc/cafy-id';
import ms from 'ms';
-import uploadFromUrl from '@/services/drive/upload-from-url';
+import { uploadFromUrl } from '@/services/drive/upload-from-url';
import define from '../../../define';
import { DriveFiles } from '@/models/index';
import { publishMainStream } from '@/services/stream';
@@ -15,7 +15,7 @@ export const meta = {
max: 60,
},
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:drive',
@@ -50,10 +50,11 @@ export const meta = {
default: false,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
- uploadFromUrl(ps.url, user, ps.folderId, null, ps.isSensitive, ps.force, false, ps.comment).then(file => {
+ uploadFromUrl({ url: ps.url, user, folderId: ps.folderId, sensitive: ps.isSensitive, force: ps.force, comment: ps.comment }).then(file => {
DriveFiles.pack(file, { self: true }).then(packedFile => {
publishMainStream(user.id, 'urlUploadFinished', {
marker: ps.marker,
diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts
index cd2d1743c8..8f8d1d2c0a 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -32,16 +32,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFolder',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(DriveFolders.createQueryBuilder('folder'), ps.sinceId, ps.untilId)
.andWhere('folder.userId = :userId', { userId: user.id });
diff --git a/packages/backend/src/server/api/endpoints/drive/folders/create.ts b/packages/backend/src/server/api/endpoints/drive/folders/create.ts
index 9ae59d4b49..38ed17e0e5 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts
@@ -9,7 +9,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:drive',
@@ -37,8 +37,9 @@ export const meta = {
optional: false as const, nullable: false as const,
ref: 'DriveFolder',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// If the parent folder is specified
let parent = null;
diff --git a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts
index bfd3361e76..13716fccea 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts
@@ -8,7 +8,7 @@ import { DriveFolders, DriveFiles } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:drive',
@@ -31,8 +31,9 @@ export const meta = {
id: 'b0fc8a17-963c-405d-bfbc-859a487295e1',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Get folder
const folder = await DriveFolders.findOne({
diff --git a/packages/backend/src/server/api/endpoints/drive/folders/find.ts b/packages/backend/src/server/api/endpoints/drive/folders/find.ts
index 872eabef98..911f51d78b 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts
@@ -6,7 +6,7 @@ import { DriveFolders } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -22,16 +22,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFolder',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const folders = await DriveFolders.find({
name: ps.name,
diff --git a/packages/backend/src/server/api/endpoints/drive/folders/show.ts b/packages/backend/src/server/api/endpoints/drive/folders/show.ts
index 63b5bc9e77..58a6dd3c06 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts
@@ -7,7 +7,7 @@ import { DriveFolders } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -18,8 +18,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFolder',
},
@@ -30,8 +30,9 @@ export const meta = {
id: 'd74ab9eb-bb09-4bba-bf24-fb58f761e1e9',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Get folder
const folder = await DriveFolders.findOne({
diff --git a/packages/backend/src/server/api/endpoints/drive/folders/update.ts b/packages/backend/src/server/api/endpoints/drive/folders/update.ts
index e547808866..5b0cccd1c6 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts
@@ -8,7 +8,7 @@ import { DriveFolders } from '@/models/index';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:drive',
@@ -47,12 +47,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFolder',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch folder
const folder = await DriveFolders.findOne({
diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts
index e3031f75b2..9ba7804946 100644
--- a/packages/backend/src/server/api/endpoints/drive/stream.ts
+++ b/packages/backend/src/server/api/endpoints/drive/stream.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['drive'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:drive',
@@ -31,16 +31,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'DriveFile',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId)
.andWhere('file.userId = :userId', { userId: user.id });
diff --git a/packages/backend/src/server/api/endpoints/email-address/available.ts b/packages/backend/src/server/api/endpoints/email-address/available.ts
index f2254e1481..19f9b7ccdc 100644
--- a/packages/backend/src/server/api/endpoints/email-address/available.ts
+++ b/packages/backend/src/server/api/endpoints/email-address/available.ts
@@ -5,7 +5,7 @@ import { validateEmailForAccount } from '@/services/validate-email-for-account';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
emailAddress: {
@@ -14,21 +14,22 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
available: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
reason: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
return await validateEmailForAccount(ps.emailAddress);
});
diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts
index eacee689dc..42fd468838 100644
--- a/packages/backend/src/server/api/endpoints/endpoint.ts
+++ b/packages/backend/src/server/api/endpoints/endpoint.ts
@@ -3,7 +3,7 @@ import define from '../define';
import endpoints from '../endpoints';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
tags: ['meta'],
@@ -12,8 +12,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const ep = endpoints.find(x => x.name === ps.endpoint);
if (ep == null) return null;
diff --git a/packages/backend/src/server/api/endpoints/endpoints.ts b/packages/backend/src/server/api/endpoints/endpoints.ts
index 6d4588383d..ebb78de337 100644
--- a/packages/backend/src/server/api/endpoints/endpoints.ts
+++ b/packages/backend/src/server/api/endpoints/endpoints.ts
@@ -2,7 +2,7 @@ import define from '../define';
import endpoints from '../endpoints';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
tags: ['meta'],
@@ -10,11 +10,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
example: [
'admin/abuse-user-reports',
@@ -23,8 +23,9 @@ export const meta = {
'...',
],
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
return endpoints.map(x => x.name);
});
diff --git a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts
index 92738c8288..24c9f56aa6 100644
--- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts
+++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts
@@ -5,13 +5,14 @@ import ms from 'ms';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
max: 1,
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
createExportCustomEmojisJob(user);
});
diff --git a/packages/backend/src/server/api/endpoints/federation/dns.ts b/packages/backend/src/server/api/endpoints/federation/dns.ts
deleted file mode 100644
index 19e3ef8055..0000000000
--- a/packages/backend/src/server/api/endpoints/federation/dns.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { promises as dns } from 'dns';
-import $ from 'cafy';
-import define from '../../define';
-import { Instances } from '@/models/index';
-import { toPuny } from '@/misc/convert-host';
-
-const resolver = new dns.Resolver();
-resolver.setServers(['1.1.1.1']);
-
-export const meta = {
- tags: ['federation'],
-
- requireCredential: false as const,
-
- params: {
- host: {
- validator: $.str,
- },
- },
-};
-
-export default define(meta, async (ps, me) => {
- const instance = await Instances.findOneOrFail({ host: toPuny(ps.host) });
-
- const [
- resolved4,
- resolved6,
- resolvedCname,
- resolvedTxt,
- ] = await Promise.all([
- resolver.resolve4(instance.host).catch(() => []),
- resolver.resolve6(instance.host).catch(() => []),
- resolver.resolveCname(instance.host).catch(() => []),
- resolver.resolveTxt(instance.host).catch(() => []),
- ]);
-
- return {
- a: resolved4,
- aaaa: resolved6,
- cname: resolvedCname,
- txt: resolvedTxt,
- };
-});
diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts
index 9cb4082bbf..c0a85f166c 100644
--- a/packages/backend/src/server/api/endpoints/federation/followers.ts
+++ b/packages/backend/src/server/api/endpoints/federation/followers.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['federation'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
host: {
@@ -29,16 +29,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Following',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(Followings.createQueryBuilder('following'), ps.sinceId, ps.untilId)
.andWhere(`following.followeeHost = :host`, { host: ps.host });
diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts
index 4a42550f93..147f0aedb2 100644
--- a/packages/backend/src/server/api/endpoints/federation/following.ts
+++ b/packages/backend/src/server/api/endpoints/federation/following.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['federation'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
host: {
@@ -29,16 +29,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Following',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(Followings.createQueryBuilder('following'), ps.sinceId, ps.untilId)
.andWhere(`following.followerHost = :host`, { host: ps.host });
diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts
index 50d9ff3fd7..11df7ed6b6 100644
--- a/packages/backend/src/server/api/endpoints/federation/instances.ts
+++ b/packages/backend/src/server/api/endpoints/federation/instances.ts
@@ -7,7 +7,7 @@ import { fetchMeta } from '@/misc/fetch-meta';
export const meta = {
tags: ['federation'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
host: {
@@ -54,16 +54,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'FederationInstance',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Instances.createQueryBuilder('instance');
diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts
index 9d5d9bc9f8..6f13b28cae 100644
--- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts
+++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts
@@ -6,7 +6,7 @@ import { toPuny } from '@/misc/convert-host';
export const meta = {
tags: ['federation'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
host: {
@@ -15,12 +15,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: true, nullable: false,
ref: 'FederationInstance',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const instance = await Instances
.findOne({ host: toPuny(ps.host) });
diff --git a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts
index 2ba09b1361..092f805bc2 100644
--- a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts
+++ b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts
@@ -7,15 +7,16 @@ import { updatePerson } from '@/remote/activitypub/models/person';
export const meta = {
tags: ['federation'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
userId: {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const user = await getRemoteUser(ps.userId);
await updatePerson(user.uri!);
diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts
index 730dbd74c3..9a8f749936 100644
--- a/packages/backend/src/server/api/endpoints/federation/users.ts
+++ b/packages/backend/src/server/api/endpoints/federation/users.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['federation'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
host: {
@@ -29,16 +29,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailedNotMe',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(Users.createQueryBuilder('user'), ps.sinceId, ps.untilId)
.andWhere(`user.host = :host`, { host: ps.host });
diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts
index 096b1f6055..96aede4550 100644
--- a/packages/backend/src/server/api/endpoints/following/create.ts
+++ b/packages/backend/src/server/api/endpoints/following/create.ts
@@ -15,7 +15,7 @@ export const meta = {
max: 100,
},
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:following',
@@ -58,12 +58,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const follower = user;
diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts
index 5a0e44ad0b..4cd0c49452 100644
--- a/packages/backend/src/server/api/endpoints/following/delete.ts
+++ b/packages/backend/src/server/api/endpoints/following/delete.ts
@@ -15,7 +15,7 @@ export const meta = {
max: 100,
},
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:following',
@@ -46,12 +46,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const follower = user;
diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts
index 050199bfaa..92e887e00b 100644
--- a/packages/backend/src/server/api/endpoints/following/invalidate.ts
+++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts
@@ -15,7 +15,7 @@ export const meta = {
max: 100,
},
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:following',
@@ -46,12 +46,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const followee = user;
diff --git a/packages/backend/src/server/api/endpoints/following/requests/accept.ts b/packages/backend/src/server/api/endpoints/following/requests/accept.ts
index 9c07248568..7e7c056f55 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts
@@ -8,7 +8,7 @@ import { getUser } from '../../../common/getters';
export const meta = {
tags: ['following', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:following',
@@ -30,8 +30,9 @@ export const meta = {
id: 'bcde4f8b-0913-4614-8881-614e522fb041',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch follower
const follower = await getUser(ps.userId).catch(e => {
diff --git a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts
index d65aa436a0..19ed02c152 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts
@@ -9,7 +9,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['following', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:following',
@@ -34,12 +34,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch followee
const followee = await getUser(ps.userId).catch(e => {
diff --git a/packages/backend/src/server/api/endpoints/following/requests/list.ts b/packages/backend/src/server/api/endpoints/following/requests/list.ts
index 2dadd0d60c..ec0c76502c 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/list.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts
@@ -4,37 +4,38 @@ import { FollowRequests } from '@/models/index';
export const meta = {
tags: ['following', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:following',
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
follower: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
},
followee: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const reqs = await FollowRequests.find({
followeeId: user.id,
diff --git a/packages/backend/src/server/api/endpoints/following/requests/reject.ts b/packages/backend/src/server/api/endpoints/following/requests/reject.ts
index c385b32385..a5ce1e7c77 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts
@@ -8,7 +8,7 @@ import { getUser } from '../../../common/getters';
export const meta = {
tags: ['following', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:following',
@@ -25,8 +25,9 @@ export const meta = {
id: 'abc2ffa6-25b2-4380-ba99-321ff3a94555',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch follower
const follower = await getUser(ps.userId).catch(e => {
diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts
index dc86cf40ba..ff7c16889f 100644
--- a/packages/backend/src/server/api/endpoints/gallery/featured.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts
@@ -4,19 +4,20 @@ import { GalleryPosts } from '@/models/index';
export const meta = {
tags: ['gallery'],
- requireCredential: false as const,
+ requireCredential: false,
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = GalleryPosts.createQueryBuilder('post')
.andWhere('post.createdAt > :date', { date: new Date(Date.now() - (1000 * 60 * 60 * 24 * 3)) })
diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts
index ee3fe51ebf..2c3368a19d 100644
--- a/packages/backend/src/server/api/endpoints/gallery/popular.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts
@@ -4,19 +4,20 @@ import { GalleryPosts } from '@/models/index';
export const meta = {
tags: ['gallery'],
- requireCredential: false as const,
+ requireCredential: false,
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = GalleryPosts.createQueryBuilder('post')
.andWhere('post.likedCount > 0')
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts
index 90bd2d959f..9d2601c7e9 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts
@@ -23,16 +23,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId)
.innerJoinAndSelect('post.user', 'user');
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
index dae6e27ddb..e9d5df1ab6 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
@@ -11,7 +11,7 @@ import { DriveFile } from '@/models/entities/drive-file';
export const meta = {
tags: ['gallery'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:gallery',
@@ -40,16 +40,17 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
errors: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const files = (await Promise.all(ps.fileIds.map(fileId =>
DriveFiles.findOne({
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts
index e43c12a4c1..2a13b9ed58 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts
@@ -7,7 +7,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['gallery'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:gallery',
@@ -24,8 +24,9 @@ export const meta = {
id: 'ae52f367-4bd7-4ecd-afc6-5672fff427f5',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const post = await GalleryPosts.findOne({
id: ps.postId,
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts
index d355d1e312..0fb408fa5f 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts
@@ -8,7 +8,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['gallery'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:gallery-likes',
@@ -37,8 +37,9 @@ export const meta = {
id: '40e9ed56-a59c-473a-bf3f-f289c54fb5a7',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const post = await GalleryPosts.findOne(ps.postId);
if (post == null) {
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts
index 7e620b2c48..4325d2ad37 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts
@@ -7,7 +7,7 @@ import { GalleryPosts } from '@/models/index';
export const meta = {
tags: ['gallery'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
postId: {
@@ -24,12 +24,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const post = await GalleryPosts.findOne({
id: ps.postId,
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts
index 323e7c4828..9cca09bddc 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts
@@ -7,7 +7,7 @@ import { GalleryPosts, GalleryLikes } from '@/models/index';
export const meta = {
tags: ['gallery'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:gallery-likes',
@@ -30,8 +30,9 @@ export const meta = {
id: 'e3e8e06e-be37-41f7-a5b4-87a8250288f0',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const post = await GalleryPosts.findOne(ps.postId);
if (post == null) {
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
index 7cd694e804..c35e1bbf58 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
@@ -10,7 +10,7 @@ import { DriveFile } from '@/models/entities/drive-file';
export const meta = {
tags: ['gallery'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:gallery',
@@ -43,16 +43,17 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
errors: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const files = (await Promise.all(ps.fileIds.map(fileId =>
DriveFiles.findOne({
diff --git a/packages/backend/src/server/api/endpoints/games/reversi/games.ts b/packages/backend/src/server/api/endpoints/games/reversi/games.ts
deleted file mode 100644
index f77f11942c..0000000000
--- a/packages/backend/src/server/api/endpoints/games/reversi/games.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import $ from 'cafy';
-import { ID } from '@/misc/cafy-id';
-import define from '../../../define';
-import { ReversiGames } from '@/models/index';
-import { makePaginationQuery } from '../../../common/make-pagination-query';
-import { Brackets } from 'typeorm';
-
-export const meta = {
- tags: ['games'],
-
- params: {
- limit: {
- validator: $.optional.num.range(1, 100),
- default: 10,
- },
-
- sinceId: {
- validator: $.optional.type(ID),
- },
-
- untilId: {
- validator: $.optional.type(ID),
- },
-
- my: {
- validator: $.optional.bool,
- default: false,
- },
- },
-
- res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- startedAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- isStarted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- isEnded: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- form1: {
- type: 'any' as const,
- optional: false as const, nullable: true as const,
- },
- form2: {
- type: 'any' as const,
- optional: false as const, nullable: true as const,
- },
- user1Accepted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- default: false,
- },
- user2Accepted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- default: false,
- },
- user1Id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user2Id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user1: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
- },
- user2: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
- },
- winnerId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- winner: {
- type: 'object' as const,
- optional: false as const, nullable: true as const,
- ref: 'User',
- },
- surrendered: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- black: {
- type: 'number' as const,
- optional: false as const, nullable: true as const,
- },
- bw: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- isLlotheo: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- canPutEverywhere: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- loopedBoard: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
- },
-};
-
-export default define(meta, async (ps, user) => {
- const query = makePaginationQuery(ReversiGames.createQueryBuilder('game'), ps.sinceId, ps.untilId)
- .andWhere('game.isStarted = TRUE');
-
- if (ps.my && user) {
- query.andWhere(new Brackets(qb => { qb
- .where('game.user1Id = :userId', { userId: user.id })
- .orWhere('game.user2Id = :userId', { userId: user.id });
- }));
- }
-
- // Fetch games
- const games = await query.take(ps.limit!).getMany();
-
- return await Promise.all(games.map((g) => ReversiGames.pack(g, user, {
- detail: false,
- })));
-});
diff --git a/packages/backend/src/server/api/endpoints/games/reversi/games/show.ts b/packages/backend/src/server/api/endpoints/games/reversi/games/show.ts
deleted file mode 100644
index 0476a4be9b..0000000000
--- a/packages/backend/src/server/api/endpoints/games/reversi/games/show.ts
+++ /dev/null
@@ -1,168 +0,0 @@
-import $ from 'cafy';
-import { ID } from '@/misc/cafy-id';
-import Reversi from '../../../../../../games/reversi/core';
-import define from '../../../../define';
-import { ApiError } from '../../../../error';
-import { ReversiGames } from '@/models/index';
-
-export const meta = {
- tags: ['games'],
-
- params: {
- gameId: {
- validator: $.type(ID),
- },
- },
-
- errors: {
- noSuchGame: {
- message: 'No such game.',
- code: 'NO_SUCH_GAME',
- id: 'f13a03db-fae1-46c9-87f3-43c8165419e1',
- },
- },
-
- res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- startedAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- isStarted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- isEnded: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- form1: {
- type: 'any' as const,
- optional: false as const, nullable: true as const,
- },
- form2: {
- type: 'any' as const,
- optional: false as const, nullable: true as const,
- },
- user1Accepted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- default: false,
- },
- user2Accepted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- default: false,
- },
- user1Id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user2Id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- user1: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
- },
- user2: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
- },
- winnerId: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- winner: {
- type: 'object' as const,
- optional: false as const, nullable: true as const,
- ref: 'User',
- },
- surrendered: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
- format: 'id',
- },
- black: {
- type: 'number' as const,
- optional: false as const, nullable: true as const,
- },
- bw: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- isLlotheo: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- canPutEverywhere: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- loopedBoard: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
- },
- board: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'any' as const,
- optional: false as const, nullable: false as const,
- },
- },
- turn: {
- type: 'any' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
- },
-};
-
-export default define(meta, async (ps, user) => {
- const game = await ReversiGames.findOne(ps.gameId);
-
- if (game == null) {
- throw new ApiError(meta.errors.noSuchGame);
- }
-
- const o = new Reversi(game.map, {
- isLlotheo: game.isLlotheo,
- canPutEverywhere: game.canPutEverywhere,
- loopedBoard: game.loopedBoard,
- });
-
- for (const log of game.logs) {
- o.put(log.color, log.pos);
- }
-
- const packed = await ReversiGames.pack(game, user);
-
- return Object.assign({
- board: o.board,
- turn: o.turn,
- }, packed);
-});
diff --git a/packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts b/packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts
deleted file mode 100644
index 84b80c47a0..0000000000
--- a/packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import $ from 'cafy';
-import { ID } from '@/misc/cafy-id';
-import { publishReversiGameStream } from '@/services/stream';
-import define from '../../../../define';
-import { ApiError } from '../../../../error';
-import { ReversiGames } from '@/models/index';
-
-export const meta = {
- tags: ['games'],
-
- requireCredential: true as const,
-
- params: {
- gameId: {
- validator: $.type(ID),
- },
- },
-
- errors: {
- noSuchGame: {
- message: 'No such game.',
- code: 'NO_SUCH_GAME',
- id: 'ace0b11f-e0a6-4076-a30d-e8284c81b2df',
- },
-
- alreadyEnded: {
- message: 'That game has already ended.',
- code: 'ALREADY_ENDED',
- id: '6c2ad4a6-cbf1-4a5b-b187-b772826cfc6d',
- },
-
- accessDenied: {
- message: 'Access denied.',
- code: 'ACCESS_DENIED',
- id: '6e04164b-a992-4c93-8489-2123069973e1',
- },
- },
-};
-
-export default define(meta, async (ps, user) => {
- const game = await ReversiGames.findOne(ps.gameId);
-
- if (game == null) {
- throw new ApiError(meta.errors.noSuchGame);
- }
-
- if (game.isEnded) {
- throw new ApiError(meta.errors.alreadyEnded);
- }
-
- if ((game.user1Id !== user.id) && (game.user2Id !== user.id)) {
- throw new ApiError(meta.errors.accessDenied);
- }
-
- const winnerId = game.user1Id === user.id ? game.user2Id : game.user1Id;
-
- await ReversiGames.update(game.id, {
- surrendered: user.id,
- isEnded: true,
- winnerId: winnerId,
- });
-
- publishReversiGameStream(game.id, 'ended', {
- winnerId: winnerId,
- game: await ReversiGames.pack(game.id, user),
- });
-});
diff --git a/packages/backend/src/server/api/endpoints/games/reversi/invitations.ts b/packages/backend/src/server/api/endpoints/games/reversi/invitations.ts
deleted file mode 100644
index b859a2fc75..0000000000
--- a/packages/backend/src/server/api/endpoints/games/reversi/invitations.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import define from '../../../define';
-import { ReversiMatchings } from '@/models/index';
-
-export const meta = {
- tags: ['games'],
-
- requireCredential: true as const,
-
- res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- createdAt: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'date-time',
- },
- parentId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- parent: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
- },
- childId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'id',
- },
- child: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
- },
- },
- },
- },
-};
-
-export default define(meta, async (ps, user) => {
- // Find session
- const invitations = await ReversiMatchings.find({
- childId: user.id,
- });
-
- return await Promise.all(invitations.map((i) => ReversiMatchings.pack(i, user)));
-});
diff --git a/packages/backend/src/server/api/endpoints/games/reversi/match.ts b/packages/backend/src/server/api/endpoints/games/reversi/match.ts
deleted file mode 100644
index c66c5a4f75..0000000000
--- a/packages/backend/src/server/api/endpoints/games/reversi/match.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-import $ from 'cafy';
-import { ID } from '@/misc/cafy-id';
-import { publishMainStream, publishReversiStream } from '@/services/stream';
-import { eighteight } from '../../../../../games/reversi/maps';
-import define from '../../../define';
-import { ApiError } from '../../../error';
-import { getUser } from '../../../common/getters';
-import { genId } from '@/misc/gen-id';
-import { ReversiMatchings, ReversiGames } from '@/models/index';
-import { ReversiGame } from '@/models/entities/games/reversi/game';
-import { ReversiMatching } from '@/models/entities/games/reversi/matching';
-
-export const meta = {
- tags: ['games'],
-
- requireCredential: true as const,
-
- params: {
- userId: {
- validator: $.type(ID),
- },
- },
-
- errors: {
- noSuchUser: {
- message: 'No such user.',
- code: 'NO_SUCH_USER',
- id: '0b4f0559-b484-4e31-9581-3f73cee89b28',
- },
-
- isYourself: {
- message: 'Target user is yourself.',
- code: 'TARGET_IS_YOURSELF',
- id: '96fd7bd6-d2bc-426c-a865-d055dcd2828e',
- },
- },
-};
-
-export default define(meta, async (ps, user) => {
- // Myself
- if (ps.userId === user.id) {
- throw new ApiError(meta.errors.isYourself);
- }
-
- // Find session
- const exist = await ReversiMatchings.findOne({
- parentId: ps.userId,
- childId: user.id,
- });
-
- if (exist) {
- // Destroy session
- ReversiMatchings.delete(exist.id);
-
- // Create game
- const game = await ReversiGames.save({
- id: genId(),
- createdAt: new Date(),
- user1Id: exist.parentId,
- user2Id: user.id,
- user1Accepted: false,
- user2Accepted: false,
- isStarted: false,
- isEnded: false,
- logs: [],
- map: eighteight.data,
- bw: 'random',
- isLlotheo: false,
- } as Partial<ReversiGame>);
-
- publishReversiStream(exist.parentId, 'matched', await ReversiGames.pack(game, { id: exist.parentId }));
-
- const other = await ReversiMatchings.count({
- childId: user.id,
- });
-
- if (other == 0) {
- publishMainStream(user.id, 'reversiNoInvites');
- }
-
- return await ReversiGames.pack(game, user);
- } else {
- // Fetch child
- const child = await getUser(ps.userId).catch(e => {
- if (e.id === '15348ddd-432d-49c2-8a5a-8069753becff') throw new ApiError(meta.errors.noSuchUser);
- throw e;
- });
-
- // 以前のセッションはすべて削除しておく
- await ReversiMatchings.delete({
- parentId: user.id,
- });
-
- // セッションを作成
- const matching = await ReversiMatchings.save({
- id: genId(),
- createdAt: new Date(),
- parentId: user.id,
- childId: child.id,
- } as ReversiMatching);
-
- const packed = await ReversiMatchings.pack(matching, child);
- publishReversiStream(child.id, 'invited', packed);
- publishMainStream(child.id, 'reversiInvited', packed);
-
- return;
- }
-});
diff --git a/packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts b/packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts
deleted file mode 100644
index 8076b7c5d8..0000000000
--- a/packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import define from '../../../../define';
-import { ReversiMatchings } from '@/models/index';
-
-export const meta = {
- tags: ['games'],
-
- requireCredential: true as const,
-};
-
-export default define(meta, async (ps, user) => {
- await ReversiMatchings.delete({
- parentId: user.id,
- });
-});
diff --git a/packages/backend/src/server/api/endpoints/get-online-users-count.ts b/packages/backend/src/server/api/endpoints/get-online-users-count.ts
index 0616431abc..5b13d5a3b8 100644
--- a/packages/backend/src/server/api/endpoints/get-online-users-count.ts
+++ b/packages/backend/src/server/api/endpoints/get-online-users-count.ts
@@ -6,12 +6,13 @@ import define from '../define';
export const meta = {
tags: ['meta'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const count = await Users.count({
lastActiveDate: MoreThan(new Date(Date.now() - USER_ONLINE_THRESHOLD)),
diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts
index 5f8bfee2df..9fa9b3edc6 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/list.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts
@@ -5,7 +5,7 @@ import { Hashtags } from '@/models/index';
export const meta = {
tags: ['hashtags'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
limit: {
@@ -47,16 +47,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Hashtag',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Hashtags.createQueryBuilder('tag');
diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts
index d7de1db557..0d646c64f5 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/search.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts
@@ -5,7 +5,7 @@ import { Hashtags } from '@/models/index';
export const meta = {
tags: ['hashtags'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
limit: {
@@ -24,15 +24,16 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const hashtags = await Hashtags.createQueryBuilder('tag')
.where('tag.name like :q', { q: ps.query.toLowerCase() + '%' })
diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts
index 9410aea389..242cef99d4 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/show.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts
@@ -7,7 +7,7 @@ import { normalizeForSearch } from '@/misc/normalize-for-search';
export const meta = {
tags: ['hashtags'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
tag: {
@@ -16,8 +16,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Hashtag',
},
@@ -28,8 +28,9 @@ export const meta = {
id: '110ee688-193e-4a3a-9ecf-c167b2e6981e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const hashtag = await Hashtags.findOne({ name: normalizeForSearch(ps.tag) });
if (hashtag == null) {
diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts
index deb8417ad6..be964ad639 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts
@@ -23,36 +23,37 @@ const max = 5;
export const meta = {
tags: ['hashtags'],
- requireCredential: false as const,
+ requireCredential: false,
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
tag: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
chart: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
usersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const instance = await fetchMeta(true);
const hiddenTags = instance.hiddenTags.map(t => normalizeForSearch(t));
diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts
index 69b17a19eb..2158dc4349 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/users.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts
@@ -4,7 +4,7 @@ import { Users } from '@/models/index';
import { normalizeForSearch } from '@/misc/normalize-for-search';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
tags: ['hashtags', 'users'],
@@ -48,16 +48,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Users.createQueryBuilder('user')
.where(':tag = ANY(user.tags)', { tag: normalizeForSearch(ps.tag) });
diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts
index 2063a55a81..d69c118cfc 100644
--- a/packages/backend/src/server/api/endpoints/i.ts
+++ b/packages/backend/src/server/api/endpoints/i.ts
@@ -4,22 +4,23 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
params: {},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'MeDetailed',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user, token) => {
const isSecure = token == null;
// ここで渡ってきている user はキャッシュされていて古い可能性もあるので id だけ渡す
- return await Users.pack(user.id, user, {
+ return await Users.pack<true, true>(user.id, user, {
detail: true,
includeSecrets: isSecure,
});
diff --git a/packages/backend/src/server/api/endpoints/i/2fa/done.ts b/packages/backend/src/server/api/endpoints/i/2fa/done.ts
index 3b772386f3..4853908693 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts
@@ -4,7 +4,7 @@ import define from '../../../define';
import { UserProfiles } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -13,8 +13,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const token = ps.token.replace(/\s/g, '');
diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts
index f0045fb997..26e9a60886 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts
@@ -16,7 +16,7 @@ import { publishMainStream } from '@/services/stream';
const cborDecodeFirst = promisify(cbor.decodeFirst) as any;
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -37,10 +37,11 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
const rpIdHashReal = hash(Buffer.from(config.hostname, 'utf-8'));
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
@@ -129,7 +130,7 @@ export default define(meta, async (ps, user) => {
const credentialIdString = credentialId.toString('hex');
- await UserSecurityKeys.save({
+ await UserSecurityKeys.insert({
userId: user.id,
id: credentialIdString,
lastUsed: new Date(),
diff --git a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts
index dc2b66286b..854848a434 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts
@@ -3,7 +3,7 @@ import define from '../../../define';
import { UserProfiles } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -12,8 +12,9 @@ export const meta = {
validator: $.boolean,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
await UserProfiles.update(user.id, {
usePasswordLessLogin: ps.value,
diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts
index aa6c8fb1d5..057e54c69b 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts
@@ -10,7 +10,7 @@ import { hash } from '../../../2fa';
const randomBytes = promisify(crypto.randomBytes);
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -19,8 +19,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
@@ -44,7 +45,7 @@ export default define(meta, async (ps, user) => {
const challengeId = genId();
- await AttestationChallenges.save({
+ await AttestationChallenges.insert({
userId: user.id,
id: challengeId,
challenge: hash(Buffer.from(challenge, 'utf-8')).toString('hex'),
diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register.ts b/packages/backend/src/server/api/endpoints/i/2fa/register.ts
index 347dec0f43..c5cfb9dfad 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts
@@ -7,7 +7,7 @@ import define from '../../../define';
import { UserProfiles } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -16,8 +16,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts
index 05d63452f1..03e1d0434d 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts
@@ -5,7 +5,7 @@ import { UserProfiles, UserSecurityKeys, Users } from '@/models/index';
import { publishMainStream } from '@/services/stream';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -17,8 +17,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts
index a0d8b5906b..a19ad6810d 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts
@@ -4,7 +4,7 @@ import define from '../../../define';
import { UserProfiles } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -13,8 +13,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts
index 64986865b2..63999b0981 100644
--- a/packages/backend/src/server/api/endpoints/i/apps.ts
+++ b/packages/backend/src/server/api/endpoints/i/apps.ts
@@ -3,7 +3,7 @@ import define from '../../define';
import { AccessTokens } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -17,8 +17,9 @@ export const meta = {
]),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = AccessTokens.createQueryBuilder('token')
.where('token.userId = :userId', { userId: user.id });
diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts
index bfe20eb984..52122b851b 100644
--- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts
+++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts
@@ -3,7 +3,7 @@ import define from '../../define';
import { AccessTokens, Apps } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -23,8 +23,9 @@ export const meta = {
default: 'desc',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Get tokens
const tokens = await AccessTokens.find({
diff --git a/packages/backend/src/server/api/endpoints/i/change-password.ts b/packages/backend/src/server/api/endpoints/i/change-password.ts
index 416eb6229f..7b6c137737 100644
--- a/packages/backend/src/server/api/endpoints/i/change-password.ts
+++ b/packages/backend/src/server/api/endpoints/i/change-password.ts
@@ -4,7 +4,7 @@ import define from '../../define';
import { UserProfiles } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -17,8 +17,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/i/delete-account.ts b/packages/backend/src/server/api/endpoints/i/delete-account.ts
index 13a8f79dfa..e1eee949fc 100644
--- a/packages/backend/src/server/api/endpoints/i/delete-account.ts
+++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts
@@ -7,7 +7,7 @@ import { publishUserEvent } from '@/services/stream';
import { createDeleteAccountJob } from '@/queue';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -16,8 +16,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
const userDetailed = await Users.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/i/export-blocking.ts b/packages/backend/src/server/api/endpoints/i/export-blocking.ts
index e276ecf384..44d8a1cb38 100644
--- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts
@@ -4,13 +4,14 @@ import ms from 'ms';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
max: 1,
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
createExportBlockingJob(user);
});
diff --git a/packages/backend/src/server/api/endpoints/i/export-following.ts b/packages/backend/src/server/api/endpoints/i/export-following.ts
index 15c09941e8..5d1617d57b 100644
--- a/packages/backend/src/server/api/endpoints/i/export-following.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-following.ts
@@ -5,7 +5,7 @@ import ms from 'ms';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
max: 1,
@@ -20,8 +20,9 @@ export const meta = {
default: false,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
createExportFollowingJob(user, ps.excludeMuting, ps.excludeInactive);
});
diff --git a/packages/backend/src/server/api/endpoints/i/export-mute.ts b/packages/backend/src/server/api/endpoints/i/export-mute.ts
index b176c7ee8d..27ce8f0b29 100644
--- a/packages/backend/src/server/api/endpoints/i/export-mute.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts
@@ -4,13 +4,14 @@ import ms from 'ms';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
max: 1,
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
createExportMuteJob(user);
});
diff --git a/packages/backend/src/server/api/endpoints/i/export-notes.ts b/packages/backend/src/server/api/endpoints/i/export-notes.ts
index 8cba04552e..25b1849e80 100644
--- a/packages/backend/src/server/api/endpoints/i/export-notes.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts
@@ -4,13 +4,14 @@ import ms from 'ms';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1day'),
max: 1,
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
createExportNotesJob(user);
});
diff --git a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts
index 44d43c0bea..d28b699c5a 100644
--- a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts
@@ -4,13 +4,14 @@ import ms from 'ms';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1min'),
max: 1,
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
createExportUserListsJob(user);
});
diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts
index 49b0bcd46c..92c767876b 100644
--- a/packages/backend/src/server/api/endpoints/i/favorites.ts
+++ b/packages/backend/src/server/api/endpoints/i/favorites.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['account', 'notes', 'favorites'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:favorites',
@@ -27,16 +27,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'NoteFavorite',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(NoteFavorites.createQueryBuilder('favorite'), ps.sinceId, ps.untilId)
.andWhere(`favorite.userId = :meId`, { meId: user.id })
diff --git a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts
index 3ee7174f71..f1c5763593 100644
--- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts
+++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../../common/make-pagination-query';
export const meta = {
tags: ['account', 'gallery'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:gallery-likes',
@@ -27,23 +27,24 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
page: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(GalleryLikes.createQueryBuilder('like'), ps.sinceId, ps.untilId)
.andWhere(`like.userId = :meId`, { meId: user.id })
diff --git a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts
index c8aceb8bf3..d46d42f633 100644
--- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts
+++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../../common/make-pagination-query';
export const meta = {
tags: ['account', 'gallery'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:gallery',
@@ -27,16 +27,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'GalleryPost',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId)
.andWhere(`post.userId = :meId`, { meId: user.id });
diff --git a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts
index 3eddc2746c..4e1a4d3db9 100644
--- a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts
+++ b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts
@@ -4,7 +4,7 @@ import { MutedNotes } from '@/models/index';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
@@ -12,17 +12,18 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
count: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
return {
count: await MutedNotes.count({
diff --git a/packages/backend/src/server/api/endpoints/i/import-blocking.ts b/packages/backend/src/server/api/endpoints/i/import-blocking.ts
index f0e3106c53..acc5797420 100644
--- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts
+++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts
@@ -8,7 +8,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
@@ -46,8 +46,9 @@ export const meta = {
id: '6f3a4dcc-f060-a707-4950-806fbdbe60d6',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const file = await DriveFiles.findOne(ps.fileId);
diff --git a/packages/backend/src/server/api/endpoints/i/import-following.ts b/packages/backend/src/server/api/endpoints/i/import-following.ts
index 61e500599f..35006746fb 100644
--- a/packages/backend/src/server/api/endpoints/i/import-following.ts
+++ b/packages/backend/src/server/api/endpoints/i/import-following.ts
@@ -8,7 +8,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
max: 1,
@@ -45,8 +45,9 @@ export const meta = {
id: '31a1b42c-06f7-42ae-8a38-a661c5c9f691',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const file = await DriveFiles.findOne(ps.fileId);
diff --git a/packages/backend/src/server/api/endpoints/i/import-muting.ts b/packages/backend/src/server/api/endpoints/i/import-muting.ts
index da26617d91..7bbb2e008e 100644
--- a/packages/backend/src/server/api/endpoints/i/import-muting.ts
+++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts
@@ -8,7 +8,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
@@ -46,8 +46,9 @@ export const meta = {
id: 'd2f12af1-e7b4-feac-86a3-519548f2728e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const file = await DriveFiles.findOne(ps.fileId);
diff --git a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts
index 1b850d314f..759d41b6cd 100644
--- a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts
+++ b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts
@@ -8,7 +8,7 @@ import { DriveFiles } from '@/models/index';
export const meta = {
secure: true,
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
max: 1,
@@ -45,8 +45,9 @@ export const meta = {
id: '99efe367-ce6e-4d44-93f8-5fae7b040356',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const file = await DriveFiles.findOne(ps.fileId);
diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts
index 9083aefacd..59efd32bb2 100644
--- a/packages/backend/src/server/api/endpoints/i/notifications.ts
+++ b/packages/backend/src/server/api/endpoints/i/notifications.ts
@@ -12,7 +12,7 @@ import { Brackets } from 'typeorm';
export const meta = {
tags: ['account', 'notifications'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:notifications',
@@ -55,16 +55,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Notification',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// includeTypes が空の場合はクエリしない
if (ps.includeTypes && ps.includeTypes.length === 0) {
diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts
index 92fc294850..59239c7446 100644
--- a/packages/backend/src/server/api/endpoints/i/page-likes.ts
+++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['account', 'pages'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:page-likes',
@@ -27,23 +27,24 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
page: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Page',
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(PageLikes.createQueryBuilder('like'), ps.sinceId, ps.untilId)
.andWhere(`like.userId = :meId`, { meId: user.id })
diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts
index 5948712c30..bef775d063 100644
--- a/packages/backend/src/server/api/endpoints/i/pages.ts
+++ b/packages/backend/src/server/api/endpoints/i/pages.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['account', 'pages'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:pages',
@@ -27,16 +27,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Page',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Pages.createQueryBuilder('page'), ps.sinceId, ps.untilId)
.andWhere(`page.userId = :meId`, { meId: user.id });
diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts
index 5fc49d6518..a940d1b99b 100644
--- a/packages/backend/src/server/api/endpoints/i/pin.ts
+++ b/packages/backend/src/server/api/endpoints/i/pin.ts
@@ -8,7 +8,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['account', 'notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -39,12 +39,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'MeDetailed',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
await addPinned(user, ps.noteId).catch(e => {
if (e.id === '70c4e51f-5bea-449c-a030-53bee3cce202') throw new ApiError(meta.errors.noSuchNote);
@@ -53,7 +54,7 @@ export default define(meta, async (ps, user) => {
throw e;
});
- return await Users.pack(user.id, user, {
+ return await Users.pack<true, true>(user.id, user, {
detail: true,
});
});
diff --git a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts
index a66d6bac7b..4e4fb3840f 100644
--- a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts
+++ b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts
@@ -5,14 +5,15 @@ import { MessagingMessages, UserGroupJoinings } from '@/models/index';
export const meta = {
tags: ['account', 'messaging'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
params: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Update documents
await MessagingMessages.update({
diff --git a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts
index 90f555763e..99f17ddfc9 100644
--- a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts
+++ b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts
@@ -5,14 +5,15 @@ import { NoteUnreads } from '@/models/index';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
params: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Remove documents
await NoteUnreads.delete({
diff --git a/packages/backend/src/server/api/endpoints/i/read-announcement.ts b/packages/backend/src/server/api/endpoints/i/read-announcement.ts
index d948f3efdf..e9bb66264b 100644
--- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts
+++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts
@@ -9,7 +9,7 @@ import { publishMainStream } from '@/services/stream';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -26,8 +26,9 @@ export const meta = {
id: '184663db-df88-4bc2-8b52-fb85f0681939',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Check if announcement exists
const announcement = await Announcements.findOne(ps.announcementId);
diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
index f7e910154d..a20719363b 100644
--- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
+++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
@@ -6,7 +6,7 @@ import define from '../../define';
import { Users, UserProfiles } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -15,8 +15,9 @@ export const meta = {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts
index 1599ccea6b..2941b441e2 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts
@@ -3,7 +3,7 @@ import define from '../../../define';
import { RegistryItems } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -13,8 +13,9 @@ export const meta = {
default: [],
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.where('item.domain IS NULL')
diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts
index 4edeae9e95..51371353c9 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts
@@ -4,7 +4,7 @@ import { RegistryItems } from '@/models/index';
import { ApiError } from '../../../error';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -26,8 +26,9 @@ export const meta = {
id: '97a1e8e7-c0f7-47d2-957a-92e61256e01a',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.where('item.domain IS NULL')
diff --git a/packages/backend/src/server/api/endpoints/i/registry/get.ts b/packages/backend/src/server/api/endpoints/i/registry/get.ts
index aa0695281a..ac617defb0 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/get.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts
@@ -4,7 +4,7 @@ import { RegistryItems } from '@/models/index';
import { ApiError } from '../../../error';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -26,8 +26,9 @@ export const meta = {
id: 'ac3ed68a-62f0-422b-a7bc-d5e09e8f6a6a',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.where('item.domain IS NULL')
diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts
index 9cac503538..0445922188 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts
@@ -3,7 +3,7 @@ import define from '../../../define';
import { RegistryItems } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -13,8 +13,9 @@ export const meta = {
default: [],
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.where('item.domain IS NULL')
diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys.ts b/packages/backend/src/server/api/endpoints/i/registry/keys.ts
index 215ccbd5b5..a3c9d0e5ee 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts
@@ -3,7 +3,7 @@ import define from '../../../define';
import { RegistryItems } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -13,8 +13,9 @@ export const meta = {
default: [],
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.select('item.key')
diff --git a/packages/backend/src/server/api/endpoints/i/registry/remove.ts b/packages/backend/src/server/api/endpoints/i/registry/remove.ts
index 17ce5851c0..08185f224b 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts
@@ -4,7 +4,7 @@ import { RegistryItems } from '@/models/index';
import { ApiError } from '../../../error';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -26,8 +26,9 @@ export const meta = {
id: '1fac4e8a-a6cd-4e39-a4a5-3a7e11f1b019',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.where('item.domain IS NULL')
diff --git a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts
index 45aeb59771..9de68ac6e8 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts
@@ -2,14 +2,15 @@ import define from '../../../define';
import { RegistryItems } from '@/models/index';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
params: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.select('item.scope')
diff --git a/packages/backend/src/server/api/endpoints/i/registry/set.ts b/packages/backend/src/server/api/endpoints/i/registry/set.ts
index 7c282064c3..27884046b4 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/set.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts
@@ -5,7 +5,7 @@ import { RegistryItems } from '@/models/index';
import { genId } from '@/misc/gen-id';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -23,8 +23,9 @@ export const meta = {
default: [],
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = RegistryItems.createQueryBuilder('item')
.where('item.domain IS NULL')
diff --git a/packages/backend/src/server/api/endpoints/i/revoke-token.ts b/packages/backend/src/server/api/endpoints/i/revoke-token.ts
index 1b6b18aa80..51721c5b58 100644
--- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts
+++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts
@@ -5,7 +5,7 @@ import { ID } from '@/misc/cafy-id';
import { publishUserEvent } from '@/services/stream';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -14,8 +14,9 @@ export const meta = {
validator: $.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const token = await AccessTokens.findOne(ps.tokenId);
diff --git a/packages/backend/src/server/api/endpoints/i/signin-history.ts b/packages/backend/src/server/api/endpoints/i/signin-history.ts
index 6f2f8fc8ca..796e2ec309 100644
--- a/packages/backend/src/server/api/endpoints/i/signin-history.ts
+++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts
@@ -5,7 +5,7 @@ import { Signins } from '@/models/index';
import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -23,8 +23,9 @@ export const meta = {
validator: $.optional.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Signins.createQueryBuilder('signin'), ps.sinceId, ps.untilId)
.andWhere(`signin.userId = :meId`, { meId: user.id });
diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts
index c1b753bfaf..9c82b74960 100644
--- a/packages/backend/src/server/api/endpoints/i/unpin.ts
+++ b/packages/backend/src/server/api/endpoints/i/unpin.ts
@@ -8,7 +8,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['account', 'notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -27,19 +27,20 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'MeDetailed',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
await removePinned(user, ps.noteId).catch(e => {
if (e.id === 'b302d4cf-c050-400a-bbb3-be208681f40c') throw new ApiError(meta.errors.noSuchNote);
throw e;
});
- return await Users.pack(user.id, user, {
+ return await Users.pack<true, true>(user.id, user, {
detail: true,
});
});
diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts
index d99fa2474d..b4479aa50d 100644
--- a/packages/backend/src/server/api/endpoints/i/update-email.ts
+++ b/packages/backend/src/server/api/endpoints/i/update-email.ts
@@ -11,7 +11,7 @@ import { ApiError } from '../../error';
import { validateEmailForAccount } from '@/services/validate-email-for-account';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -43,8 +43,9 @@ export const meta = {
id: 'a2defefb-f220-8849-0af6-17f816099323',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const profile = await UserProfiles.findOneOrFail(user.id);
diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts
index 5a62b39377..6b7e53aa1f 100644
--- a/packages/backend/src/server/api/endpoints/i/update.ts
+++ b/packages/backend/src/server/api/endpoints/i/update.ts
@@ -19,7 +19,7 @@ import { normalizeForSearch } from '@/misc/normalize-for-search';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -162,12 +162,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'MeDetailed',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, _user, token) => {
const user = await Users.findOneOrFail(_user.id);
const isSecure = token == null;
@@ -278,7 +279,7 @@ export default define(meta, async (ps, _user, token) => {
if (Object.keys(updates).length > 0) await Users.update(user.id, updates);
if (Object.keys(profileUpdates).length > 0) await UserProfiles.update(user.id, profileUpdates);
- const iObj = await Users.pack(user.id, user, {
+ const iObj = await Users.pack<true, true>(user.id, user, {
detail: true,
includeSecrets: isSecure,
});
diff --git a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts
index 6949e486ab..76a3131e6d 100644
--- a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts
+++ b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts
@@ -7,7 +7,7 @@ import { makePaginationQuery } from '../../common/make-pagination-query';
export const meta = {
tags: ['account', 'groups'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:user-groups',
@@ -27,27 +27,28 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
group: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserGroup',
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(UserGroupInvitations.createQueryBuilder('invitation'), ps.sinceId, ps.untilId)
.andWhere(`invitation.userId = :meId`, { meId: user.id })
diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts
index 4ca3d6ebed..5ac49cf96b 100644
--- a/packages/backend/src/server/api/endpoints/messaging/history.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/history.ts
@@ -7,7 +7,7 @@ import { Brackets } from 'typeorm';
export const meta = {
tags: ['messaging'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:messaging',
@@ -24,16 +24,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'MessagingMessage',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const mute = await Mutings.find({
muterId: user.id,
diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts
index 79e7764245..7dbddd80e2 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts
@@ -11,7 +11,7 @@ import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivit
export const meta = {
tags: ['messaging'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:messaging',
@@ -44,11 +44,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'MessagingMessage',
},
},
@@ -72,8 +72,9 @@ export const meta = {
id: 'a053a8dd-a491-4718-8f87-50775aad9284',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
if (ps.userId != null) {
// Fetch recipient (user)
diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts
index 02b22ead80..5ec16f5e5a 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts
@@ -11,7 +11,7 @@ import { createMessage } from '@/services/messages/create';
export const meta = {
tags: ['messaging'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:messaging',
@@ -34,8 +34,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'MessagingMessage',
},
@@ -82,8 +82,9 @@ export const meta = {
id: 'c15a5199-7422-4968-941a-2a462c478f7d',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
let recipientUser: User | undefined;
let recipientGroup: UserGroup | undefined;
diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts
index dd1c2e8dee..2975419cef 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts
@@ -9,7 +9,7 @@ import { deleteMessage } from '@/services/messages/delete';
export const meta = {
tags: ['messaging'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:messaging',
@@ -32,8 +32,9 @@ export const meta = {
id: '54b5b326-7925-42cf-8019-130fda8b56af',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const message = await MessagingMessages.findOne({
id: ps.messageId,
diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts
index 96d68b2605..42c3f49f6f 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts
@@ -8,7 +8,7 @@ import { readUserMessagingMessage, readGroupMessagingMessage } from '../../../co
export const meta = {
tags: ['messaging'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:messaging',
@@ -25,8 +25,9 @@ export const meta = {
id: '86d56a2f-a9c3-4afb-b13c-3e9bfef9aa14',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const message = await MessagingMessages.findOne(ps.messageId);
diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts
index bced077c12..693a7a04ec 100644
--- a/packages/backend/src/server/api/endpoints/meta.ts
+++ b/packages/backend/src/server/api/endpoints/meta.ts
@@ -9,7 +9,7 @@ import { MoreThan } from 'typeorm';
export const meta = {
tags: ['meta'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
detail: {
@@ -19,435 +19,436 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
maintainerName: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
maintainerEmail: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
version: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
example: config.version,
},
name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
uri: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'url',
example: 'https://misskey.example.com',
},
description: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
langs: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
tosUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
repositoryUrl: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
default: 'https://github.com/misskey-dev/misskey',
},
feedbackUrl: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
default: 'https://github.com/misskey-dev/misskey/issues/new',
},
secure: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
default: false,
},
disableRegistration: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
disableLocalTimeline: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
disableGlobalTimeline: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
driveCapacityPerLocalUserMb: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
driveCapacityPerRemoteUserMb: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
cacheRemoteFiles: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
proxyRemoteFiles: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
emailRequiredForSignup: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
enableHcaptcha: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
hcaptchaSiteKey: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
enableRecaptcha: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
recaptchaSiteKey: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
swPublickey: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
mascotImageUrl: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
default: '/assets/ai.png',
},
bannerUrl: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
errorImageUrl: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
default: 'https://xn--931a.moe/aiart/yubitun.png',
},
iconUrl: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
maxNoteTextLength: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
default: 500,
},
emojis: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
aliases: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
category: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
host: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
url: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'url',
},
},
},
},
ads: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
place: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
url: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'url',
},
imageUrl: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'url',
},
},
},
},
requireSetup: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
example: false,
},
enableEmail: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
enableTwitterIntegration: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
enableGithubIntegration: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
enableDiscordIntegration: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
enableServiceWorker: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
translatorAvailable: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
proxyAccountName: {
- type: 'string' as const,
- optional: false as const, nullable: true as const,
+ type: 'string',
+ optional: false, nullable: true,
},
features: {
- type: 'object' as const,
- optional: true as const, nullable: false as const,
+ type: 'object',
+ optional: true, nullable: false,
properties: {
registration: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
localTimeLine: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
globalTimeLine: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
elasticsearch: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
hcaptcha: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
recaptcha: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
objectStorage: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
twitter: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
github: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
discord: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
serviceWorker: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
miauth: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
default: true,
},
},
},
userStarForReactionFallback: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
},
pinnedUsers: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
+ type: 'array',
+ optional: true, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
hiddenTags: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
+ type: 'array',
+ optional: true, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
blockedHosts: {
- type: 'array' as const,
- optional: true as const, nullable: false as const,
+ type: 'array',
+ optional: true, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
hcaptchaSecretKey: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
recaptchaSecretKey: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
proxyAccountId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
format: 'id',
},
twitterConsumerKey: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
twitterConsumerSecret: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
githubClientId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
githubClientSecret: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
discordClientId: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
discordClientSecret: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
summaryProxy: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
email: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
smtpSecure: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
},
smtpHost: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
smtpPort: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
smtpUser: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
smtpPass: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
swPrivateKey: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
useObjectStorage: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
},
objectStorageBaseUrl: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
objectStorageBucket: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
objectStoragePrefix: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
objectStorageEndpoint: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
objectStorageRegion: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
objectStoragePort: {
- type: 'number' as const,
- optional: true as const, nullable: true as const,
+ type: 'number',
+ optional: true, nullable: true,
},
objectStorageAccessKey: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
objectStorageSecretKey: {
- type: 'string' as const,
- optional: true as const, nullable: true as const,
+ type: 'string',
+ optional: true, nullable: true,
},
objectStorageUseSSL: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
},
objectStorageUseProxy: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
},
objectStorageSetPublicRead: {
- type: 'boolean' as const,
- optional: true as const, nullable: false as const,
+ type: 'boolean',
+ optional: true, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const instance = await fetchMeta(true);
diff --git a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts
index 29f109f369..158c8877e9 100644
--- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts
+++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts
@@ -7,7 +7,7 @@ import { secureRndstr } from '@/misc/secure-rndstr';
export const meta = {
tags: ['auth'],
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
@@ -34,17 +34,18 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
token: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Generate access token
const accessToken = secureRndstr(32, true);
diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts
index 703611f67f..6ba5a453c3 100644
--- a/packages/backend/src/server/api/endpoints/mute/create.ts
+++ b/packages/backend/src/server/api/endpoints/mute/create.ts
@@ -11,7 +11,7 @@ import { publishUserEvent } from '@/services/stream';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:mutes',
@@ -40,8 +40,9 @@ export const meta = {
id: '7e7359cb-160c-4956-b08f-4d1c653cd007',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const muter = user;
diff --git a/packages/backend/src/server/api/endpoints/mute/delete.ts b/packages/backend/src/server/api/endpoints/mute/delete.ts
index aa8c33d046..21948dc3d1 100644
--- a/packages/backend/src/server/api/endpoints/mute/delete.ts
+++ b/packages/backend/src/server/api/endpoints/mute/delete.ts
@@ -9,7 +9,7 @@ import { publishUserEvent } from '@/services/stream';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:mutes',
@@ -38,8 +38,9 @@ export const meta = {
id: '5467d020-daa9-4553-81e1-135c0c35a96d',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const muter = user;
diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts
index 48b6ddb060..4c6a81b63c 100644
--- a/packages/backend/src/server/api/endpoints/mute/list.ts
+++ b/packages/backend/src/server/api/endpoints/mute/list.ts
@@ -7,7 +7,7 @@ import { Mutings } from '@/models/index';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:mutes',
@@ -27,16 +27,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Muting',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(Mutings.createQueryBuilder('muting'), ps.sinceId, ps.untilId)
.andWhere(`muting.muterId = :meId`, { meId: me.id });
diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts
index 1164f5f6f3..42bd5c5f75 100644
--- a/packages/backend/src/server/api/endpoints/my/apps.ts
+++ b/packages/backend/src/server/api/endpoints/my/apps.ts
@@ -5,7 +5,7 @@ import { Apps } from '@/models/index';
export const meta = {
tags: ['account', 'app'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
limit: {
@@ -20,55 +20,56 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
name: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
callbackUrl: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
permission: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
secret: {
- type: 'string' as const,
- optional: true as const, nullable: false as const,
+ type: 'string',
+ optional: true, nullable: false,
},
isAuthorized: {
- type: 'object' as const,
- optional: true as const, nullable: false as const,
+ type: 'object',
+ optional: true, nullable: false,
properties: {
appId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
userId: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
},
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = {
userId: user.id,
diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts
index 37d1b03dce..9edc6cb11c 100644
--- a/packages/backend/src/server/api/endpoints/notes.ts
+++ b/packages/backend/src/server/api/endpoints/notes.ts
@@ -43,16 +43,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.andWhere(`note.visibility = 'public'`)
diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts
index acd9d6f7e4..088ef65e96 100644
--- a/packages/backend/src/server/api/endpoints/notes/children.ts
+++ b/packages/backend/src/server/api/endpoints/notes/children.ts
@@ -12,7 +12,7 @@ import { generateMutedInstanceQuery } from '../../common/generate-muted-instance
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -34,16 +34,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.andWhere(new Brackets(qb => { qb
diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts
index deb14da16c..b89c6db4a8 100644
--- a/packages/backend/src/server/api/endpoints/notes/clips.ts
+++ b/packages/backend/src/server/api/endpoints/notes/clips.ts
@@ -9,7 +9,7 @@ import { In } from 'typeorm';
export const meta = {
tags: ['clips', 'notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -18,12 +18,12 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'Note',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'Clip',
},
},
@@ -34,8 +34,9 @@ export const meta = {
id: '47db1a1c-b0af-458d-8fb4-986e4efafe1e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts
index 8fdbb7fdeb..4bd89c32e7 100644
--- a/packages/backend/src/server/api/endpoints/notes/conversation.ts
+++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts
@@ -9,7 +9,7 @@ import { Notes } from '@/models/index';
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -28,11 +28,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -44,8 +44,9 @@ export const meta = {
id: 'e1035875-9551-45ec-afa8-1ded1fcb53c8',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts
index 9567374c63..4efa76b248 100644
--- a/packages/backend/src/server/api/endpoints/notes/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/create.ts
@@ -25,7 +25,7 @@ setInterval(() => {
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
limit: {
duration: ms('1hour'),
@@ -48,7 +48,7 @@ export const meta = {
validator: $.optional.nullable.str.pipe(text =>
text.trim() != ''
&& length(text.trim()) <= maxNoteTextLength
- && Array.from(text.trim()).length <= DB_MAX_NOTE_TEXT_LENGTH // DB limit
+ && Array.from(text.trim()).length <= DB_MAX_NOTE_TEXT_LENGTH, // DB limit
),
default: null,
},
@@ -78,11 +78,11 @@ export const meta = {
},
fileIds: {
- validator: $.optional.arr($.type(ID)).unique().range(1, 4),
+ validator: $.optional.arr($.type(ID)).unique().range(1, 16),
},
mediaIds: {
- validator: $.optional.arr($.type(ID)).unique().range(1, 4),
+ validator: $.optional.arr($.type(ID)).unique().range(1, 16),
deprecated: true,
},
@@ -113,12 +113,12 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
createdNote: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -173,8 +173,9 @@ export const meta = {
id: 'b390d7e1-8a5e-46ed-b625-06271cafd3d3',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
let visibleUsers: User[] = [];
if (ps.visibleUserIds) {
diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts
index 532213c725..9e080d9e99 100644
--- a/packages/backend/src/server/api/endpoints/notes/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/delete.ts
@@ -10,7 +10,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:notes',
@@ -39,8 +39,9 @@ export const meta = {
id: 'fe8d7103-0ea8-4ec3-814d-f8b401dc69e9',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts
index 14191eefde..78da6a3b00 100644
--- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts
@@ -9,7 +9,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['notes', 'favorites'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:favorites',
@@ -32,8 +32,9 @@ export const meta = {
id: 'a402c12b-34dd-41d2-97d8-4d2ffd96a1a6',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Get favoritee
const note = await getNote(ps.noteId).catch(e => {
diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts
index f8d3b63026..3f3d50f0d5 100644
--- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts
@@ -8,7 +8,7 @@ import { NoteFavorites } from '@/models/index';
export const meta = {
tags: ['notes', 'favorites'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:favorites',
@@ -31,8 +31,9 @@ export const meta = {
id: 'b625fc69-635e-45e9-86f4-dbefbef35af5',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Get favoritee
const note = await getNote(ps.noteId).catch(e => {
diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts
index 2a14c52abc..5a47fb9e08 100644
--- a/packages/backend/src/server/api/endpoints/notes/featured.ts
+++ b/packages/backend/src/server/api/endpoints/notes/featured.ts
@@ -7,7 +7,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
limit: {
@@ -22,16 +22,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const max = 30;
const day = 1000 * 60 * 60 * 24 * 3; // 3日前まで
diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
index c3be042bfb..cac8b7d8a9 100644
--- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
@@ -43,11 +43,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -59,8 +59,9 @@ export const meta = {
id: '0332fc13-6ab2-4427-ae80-a9fadffd1a6b',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const m = await fetchMeta();
if (m.disableGlobalTimeline) {
diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
index 4a0b9d49d7..9683df4611 100644
--- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
@@ -18,7 +18,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
limit: {
@@ -63,11 +63,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -79,8 +79,9 @@ export const meta = {
id: '620763f4-f621-4533-ab33-0577a1a3c342',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const m = await fetchMeta();
if (m.disableLocalTimeline && !user.isAdmin && !user.isModerator) {
diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts
index 113268982b..7776644124 100644
--- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts
@@ -54,11 +54,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -70,8 +70,9 @@ export const meta = {
id: '45a6eb02-7695-4393-b023-dd3be9aaaefd',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const m = await fetchMeta();
if (m.disableLocalTimeline) {
diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts
index 916209ca71..81b3844365 100644
--- a/packages/backend/src/server/api/endpoints/notes/mentions.ts
+++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts
@@ -13,7 +13,7 @@ import { generateMutedNoteThreadQuery } from '../../common/generate-muted-note-t
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
following: {
@@ -40,16 +40,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const followingQuery = Followings.createQueryBuilder('following')
.select('following.followeeId')
diff --git a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts
index 9f133c071e..79b558e65e 100644
--- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts
+++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts
@@ -6,7 +6,7 @@ import { Brackets, In } from 'typeorm';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
limit: {
@@ -21,16 +21,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = Polls.createQueryBuilder('poll')
.where('poll.userHost IS NULL')
diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
index 479034389a..77387cacb2 100644
--- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
+++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
@@ -17,7 +17,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:votes',
@@ -68,8 +68,9 @@ export const meta = {
id: '85a5377e-b1e9-4617-b0b9-5bea73331e49',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const createdAt = new Date();
diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts
index dca6deb06f..5205a78171 100644
--- a/packages/backend/src/server/api/endpoints/notes/reactions.ts
+++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts
@@ -10,7 +10,7 @@ import { NoteReaction } from '@/models/entities/note-reaction';
export const meta = {
tags: ['notes', 'reactions'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -41,11 +41,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'NoteReaction',
},
},
@@ -57,8 +57,9 @@ export const meta = {
id: '263fff3d-d0e1-4af4-bea7-8408059b451a',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts
index 879b32cd07..1b42781ceb 100644
--- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts
@@ -8,7 +8,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['reactions', 'notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:reactions',
@@ -41,8 +41,9 @@ export const meta = {
id: '20ef5475-9f38-4e4c-bd33-de6d979498ec',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts
index eb9281f7a0..1d686b5971 100644
--- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts
@@ -9,7 +9,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['reactions', 'notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:reactions',
@@ -38,8 +38,9 @@ export const meta = {
id: '92f4426d-4196-4125-aa5b-02943e2ec8fc',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts
index d53d725165..f71d23146a 100644
--- a/packages/backend/src/server/api/endpoints/notes/renotes.ts
+++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts
@@ -12,7 +12,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -34,11 +34,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -50,8 +50,9 @@ export const meta = {
id: '12908022-2e21-46cd-ba6a-3edaf6093f46',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts
index e39878f4f2..62c56534e1 100644
--- a/packages/backend/src/server/api/endpoints/notes/replies.ts
+++ b/packages/backend/src/server/api/endpoints/notes/replies.ts
@@ -10,7 +10,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -32,16 +32,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.andWhere('note.replyId = :replyId', { replyId: ps.noteId })
diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts
index 2275f7c1ae..87eaffe2f1 100644
--- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts
+++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts
@@ -56,16 +56,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.innerJoinAndSelect('note.user', 'user')
diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts
index b49ee87199..e75212b14b 100644
--- a/packages/backend/src/server/api/endpoints/notes/search.ts
+++ b/packages/backend/src/server/api/endpoints/notes/search.ts
@@ -13,7 +13,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
query: {
@@ -50,19 +50,20 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
errors: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
if (es == null) {
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId);
diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts
index 1f7f84cbe4..feb94be1a1 100644
--- a/packages/backend/src/server/api/endpoints/notes/show.ts
+++ b/packages/backend/src/server/api/endpoints/notes/show.ts
@@ -8,7 +8,7 @@ import { Notes } from '@/models/index';
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -17,8 +17,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
@@ -29,8 +29,9 @@ export const meta = {
id: '24fcbfc6-2e37-42b6-8388-c29b3861a08d',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts
index 9673b5a77c..c3e9090bbf 100644
--- a/packages/backend/src/server/api/endpoints/notes/state.ts
+++ b/packages/backend/src/server/api/endpoints/notes/state.ts
@@ -6,7 +6,7 @@ import { NoteFavorites, Notes, NoteThreadMutings, NoteWatchings } from '@/models
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
noteId: {
@@ -15,25 +15,26 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
isFavorited: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isWatching: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isMutedThread: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await Notes.findOneOrFail(ps.noteId);
diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts
index dd2f887f01..a8b50d90f6 100644
--- a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts
@@ -10,7 +10,7 @@ import readNote from '@/services/note/read';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -27,8 +27,9 @@ export const meta = {
id: '5ff67ada-ed3b-2e71-8e87-a1a421e177d2',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts
index d34c99f901..f76b526ce1 100644
--- a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts
@@ -8,7 +8,7 @@ import { NoteThreadMutings } from '@/models';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -25,8 +25,9 @@ export const meta = {
id: 'bddd57ac-ceb3-b29d-4334-86ea5fae481a',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts
index 211b8d4f40..8be2861aec 100644
--- a/packages/backend/src/server/api/endpoints/notes/timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts
@@ -16,7 +16,7 @@ import { generateBlockedUserQuery } from '../../common/generate-block-query';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
limit: {
@@ -61,16 +61,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const hasFollowing = (await Followings.count({
where: {
diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts
index 647ae4efe7..ed069cb75a 100644
--- a/packages/backend/src/server/api/endpoints/notes/translate.ts
+++ b/packages/backend/src/server/api/endpoints/notes/translate.ts
@@ -13,7 +13,7 @@ import { Notes } from '@/models';
export const meta = {
tags: ['notes'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
noteId: {
@@ -25,8 +25,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
},
errors: {
@@ -36,8 +36,9 @@ export const meta = {
id: 'bea9b03f-36e0-49c5-a4db-627a029f8971',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts
index 3661db4d86..8db543d328 100644
--- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts
+++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts
@@ -10,7 +10,7 @@ import { Notes, Users } from '@/models/index';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:notes',
@@ -33,8 +33,9 @@ export const meta = {
id: 'efd4a259-2442-496b-8dd7-b255aa1a160f',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts
index d614ddf453..89de73fb9d 100644
--- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts
@@ -11,7 +11,7 @@ import { Brackets } from 'typeorm';
export const meta = {
tags: ['notes', 'lists'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
listId: {
@@ -60,11 +60,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -76,8 +76,9 @@ export const meta = {
id: '8fb1fbd5-e476-4c37-9fb0-43d55b63a2ff',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const list = await UserLists.findOne({
id: ps.listId,
diff --git a/packages/backend/src/server/api/endpoints/notes/watching/create.ts b/packages/backend/src/server/api/endpoints/notes/watching/create.ts
index 7f724953df..6433c6bc2a 100644
--- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts
@@ -8,7 +8,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -25,8 +25,9 @@ export const meta = {
id: 'ea0e37a6-90a3-4f58-ba6b-c328ca206fc7',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts
index 76a368c51d..3e9faa2b23 100644
--- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts
@@ -8,7 +8,7 @@ import { ApiError } from '../../../error';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -25,8 +25,9 @@ export const meta = {
id: '09b3695c-f72c-4731-a428-7cff825fc82e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts
index e285eae460..bd8a7ba1b7 100644
--- a/packages/backend/src/server/api/endpoints/notifications/create.ts
+++ b/packages/backend/src/server/api/endpoints/notifications/create.ts
@@ -5,7 +5,7 @@ import { createNotification } from '@/services/create-notification';
export const meta = {
tags: ['notifications'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:notifications',
@@ -25,8 +25,9 @@ export const meta = {
errors: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user, token) => {
createNotification(user.id, 'app', {
appAccessTokenId: token ? token.id : null,
diff --git a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts
index 963af6cb43..4cec38a95d 100644
--- a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts
+++ b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts
@@ -5,11 +5,12 @@ import { Notifications } from '@/models/index';
export const meta = {
tags: ['notifications', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:notifications',
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Update documents
await Notifications.update({
diff --git a/packages/backend/src/server/api/endpoints/notifications/read.ts b/packages/backend/src/server/api/endpoints/notifications/read.ts
index 9ff0bbeb83..7e23bc234d 100644
--- a/packages/backend/src/server/api/endpoints/notifications/read.ts
+++ b/packages/backend/src/server/api/endpoints/notifications/read.ts
@@ -9,7 +9,7 @@ import { ApiError } from '../../error';
export const meta = {
tags: ['notifications', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:notifications',
@@ -26,8 +26,9 @@ export const meta = {
id: 'efa929d5-05b5-47d1-beec-e6a4dbed011e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const notification = await Notifications.findOne({
notifieeId: user.id,
diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts
index 421eed5ea1..61c0160f83 100644
--- a/packages/backend/src/server/api/endpoints/page-push.ts
+++ b/packages/backend/src/server/api/endpoints/page-push.ts
@@ -6,7 +6,7 @@ import { Users, Pages } from '@/models/index';
import { ApiError } from '../error';
export const meta = {
- requireCredential: true as const,
+ requireCredential: true,
secure: true,
params: {
@@ -30,8 +30,9 @@ export const meta = {
id: '4a13ad31-6729-46b4-b9af-e86b265c2e74',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const page = await Pages.findOne(ps.pageId);
if (page == null) {
diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts
index 441ba54265..7ee50fbdfa 100644
--- a/packages/backend/src/server/api/endpoints/pages/create.ts
+++ b/packages/backend/src/server/api/endpoints/pages/create.ts
@@ -10,7 +10,7 @@ import { ApiError } from '../../error';
export const meta = {
tags: ['pages'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:pages',
@@ -65,8 +65,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Page',
},
@@ -82,8 +82,9 @@ export const meta = {
id: '4650348e-301c-499a-83c9-6aa988c66bc1',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
let eyeCatchingImage = null;
if (ps.eyeCatchingImageId != null) {
@@ -106,7 +107,7 @@ export default define(meta, async (ps, user) => {
}
});
- const page = await Pages.save(new Page({
+ const page = await Pages.insert(new Page({
id: genId(),
createdAt: new Date(),
updatedAt: new Date(),
@@ -122,7 +123,7 @@ export default define(meta, async (ps, user) => {
alignCenter: ps.alignCenter,
hideTitleWhenPinned: ps.hideTitleWhenPinned,
font: ps.font,
- }));
+ })).then(x => Pages.findOneOrFail(x.identifiers[0]));
return await Pages.pack(page);
});
diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts
index 7a45237697..aeda823e52 100644
--- a/packages/backend/src/server/api/endpoints/pages/delete.ts
+++ b/packages/backend/src/server/api/endpoints/pages/delete.ts
@@ -7,7 +7,7 @@ import { ID } from '@/misc/cafy-id';
export const meta = {
tags: ['pages'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:pages',
@@ -30,8 +30,9 @@ export const meta = {
id: '8b741b3e-2c22-44b3-a15f-29949aa1601e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const page = await Pages.findOne(ps.pageId);
if (page == null) {
diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts
index 1dcfb8dd83..7f0d58b350 100644
--- a/packages/backend/src/server/api/endpoints/pages/featured.ts
+++ b/packages/backend/src/server/api/endpoints/pages/featured.ts
@@ -4,19 +4,20 @@ import { Pages } from '@/models/index';
export const meta = {
tags: ['pages'],
- requireCredential: false as const,
+ requireCredential: false,
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Page',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Pages.createQueryBuilder('page')
.where('page.visibility = \'public\'')
diff --git a/packages/backend/src/server/api/endpoints/pages/like.ts b/packages/backend/src/server/api/endpoints/pages/like.ts
index f48359ab2d..c479f637a9 100644
--- a/packages/backend/src/server/api/endpoints/pages/like.ts
+++ b/packages/backend/src/server/api/endpoints/pages/like.ts
@@ -8,7 +8,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['pages'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:page-likes',
@@ -37,8 +37,9 @@ export const meta = {
id: 'cc98a8a2-0dc3-4123-b198-62c71df18ed3',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const page = await Pages.findOne(ps.pageId);
if (page == null) {
diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts
index d94c7457da..5cda5386d5 100644
--- a/packages/backend/src/server/api/endpoints/pages/show.ts
+++ b/packages/backend/src/server/api/endpoints/pages/show.ts
@@ -8,7 +8,7 @@ import { Page } from '@/models/entities/page';
export const meta = {
tags: ['pages'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
pageId: {
@@ -25,8 +25,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Page',
},
@@ -37,8 +37,9 @@ export const meta = {
id: '222120c0-3ead-4528-811b-b96f233388d7',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
let page: Page | undefined;
diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts
index 5a2b68e425..cca5e5b5a9 100644
--- a/packages/backend/src/server/api/endpoints/pages/unlike.ts
+++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts
@@ -7,7 +7,7 @@ import { Pages, PageLikes } from '@/models/index';
export const meta = {
tags: ['pages'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:page-likes',
@@ -30,8 +30,9 @@ export const meta = {
id: 'f5e586b0-ce93-4050-b0e3-7f31af5259ee',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const page = await Pages.findOne(ps.pageId);
if (page == null) {
diff --git a/packages/backend/src/server/api/endpoints/pages/update.ts b/packages/backend/src/server/api/endpoints/pages/update.ts
index f980d9207b..991085ee09 100644
--- a/packages/backend/src/server/api/endpoints/pages/update.ts
+++ b/packages/backend/src/server/api/endpoints/pages/update.ts
@@ -9,7 +9,7 @@ import { Not } from 'typeorm';
export const meta = {
tags: ['pages'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:pages',
@@ -88,8 +88,9 @@ export const meta = {
id: '2298a392-d4a1-44c5-9ebb-ac1aeaa5a9ab',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const page = await Pages.findOne(ps.pageId);
if (page == null) {
diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts
index c8f67981f5..3eab70ae2e 100644
--- a/packages/backend/src/server/api/endpoints/ping.ts
+++ b/packages/backend/src/server/api/endpoints/ping.ts
@@ -1,7 +1,7 @@
import define from '../define';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
tags: ['meta'],
@@ -9,17 +9,18 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
pong: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
return {
pong: Date.now(),
diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts
index 9d8d3963b4..ff0e22555f 100644
--- a/packages/backend/src/server/api/endpoints/pinned-users.ts
+++ b/packages/backend/src/server/api/endpoints/pinned-users.ts
@@ -7,22 +7,23 @@ import { User } from '@/models/entities/user';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const meta = await fetchMeta();
diff --git a/packages/backend/src/server/api/endpoints/promo/read.ts b/packages/backend/src/server/api/endpoints/promo/read.ts
index ac3cd9cd0b..8d8c60d755 100644
--- a/packages/backend/src/server/api/endpoints/promo/read.ts
+++ b/packages/backend/src/server/api/endpoints/promo/read.ts
@@ -9,7 +9,7 @@ import { genId } from '@/misc/gen-id';
export const meta = {
tags: ['notes'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
noteId: {
@@ -24,8 +24,9 @@ export const meta = {
id: 'd785b897-fcd3-4fe9-8fc3-b85c26e6c932',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const note = await getNote(ps.noteId).catch(e => {
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
diff --git a/packages/backend/src/server/api/endpoints/request-reset-password.ts b/packages/backend/src/server/api/endpoints/request-reset-password.ts
index 6caf572222..af1aeb4311 100644
--- a/packages/backend/src/server/api/endpoints/request-reset-password.ts
+++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts
@@ -11,7 +11,7 @@ import { genId } from '@/misc/gen-id';
import { IsNull } from 'typeorm';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
limit: {
duration: ms('1hour'),
@@ -31,8 +31,9 @@ export const meta = {
errors: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
const user = await Users.findOne({
usernameLower: ps.username.toLowerCase(),
diff --git a/packages/backend/src/server/api/endpoints/reset-db.ts b/packages/backend/src/server/api/endpoints/reset-db.ts
index f6fd5735d9..e99dc9db15 100644
--- a/packages/backend/src/server/api/endpoints/reset-db.ts
+++ b/packages/backend/src/server/api/endpoints/reset-db.ts
@@ -4,7 +4,7 @@ import { ApiError } from '../error';
import { resetDb } from '@/db/postgre';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
params: {
},
@@ -12,8 +12,9 @@ export const meta = {
errors: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
if (process.env.NODE_ENV !== 'test') throw 'NODE_ENV is not a test';
diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts
index 706f0a32c0..a7366584b1 100644
--- a/packages/backend/src/server/api/endpoints/reset-password.ts
+++ b/packages/backend/src/server/api/endpoints/reset-password.ts
@@ -6,7 +6,7 @@ import { Users, UserProfiles, PasswordResetRequests } from '@/models/index';
import { ApiError } from '../error';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
params: {
token: {
@@ -21,8 +21,9 @@ export const meta = {
errors: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const req = await PasswordResetRequests.findOneOrFail({
token: ps.token,
diff --git a/packages/backend/src/server/api/endpoints/room/show.ts b/packages/backend/src/server/api/endpoints/room/show.ts
deleted file mode 100644
index ec53982ebb..0000000000
--- a/packages/backend/src/server/api/endpoints/room/show.ts
+++ /dev/null
@@ -1,159 +0,0 @@
-import $ from 'cafy';
-import define from '../../define';
-import { ApiError } from '../../error';
-import { Users, UserProfiles } from '@/models/index';
-import { ID } from '@/misc/cafy-id';
-import { toPunyNullable } from '@/misc/convert-host';
-
-export const meta = {
- tags: ['room'],
-
- requireCredential: false as const,
-
- params: {
- userId: {
- validator: $.optional.type(ID),
- },
-
- username: {
- validator: $.optional.str,
- },
-
- host: {
- validator: $.optional.nullable.str,
- },
- },
-
- errors: {
- noSuchUser: {
- message: 'No such user.',
- code: 'NO_SUCH_USER',
- id: '7ad3fa3e-5e12-42f0-b23a-f3d13f10ee4b',
- },
- },
-
- res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- roomType: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- enum: ['default', 'washitsu'],
- },
- furnitures: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
- items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- type: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- },
- props: {
- type: 'object' as const,
- optional: true as const, nullable: false as const,
- },
- position: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- x: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- y: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- z: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
- rotation: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- properties: {
- x: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- y: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- z: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
- },
- },
- },
- },
- },
- },
- carpetColor: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
- format: 'hex',
- example: '#85CAF0',
- },
- },
- },
-};
-
-export default define(meta, async (ps, me) => {
- const user = await Users.findOne(ps.userId != null
- ? { id: ps.userId }
- : { usernameLower: ps.username!.toLowerCase(), host: toPunyNullable(ps.host) });
-
- if (user == null) {
- throw new ApiError(meta.errors.noSuchUser);
- }
-
- const profile = await UserProfiles.findOneOrFail(user.id);
-
- if (profile.room.furnitures == null) {
- await UserProfiles.update(user.id, {
- room: {
- furnitures: [],
- ...profile.room,
- },
- });
-
- profile.room.furnitures = [];
- }
-
- if (profile.room.roomType == null) {
- const initialType = 'default';
- await UserProfiles.update(user.id, {
- room: {
- roomType: initialType as any,
- ...profile.room,
- },
- });
-
- profile.room.roomType = initialType;
- }
-
- if (profile.room.carpetColor == null) {
- const initialColor = '#85CAF0';
- await UserProfiles.update(user.id, {
- room: {
- carpetColor: initialColor as any,
- ...profile.room,
- },
- });
-
- profile.room.carpetColor = initialColor;
- }
-
- return profile.room;
-});
diff --git a/packages/backend/src/server/api/endpoints/room/update.ts b/packages/backend/src/server/api/endpoints/room/update.ts
deleted file mode 100644
index f9fc2b278e..0000000000
--- a/packages/backend/src/server/api/endpoints/room/update.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import $ from 'cafy';
-import { publishMainStream } from '@/services/stream';
-import define from '../../define';
-import { Users, UserProfiles } from '@/models/index';
-
-export const meta = {
- tags: ['room'],
-
- requireCredential: true as const,
-
- params: {
- room: {
- validator: $.obj({
- furnitures: $.arr($.obj({
- id: $.str,
- type: $.str,
- position: $.obj({
- x: $.num,
- y: $.num,
- z: $.num,
- }),
- rotation: $.obj({
- x: $.num,
- y: $.num,
- z: $.num,
- }),
- props: $.optional.nullable.obj(),
- })),
- roomType: $.str,
- carpetColor: $.str,
- }),
- },
- },
-};
-
-export default define(meta, async (ps, user) => {
- await UserProfiles.update(user.id, {
- room: ps.room as any,
- });
-
- const iObj = await Users.pack(user.id, user, {
- detail: true,
- includeSecrets: true,
- });
-
- // Publish meUpdated event
- publishMainStream(user.id, 'meUpdated', iObj);
-
- // TODO: レスポンスがおかしいと思う by YuzuRyo61
- return iObj;
-});
diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts
index be502cf24a..1ad2c54ab5 100644
--- a/packages/backend/src/server/api/endpoints/server-info.ts
+++ b/packages/backend/src/server/api/endpoints/server-info.ts
@@ -3,7 +3,7 @@ import * as si from 'systeminformation';
import define from '../define';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
desc: {
},
@@ -12,8 +12,9 @@ export const meta = {
params: {
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const memStats = await si.mem();
const fsStats = await si.fsSize();
diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts
index f47b0d0a2b..9879ef2adf 100644
--- a/packages/backend/src/server/api/endpoints/stats.ts
+++ b/packages/backend/src/server/api/endpoints/stats.ts
@@ -3,7 +3,7 @@ import { NoteReactions, Notes, Users } from '@/models/index';
import { federationChart, driveChart } from '@/services/chart/index';
export const meta = {
- requireCredential: false as const,
+ requireCredential: false,
tags: ['meta'],
@@ -11,41 +11,42 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
notesCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
originalNotesCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
usersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
originalUsersCount: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
instances: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
driveUsageLocal: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
driveUsageRemote: {
- type: 'number' as const,
- optional: false as const, nullable: false as const,
+ type: 'number',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async () => {
const [
notesCount,
diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts
index 9734746770..ae3e9ce77a 100644
--- a/packages/backend/src/server/api/endpoints/sw/register.ts
+++ b/packages/backend/src/server/api/endpoints/sw/register.ts
@@ -7,7 +7,7 @@ import { SwSubscriptions } from '@/models/index';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
endpoint: {
@@ -24,22 +24,23 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
state: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
enum: ['already-subscribed', 'subscribed'],
},
key: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// if already subscribed
const exist = await SwSubscriptions.findOne({
diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts
index 24ee861f16..6f569e9417 100644
--- a/packages/backend/src/server/api/endpoints/sw/unregister.ts
+++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts
@@ -5,15 +5,16 @@ import { SwSubscriptions } from '../../../../models';
export const meta = {
tags: ['account'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
endpoint: {
validator: $.str,
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
await SwSubscriptions.delete({
userId: user.id,
diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts
index f1b46a2b65..74120fc406 100644
--- a/packages/backend/src/server/api/endpoints/username/available.ts
+++ b/packages/backend/src/server/api/endpoints/username/available.ts
@@ -5,7 +5,7 @@ import { Users, UsedUsernames } from '@/models/index';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
username: {
@@ -14,17 +14,18 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
available: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps) => {
// Get exist
const exist = await Users.count({
diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts
index 601578de27..6b11ec0f01 100644
--- a/packages/backend/src/server/api/endpoints/users.ts
+++ b/packages/backend/src/server/api/endpoints/users.ts
@@ -7,7 +7,7 @@ import { generateBlockQueryForUsers } from '../common/generate-block-query';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
limit: {
@@ -53,16 +53,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Users.createQueryBuilder('user');
query.where('user.isExplorable = TRUE');
diff --git a/packages/backend/src/server/api/endpoints/users/clips.ts b/packages/backend/src/server/api/endpoints/users/clips.ts
index f5964c54db..d4152fbf50 100644
--- a/packages/backend/src/server/api/endpoints/users/clips.ts
+++ b/packages/backend/src/server/api/endpoints/users/clips.ts
@@ -25,8 +25,9 @@ export const meta = {
validator: $.optional.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Clips.createQueryBuilder('clip'), ps.sinceId, ps.untilId)
.andWhere(`clip.userId = :userId`, { userId: ps.userId })
diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts
index 535b10412e..6214ab40ba 100644
--- a/packages/backend/src/server/api/endpoints/users/followers.ts
+++ b/packages/backend/src/server/api/endpoints/users/followers.ts
@@ -9,7 +9,7 @@ import { toPunyNullable } from '@/misc/convert-host';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
userId: {
@@ -39,11 +39,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Following',
},
},
@@ -61,8 +61,9 @@ export const meta = {
id: '3c6a84db-d619-26af-ca14-06232a21df8a',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId != null
? { id: ps.userId }
diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts
index 58c72bb957..76112eab25 100644
--- a/packages/backend/src/server/api/endpoints/users/following.ts
+++ b/packages/backend/src/server/api/endpoints/users/following.ts
@@ -9,7 +9,7 @@ import { toPunyNullable } from '@/misc/convert-host';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
userId: {
@@ -39,11 +39,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Following',
},
},
@@ -61,8 +61,9 @@ export const meta = {
id: 'f6cdb0df-c19f-ec5c-7dbb-0ba84a1f92ba',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId != null
? { id: ps.userId }
diff --git a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts
index 6ef884deda..c5f08b4c94 100644
--- a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts
+++ b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts
@@ -25,8 +25,9 @@ export const meta = {
validator: $.optional.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId)
.andWhere(`post.userId = :userId`, { userId: ps.userId });
diff --git a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts
index a88de7ac83..d886d3355a 100644
--- a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts
+++ b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts
@@ -10,7 +10,7 @@ import { Notes, Users } from '@/models/index';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
userId: {
@@ -24,12 +24,22 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ user: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
+ },
+ weight: {
+ type: 'number',
+ optional: false, nullable: false,
+ },
+ },
},
},
@@ -40,8 +50,9 @@ export const meta = {
id: 'e6965129-7b2a-40a4-bae2-cd84cd434822',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Lookup user
const user = await getUser(ps.userId).catch(e => {
diff --git a/packages/backend/src/server/api/endpoints/users/groups/create.ts b/packages/backend/src/server/api/endpoints/users/groups/create.ts
index 12ee11ba55..25e29de01c 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/create.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts
@@ -8,7 +8,7 @@ import { UserGroupJoining } from '@/models/entities/user-group-joining';
export const meta = {
tags: ['groups'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -19,12 +19,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserGroup',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userGroup = await UserGroups.insert({
id: genId(),
diff --git a/packages/backend/src/server/api/endpoints/users/groups/delete.ts b/packages/backend/src/server/api/endpoints/users/groups/delete.ts
index dbc77dd8fe..f30ab78ca0 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts
@@ -7,7 +7,7 @@ import { UserGroups } from '@/models/index';
export const meta = {
tags: ['groups'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -24,8 +24,9 @@ export const meta = {
id: '63dbd64c-cd77-413f-8e08-61781e210b38',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userGroup = await UserGroups.findOne({
id: ps.groupId,
diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts
index fef94c306f..7061db538b 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts
@@ -9,7 +9,7 @@ import { UserGroupJoining } from '@/models/entities/user-group-joining';
export const meta = {
tags: ['groups', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -26,8 +26,9 @@ export const meta = {
id: '98c11eca-c890-4f42-9806-c8c8303ebb5e',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the invitation
const invitation = await UserGroupInvitations.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts
index 33a202f029..f5ca3dec8b 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts
@@ -7,7 +7,7 @@ import { UserGroupInvitations } from '@/models/index';
export const meta = {
tags: ['groups', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -24,8 +24,9 @@ export const meta = {
id: 'ad7471d4-2cd9-44b4-ac68-e7136b4ce656',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the invitation
const invitation = await UserGroupInvitations.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/groups/invite.ts b/packages/backend/src/server/api/endpoints/users/groups/invite.ts
index 4dee18fcb0..3b7a4edb81 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts
@@ -11,7 +11,7 @@ import { createNotification } from '@/services/create-notification';
export const meta = {
tags: ['groups', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -50,8 +50,9 @@ export const meta = {
id: 'ee0f58b4-b529-4d13-b761-b9a3e69f97e6',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/groups/joined.ts b/packages/backend/src/server/api/endpoints/users/groups/joined.ts
index 1bd065ca00..ab48b1910d 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts
@@ -5,21 +5,22 @@ import { Not, In } from 'typeorm';
export const meta = {
tags: ['groups', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:user-groups',
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserGroup',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const ownedGroups = await UserGroups.find({
userId: me.id,
diff --git a/packages/backend/src/server/api/endpoints/users/groups/leave.ts b/packages/backend/src/server/api/endpoints/users/groups/leave.ts
index 9a41175d63..d2fcdab301 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts
@@ -7,7 +7,7 @@ import { UserGroups, UserGroupJoinings } from '@/models/index';
export const meta = {
tags: ['groups', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -30,8 +30,9 @@ export const meta = {
id: 'b6d6e0c2-ef8a-9bb8-653d-79f4a3107c69',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/groups/owned.ts b/packages/backend/src/server/api/endpoints/users/groups/owned.ts
index 69e4c85717..6193a71019 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts
@@ -4,21 +4,22 @@ import { UserGroups } from '@/models/index';
export const meta = {
tags: ['groups', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:user-groups',
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserGroup',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const userGroups = await UserGroups.find({
userId: me.id,
diff --git a/packages/backend/src/server/api/endpoints/users/groups/pull.ts b/packages/backend/src/server/api/endpoints/users/groups/pull.ts
index 70c1457dcd..785bea140d 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts
@@ -8,7 +8,7 @@ import { UserGroups, UserGroupJoinings } from '@/models/index';
export const meta = {
tags: ['groups', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -41,8 +41,9 @@ export const meta = {
id: '1546eed5-4414-4dea-81c1-b0aec4f6d2af',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/groups/show.ts b/packages/backend/src/server/api/endpoints/users/groups/show.ts
index 0bb06f8df4..eb26eac2a8 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/show.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts
@@ -7,7 +7,7 @@ import { UserGroups, UserGroupJoinings } from '@/models/index';
export const meta = {
tags: ['groups', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:user-groups',
@@ -18,8 +18,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserGroup',
},
@@ -30,8 +30,9 @@ export const meta = {
id: 'ea04751e-9b7e-487b-a509-330fb6bd6b9b',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts
index 54cf8197e7..4b1c8fbbdb 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts
@@ -8,7 +8,7 @@ import { UserGroups, UserGroupJoinings } from '@/models/index';
export const meta = {
tags: ['groups', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -23,8 +23,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserGroup',
},
@@ -47,8 +47,9 @@ export const meta = {
id: 'd31bebee-196d-42c2-9a3e-9474d4be6cc4',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/groups/update.ts b/packages/backend/src/server/api/endpoints/users/groups/update.ts
index d16f1ac42b..6caf903555 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/update.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts
@@ -7,7 +7,7 @@ import { UserGroups } from '@/models/index';
export const meta = {
tags: ['groups'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:user-groups',
@@ -22,8 +22,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserGroup',
},
@@ -34,8 +34,9 @@ export const meta = {
id: '9081cda3-7a9e-4fac-a6ce-908d70f282f6',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts
index 8372139f84..945b511628 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/create.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts
@@ -7,7 +7,7 @@ import { UserList } from '@/models/entities/user-list';
export const meta = {
tags: ['lists'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -18,12 +18,13 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserList',
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userList = await UserLists.insert({
id: genId(),
diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete.ts b/packages/backend/src/server/api/endpoints/users/lists/delete.ts
index fac4e90dbf..3183d2a09c 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts
@@ -7,7 +7,7 @@ import { UserLists } from '@/models/index';
export const meta = {
tags: ['lists'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -24,8 +24,9 @@ export const meta = {
id: '78436795-db79-42f5-b1e2-55ea2cf19166',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userList = await UserLists.findOne({
id: ps.listId,
diff --git a/packages/backend/src/server/api/endpoints/users/lists/list.ts b/packages/backend/src/server/api/endpoints/users/lists/list.ts
index 222c930d0e..ae66b0aacc 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/list.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts
@@ -4,21 +4,22 @@ import { UserLists } from '@/models/index';
export const meta = {
tags: ['lists', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserList',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const userLists = await UserLists.find({
userId: me.id,
diff --git a/packages/backend/src/server/api/endpoints/users/lists/pull.ts b/packages/backend/src/server/api/endpoints/users/lists/pull.ts
index 86daa9b2e1..4c74aefa8a 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts
@@ -9,7 +9,7 @@ import { UserLists, UserListJoinings, Users } from '@/models/index';
export const meta = {
tags: ['lists', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -36,8 +36,9 @@ export const meta = {
id: '588e7f72-c744-4a61-b180-d354e912bda2',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/lists/push.ts b/packages/backend/src/server/api/endpoints/users/lists/push.ts
index 77ecb4a223..8b50c475b0 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/push.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts
@@ -9,7 +9,7 @@ import { UserLists, UserListJoinings, Blockings } from '@/models/index';
export const meta = {
tags: ['lists', 'users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -48,8 +48,9 @@ export const meta = {
id: '990232c5-3f9d-4d83-9f3f-ef27b6332a4b',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/lists/show.ts b/packages/backend/src/server/api/endpoints/users/lists/show.ts
index 9c985bb091..06555c1a88 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/show.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts
@@ -7,7 +7,7 @@ import { UserLists } from '@/models/index';
export const meta = {
tags: ['lists', 'account'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
@@ -18,8 +18,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserList',
},
@@ -30,8 +30,9 @@ export const meta = {
id: '7bc05c21-1d7a-41ae-88f1-66820f4dc686',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/lists/update.ts b/packages/backend/src/server/api/endpoints/users/lists/update.ts
index 8a0f96a5d9..02b0d5fe18 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/update.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts
@@ -7,7 +7,7 @@ import { UserLists } from '@/models/index';
export const meta = {
tags: ['lists'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'write:account',
@@ -22,8 +22,8 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'UserList',
},
@@ -34,8 +34,9 @@ export const meta = {
id: '796666fe-3dff-4d39-becb-8a5932c1d5b7',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the list
const userList = await UserLists.findOne({
diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts
index da8e858119..99158fb0ae 100644
--- a/packages/backend/src/server/api/endpoints/users/notes.ts
+++ b/packages/backend/src/server/api/endpoints/users/notes.ts
@@ -66,11 +66,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'Note',
},
},
@@ -82,8 +82,9 @@ export const meta = {
id: '27e494ba-2ac2-48e8-893b-10d4d8c2387b',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Lookup user
const user = await getUser(ps.userId).catch(e => {
diff --git a/packages/backend/src/server/api/endpoints/users/pages.ts b/packages/backend/src/server/api/endpoints/users/pages.ts
index 4763303a70..6e003dd1af 100644
--- a/packages/backend/src/server/api/endpoints/users/pages.ts
+++ b/packages/backend/src/server/api/endpoints/users/pages.ts
@@ -25,8 +25,9 @@ export const meta = {
validator: $.optional.type(ID),
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Pages.createQueryBuilder('page'), ps.sinceId, ps.untilId)
.andWhere(`page.userId = :userId`, { userId: ps.userId })
diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts
index 626487176b..312d4dbf23 100644
--- a/packages/backend/src/server/api/endpoints/users/reactions.ts
+++ b/packages/backend/src/server/api/endpoints/users/reactions.ts
@@ -9,7 +9,7 @@ import { ApiError } from '../../error';
export const meta = {
tags: ['users', 'reactions'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
userId: {
@@ -39,11 +39,11 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'NoteReaction',
},
},
@@ -55,8 +55,9 @@ export const meta = {
id: '673a7dd2-6924-1093-e0c0-e68456ceae5c',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const profile = await UserProfiles.findOneOrFail(ps.userId);
diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts
index 71c564c980..9ea39eb2dd 100644
--- a/packages/backend/src/server/api/endpoints/users/recommendation.ts
+++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts
@@ -8,7 +8,7 @@ import { generateBlockedUserQuery, generateBlockQueryForUsers } from '../../comm
export const meta = {
tags: ['users'],
- requireCredential: true as const,
+ requireCredential: true,
kind: 'read:account',
@@ -25,16 +25,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserDetailed',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Users.createQueryBuilder('user')
.where('user.isLocked = FALSE')
diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts
index af1984fa2b..7e319ca105 100644
--- a/packages/backend/src/server/api/endpoints/users/relation.ts
+++ b/packages/backend/src/server/api/endpoints/users/relation.ts
@@ -6,7 +6,7 @@ import { Users } from '@/models/index';
export const meta = {
tags: ['users'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
userId: {
@@ -15,93 +15,93 @@ export const meta = {
},
res: {
+ optional: false, nullable: false,
oneOf: [
{
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
isFollowing: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
hasPendingFollowRequestFromYou: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
hasPendingFollowRequestToYou: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isFollowed: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isBlocking: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isBlocked: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isMuted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
},
},
{
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
properties: {
id: {
- type: 'string' as const,
- optional: false as const, nullable: false as const,
+ type: 'string',
+ optional: false, nullable: false,
format: 'id',
},
isFollowing: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
hasPendingFollowRequestFromYou: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
hasPendingFollowRequestToYou: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isFollowed: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isBlocking: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isBlocked: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
isMuted: {
- type: 'boolean' as const,
- optional: false as const, nullable: false as const,
+ type: 'boolean',
+ optional: false, nullable: false,
},
},
},
},
],
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const ids = Array.isArray(ps.userId) ? ps.userId : [ps.userId];
diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts
index a1d8376651..ed2aa7bb26 100644
--- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts
+++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts
@@ -13,7 +13,7 @@ import { fetchMeta } from '@/misc/fetch-meta';
export const meta = {
tags: ['users'],
- requireCredential: true as const,
+ requireCredential: true,
params: {
userId: {
@@ -44,7 +44,7 @@ export const meta = {
id: '35e166f5-05fb-4f87-a2d5-adb42676d48f',
},
},
-};
+} as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
@@ -62,7 +62,7 @@ export default define(meta, async (ps, me) => {
throw new ApiError(meta.errors.cannotReportAdmin);
}
- const report = await AbuseUserReports.save({
+ const report = await AbuseUserReports.insert({
id: genId(),
createdAt: new Date(),
targetUserId: user.id,
@@ -70,7 +70,7 @@ export default define(meta, async (ps, me) => {
reporterId: me.id,
reporterHost: null,
comment: ps.comment,
- });
+ }).then(x => AbuseUserReports.findOneOrFail(x.identifiers[0]));
// Publish event to moderators
setTimeout(async () => {
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 58a8d929f7..d67625e624 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
@@ -8,7 +8,7 @@ import { User } from '@/models/entities/user';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
username: {
@@ -31,16 +31,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'User',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日
@@ -111,6 +112,6 @@ export default define(meta, async (ps, me) => {
.getMany();
}
- return await Users.packMany(users, me, { detail: ps.detail });
+ return await Users.packMany(users, me, { detail: !!ps.detail });
}
});
diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts
index f87088688c..26f818afcc 100644
--- a/packages/backend/src/server/api/endpoints/users/search.ts
+++ b/packages/backend/src/server/api/endpoints/users/search.ts
@@ -7,7 +7,7 @@ import { Brackets } from 'typeorm';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
query: {
@@ -36,16 +36,17 @@ export const meta = {
},
res: {
- type: 'array' as const,
- optional: false as const, nullable: false as const,
+ type: 'array',
+ optional: false, nullable: false,
items: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
+ type: 'object',
+ optional: false, nullable: false,
ref: 'User',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日
diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts
index eacb2aee16..92910e9ed8 100644
--- a/packages/backend/src/server/api/endpoints/users/show.ts
+++ b/packages/backend/src/server/api/endpoints/users/show.ts
@@ -11,7 +11,7 @@ import { User } from '@/models/entities/user';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
userId: {
@@ -32,9 +32,20 @@ export const meta = {
},
res: {
- type: 'object' as const,
- optional: false as const, nullable: false as const,
- ref: 'User',
+ optional: false, nullable: false,
+ oneOf: [
+ {
+ type: 'object',
+ ref: 'UserDetailed',
+ },
+ {
+ type: 'array',
+ items: {
+ type: 'object',
+ ref: 'UserDetailed',
+ }
+ },
+ ]
},
errors: {
@@ -42,7 +53,7 @@ export const meta = {
message: 'Failed to resolve remote user.',
code: 'FAILED_TO_RESOLVE_REMOTE_USER',
id: 'ef7b9be4-9cba-4e6f-ab41-90ed171c7d3c',
- kind: 'server' as const,
+ kind: 'server',
},
noSuchUser: {
@@ -51,8 +62,9 @@ export const meta = {
id: '4362f8dc-731f-4ad8-a694-be5a88922a24',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
let user;
diff --git a/packages/backend/src/server/api/endpoints/users/stats.ts b/packages/backend/src/server/api/endpoints/users/stats.ts
index b8564218ac..381e433479 100644
--- a/packages/backend/src/server/api/endpoints/users/stats.ts
+++ b/packages/backend/src/server/api/endpoints/users/stats.ts
@@ -2,12 +2,12 @@ import $ from 'cafy';
import define from '../../define';
import { ApiError } from '../../error';
import { ID } from '@/misc/cafy-id';
-import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, ReversiGames, Users } from '@/models/index';
+import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, Users } from '@/models/index';
export const meta = {
tags: ['users'],
- requireCredential: false as const,
+ requireCredential: false,
params: {
userId: {
@@ -22,8 +22,9 @@ export const meta = {
id: '9e638e45-3b25-4ef7-8f95-07e8498f1819',
},
},
-};
+} as const;
+// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId);
if (user == null) {
@@ -49,7 +50,6 @@ export default define(meta, async (ps, me) => {
pageLikedCount,
driveFilesCount,
driveUsage,
- reversiCount,
] = await Promise.all([
Notes.createQueryBuilder('note')
.where('note.userId = :userId', { userId: user.id })
@@ -112,10 +112,6 @@ export default define(meta, async (ps, me) => {
.where('file.userId = :userId', { userId: user.id })
.getCount(),
DriveFiles.calcDriveUsageOf(user),
- ReversiGames.createQueryBuilder('game')
- .where('game.user1Id = :userId', { userId: user.id })
- .orWhere('game.user2Id = :userId', { userId: user.id })
- .getCount(),
]);
return {
@@ -139,6 +135,5 @@ export default define(meta, async (ps, me) => {
pageLikedCount,
driveFilesCount,
driveUsage,
- reversiCount,
};
});
diff --git a/packages/backend/src/server/api/limiter.ts b/packages/backend/src/server/api/limiter.ts
index 5f617771e0..4721f6263a 100644
--- a/packages/backend/src/server/api/limiter.ts
+++ b/packages/backend/src/server/api/limiter.ts
@@ -7,8 +7,8 @@ import Logger from '@/services/logger';
const logger = new Logger('limiter');
-export default (endpoint: IEndpoint, user: User) => new Promise<void>((ok, reject) => {
- const limitation = endpoint.meta.limit!;
+export const limiter = (endpoint: IEndpoint & { meta: { limit: NonNullable<IEndpoint['meta']['limit']> } }, user: User) => new Promise<void>((ok, reject) => {
+ const limitation = endpoint.meta.limit;
const key = Object.prototype.hasOwnProperty.call(limitation, 'key')
? limitation.key
@@ -30,7 +30,7 @@ export default (endpoint: IEndpoint, user: User) => new Promise<void>((ok, rejec
}
// Short-term limit
- function min() {
+ function min(): void {
const minIntervalLimiter = new Limiter({
id: `${user.id}:${key}:min`,
duration: limitation.minInterval,
@@ -58,7 +58,7 @@ export default (endpoint: IEndpoint, user: User) => new Promise<void>((ok, rejec
}
// Long term limit
- function max() {
+ function max(): void {
const limiter = new Limiter({
id: `${user.id}:${key}`,
duration: limitation.duration,
diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts
index 1c521f212f..1efef8d26d 100644
--- a/packages/backend/src/server/api/openapi/gen-spec.ts
+++ b/packages/backend/src/server/api/openapi/gen-spec.ts
@@ -118,7 +118,7 @@ export function genOpenapiSpec(lang = 'ja-JP') {
description: desc,
externalDocs: {
description: 'Source code',
- url: `https://github.com/misskey-dev/misskey/blob/develop/src/server/api/endpoints/${endpoint.name}.ts`,
+ url: `https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/${endpoint.name}.ts`,
},
...(endpoint.meta.tags ? {
tags: [endpoint.meta.tags[0]],
diff --git a/packages/backend/src/server/api/openapi/schemas.ts b/packages/backend/src/server/api/openapi/schemas.ts
index 723b3e884a..eb42667fd5 100644
--- a/packages/backend/src/server/api/openapi/schemas.ts
+++ b/packages/backend/src/server/api/openapi/schemas.ts
@@ -1,6 +1,6 @@
-import { refs, Schema } from '@/misc/schema';
+import { refs, MinimumSchema } from '@/misc/schema';
-export function convertSchemaToOpenApiSchema(schema: Schema) {
+export function convertSchemaToOpenApiSchema(schema: MinimumSchema) {
const res: any = schema;
if (schema.type === 'object' && schema.properties) {
@@ -15,6 +15,10 @@ export function convertSchemaToOpenApiSchema(schema: Schema) {
res.items = convertSchemaToOpenApiSchema(schema.items);
}
+ if (schema.anyOf) res.anyOf = schema.anyOf.map(convertSchemaToOpenApiSchema);
+ if (schema.oneOf) res.oneOf = schema.oneOf.map(convertSchemaToOpenApiSchema);
+ if (schema.allOf) res.allOf = schema.allOf.map(convertSchemaToOpenApiSchema);
+
if (schema.ref) {
res.$ref = `#/components/schemas/${schema.ref}`;
}
diff --git a/packages/backend/src/server/api/stream/channels/games/reversi-game.ts b/packages/backend/src/server/api/stream/channels/games/reversi-game.ts
deleted file mode 100644
index 314db48b5e..0000000000
--- a/packages/backend/src/server/api/stream/channels/games/reversi-game.ts
+++ /dev/null
@@ -1,372 +0,0 @@
-import autobind from 'autobind-decorator';
-import * as CRC32 from 'crc-32';
-import { publishReversiGameStream } from '@/services/stream';
-import Reversi from '../../../../../games/reversi/core';
-import * as maps from '../../../../../games/reversi/maps';
-import Channel from '../../channel';
-import { ReversiGame } from '@/models/entities/games/reversi/game';
-import { ReversiGames, Users } from '@/models/index';
-import { User } from '@/models/entities/user';
-
-export default class extends Channel {
- public readonly chName = 'gamesReversiGame';
- public static shouldShare = false;
- public static requireCredential = false;
-
- private gameId: ReversiGame['id'] | null = null;
- private watchers: Record<User['id'], Date> = {};
- private emitWatchersIntervalId: ReturnType<typeof setInterval>;
-
- @autobind
- public async init(params: any) {
- this.gameId = params.gameId;
-
- // Subscribe game stream
- this.subscriber.on(`reversiGameStream:${this.gameId}`, this.onEvent);
- this.emitWatchersIntervalId = setInterval(this.emitWatchers, 5000);
-
- const game = await ReversiGames.findOne(this.gameId!);
- if (game == null) throw new Error('game not found');
-
- // 観戦者イベント
- this.watch(game);
- }
-
- @autobind
- private onEvent(data: any) {
- if (data.type === 'watching') {
- const id = data.body;
- this.watchers[id] = new Date();
- } else {
- this.send(data);
- }
- }
-
- @autobind
- private async emitWatchers() {
- const now = new Date();
-
- // Remove not watching users
- for (const [userId, date] of Object.entries(this.watchers)) {
- if (now.getTime() - date.getTime() > 5000) delete this.watchers[userId];
- }
-
- const users = await Users.packMany(Object.keys(this.watchers), null, { detail: false });
-
- this.send({
- type: 'watchers',
- body: users,
- });
- }
-
- @autobind
- public dispose() {
- // Unsubscribe events
- this.subscriber.off(`reversiGameStream:${this.gameId}`, this.onEvent);
- clearInterval(this.emitWatchersIntervalId);
- }
-
- @autobind
- public onMessage(type: string, body: any) {
- switch (type) {
- case 'accept': this.accept(true); break;
- case 'cancelAccept': this.accept(false); break;
- case 'updateSettings': this.updateSettings(body.key, body.value); break;
- case 'initForm': this.initForm(body); break;
- case 'updateForm': this.updateForm(body.id, body.value); break;
- case 'message': this.message(body); break;
- case 'set': this.set(body.pos); break;
- case 'check': this.check(body.crc32); break;
- }
- }
-
- @autobind
- private async updateSettings(key: string, value: any) {
- if (this.user == null) return;
-
- const game = await ReversiGames.findOne(this.gameId!);
- if (game == null) throw new Error('game not found');
-
- if (game.isStarted) return;
- if ((game.user1Id !== this.user.id) && (game.user2Id !== this.user.id)) return;
- if ((game.user1Id === this.user.id) && game.user1Accepted) return;
- if ((game.user2Id === this.user.id) && game.user2Accepted) return;
-
- if (!['map', 'bw', 'isLlotheo', 'canPutEverywhere', 'loopedBoard'].includes(key)) return;
-
- await ReversiGames.update(this.gameId!, {
- [key]: value,
- });
-
- publishReversiGameStream(this.gameId!, 'updateSettings', {
- key: key,
- value: value,
- });
- }
-
- @autobind
- private async initForm(form: any) {
- if (this.user == null) return;
-
- const game = await ReversiGames.findOne(this.gameId!);
- if (game == null) throw new Error('game not found');
-
- if (game.isStarted) return;
- if ((game.user1Id !== this.user.id) && (game.user2Id !== this.user.id)) return;
-
- const set = game.user1Id === this.user.id ? {
- form1: form,
- } : {
- form2: form,
- };
-
- await ReversiGames.update(this.gameId!, set);
-
- publishReversiGameStream(this.gameId!, 'initForm', {
- userId: this.user.id,
- form,
- });
- }
-
- @autobind
- private async updateForm(id: string, value: any) {
- if (this.user == null) return;
-
- const game = await ReversiGames.findOne(this.gameId!);
- if (game == null) throw new Error('game not found');
-
- if (game.isStarted) return;
- if ((game.user1Id !== this.user.id) && (game.user2Id !== this.user.id)) return;
-
- const form = game.user1Id === this.user.id ? game.form2 : game.form1;
-
- const item = form.find((i: any) => i.id == id);
-
- if (item == null) return;
-
- item.value = value;
-
- const set = game.user1Id === this.user.id ? {
- form2: form,
- } : {
- form1: form,
- };
-
- await ReversiGames.update(this.gameId!, set);
-
- publishReversiGameStream(this.gameId!, 'updateForm', {
- userId: this.user.id,
- id,
- value,
- });
- }
-
- @autobind
- private async message(message: any) {
- if (this.user == null) return;
-
- message.id = Math.random();
- publishReversiGameStream(this.gameId!, 'message', {
- userId: this.user.id,
- message,
- });
- }
-
- @autobind
- private async accept(accept: boolean) {
- if (this.user == null) return;
-
- const game = await ReversiGames.findOne(this.gameId!);
- if (game == null) throw new Error('game not found');
-
- if (game.isStarted) return;
-
- let bothAccepted = false;
-
- if (game.user1Id === this.user.id) {
- await ReversiGames.update(this.gameId!, {
- user1Accepted: accept,
- });
-
- publishReversiGameStream(this.gameId!, 'changeAccepts', {
- user1: accept,
- user2: game.user2Accepted,
- });
-
- if (accept && game.user2Accepted) bothAccepted = true;
- } else if (game.user2Id === this.user.id) {
- await ReversiGames.update(this.gameId!, {
- user2Accepted: accept,
- });
-
- publishReversiGameStream(this.gameId!, 'changeAccepts', {
- user1: game.user1Accepted,
- user2: accept,
- });
-
- if (accept && game.user1Accepted) bothAccepted = true;
- } else {
- return;
- }
-
- if (bothAccepted) {
- // 3秒後、まだacceptされていたらゲーム開始
- setTimeout(async () => {
- const freshGame = await ReversiGames.findOne(this.gameId!);
- if (freshGame == null || freshGame.isStarted || freshGame.isEnded) return;
- if (!freshGame.user1Accepted || !freshGame.user2Accepted) return;
-
- let bw: number;
- if (freshGame.bw == 'random') {
- bw = Math.random() > 0.5 ? 1 : 2;
- } else {
- bw = parseInt(freshGame.bw, 10);
- }
-
- function getRandomMap() {
- const mapCount = Object.entries(maps).length;
- const rnd = Math.floor(Math.random() * mapCount);
- return Object.values(maps)[rnd].data;
- }
-
- const map = freshGame.map != null ? freshGame.map : getRandomMap();
-
- await ReversiGames.update(this.gameId!, {
- startedAt: new Date(),
- isStarted: true,
- black: bw,
- map: map,
- });
-
- //#region 盤面に最初から石がないなどして始まった瞬間に勝敗が決定する場合があるのでその処理
- const o = new Reversi(map, {
- isLlotheo: freshGame.isLlotheo,
- canPutEverywhere: freshGame.canPutEverywhere,
- loopedBoard: freshGame.loopedBoard,
- });
-
- if (o.isEnded) {
- let winner;
- if (o.winner === true) {
- winner = freshGame.black == 1 ? freshGame.user1Id : freshGame.user2Id;
- } else if (o.winner === false) {
- winner = freshGame.black == 1 ? freshGame.user2Id : freshGame.user1Id;
- } else {
- winner = null;
- }
-
- await ReversiGames.update(this.gameId!, {
- isEnded: true,
- winnerId: winner,
- });
-
- publishReversiGameStream(this.gameId!, 'ended', {
- winnerId: winner,
- game: await ReversiGames.pack(this.gameId!, this.user),
- });
- }
- //#endregion
-
- publishReversiGameStream(this.gameId!, 'started',
- await ReversiGames.pack(this.gameId!, this.user));
- }, 3000);
- }
- }
-
- // 石を打つ
- @autobind
- private async set(pos: number) {
- if (this.user == null) return;
-
- const game = await ReversiGames.findOne(this.gameId!);
- if (game == null) throw new Error('game not found');
-
- if (!game.isStarted) return;
- if (game.isEnded) return;
- if ((game.user1Id !== this.user.id) && (game.user2Id !== this.user.id)) return;
-
- const myColor =
- ((game.user1Id === this.user.id) && game.black == 1) || ((game.user2Id === this.user.id) && game.black == 2)
- ? true
- : false;
-
- const o = new Reversi(game.map, {
- isLlotheo: game.isLlotheo,
- canPutEverywhere: game.canPutEverywhere,
- loopedBoard: game.loopedBoard,
- });
-
- // 盤面の状態を再生
- for (const log of game.logs) {
- o.put(log.color, log.pos);
- }
-
- if (o.turn !== myColor) return;
-
- if (!o.canPut(myColor, pos)) return;
- o.put(myColor, pos);
-
- let winner;
- if (o.isEnded) {
- if (o.winner === true) {
- winner = game.black == 1 ? game.user1Id : game.user2Id;
- } else if (o.winner === false) {
- winner = game.black == 1 ? game.user2Id : game.user1Id;
- } else {
- winner = null;
- }
- }
-
- const log = {
- at: new Date(),
- color: myColor,
- pos,
- };
-
- const crc32 = CRC32.str(game.logs.map(x => x.pos.toString()).join('') + pos.toString()).toString();
-
- game.logs.push(log);
-
- await ReversiGames.update(this.gameId!, {
- crc32,
- isEnded: o.isEnded,
- winnerId: winner,
- logs: game.logs,
- });
-
- publishReversiGameStream(this.gameId!, 'set', Object.assign(log, {
- next: o.turn,
- }));
-
- if (o.isEnded) {
- publishReversiGameStream(this.gameId!, 'ended', {
- winnerId: winner,
- game: await ReversiGames.pack(this.gameId!, this.user),
- });
- }
- }
-
- @autobind
- private async check(crc32: string | number) {
- const game = await ReversiGames.findOne(this.gameId!);
- if (game == null) throw new Error('game not found');
-
- if (!game.isStarted) return;
-
- if (crc32.toString() !== game.crc32) {
- this.send('rescue', await ReversiGames.pack(game, this.user));
- }
-
- // ついでに観戦者イベントを発行
- this.watch(game);
- }
-
- @autobind
- private watch(game: ReversiGame) {
- if (this.user != null) {
- if ((game.user1Id !== this.user.id) && (game.user2Id !== this.user.id)) {
- publishReversiGameStream(this.gameId!, 'watching', this.user.id);
- }
- }
- }
-}
diff --git a/packages/backend/src/server/api/stream/channels/games/reversi.ts b/packages/backend/src/server/api/stream/channels/games/reversi.ts
deleted file mode 100644
index 121560ff87..0000000000
--- a/packages/backend/src/server/api/stream/channels/games/reversi.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import autobind from 'autobind-decorator';
-import { publishMainStream } from '@/services/stream';
-import Channel from '../../channel';
-import { ReversiMatchings } from '@/models/index';
-
-export default class extends Channel {
- public readonly chName = 'gamesReversi';
- public static shouldShare = true;
- public static requireCredential = true;
-
- @autobind
- public async init(params: any) {
- // Subscribe reversi stream
- this.subscriber.on(`reversiStream:${this.user!.id}`, data => {
- this.send(data);
- });
- }
-
- @autobind
- public async onMessage(type: string, body: any) {
- switch (type) {
- case 'ping': {
- if (body.id == null) return;
- const matching = await ReversiMatchings.findOne({
- parentId: this.user!.id,
- childId: body.id,
- });
- if (matching == null) return;
- publishMainStream(matching.childId, 'reversiInvited', await ReversiMatchings.pack(matching, { id: matching.childId }));
- break;
- }
- }
- }
-}
diff --git a/packages/backend/src/server/api/stream/channels/index.ts b/packages/backend/src/server/api/stream/channels/index.ts
index 89d93f2da3..f3826c4cf7 100644
--- a/packages/backend/src/server/api/stream/channels/index.ts
+++ b/packages/backend/src/server/api/stream/channels/index.ts
@@ -13,8 +13,6 @@ import drive from './drive';
import hashtag from './hashtag';
import channel from './channel';
import admin from './admin';
-import gamesReversi from './games/reversi';
-import gamesReversiGame from './games/reversi-game';
export default {
main,
@@ -32,6 +30,4 @@ export default {
hashtag,
channel,
admin,
- gamesReversi,
- gamesReversiGame,
};
diff --git a/packages/backend/src/server/api/stream/types.ts b/packages/backend/src/server/api/stream/types.ts
index f4302f64a0..e70c26f5e5 100644
--- a/packages/backend/src/server/api/stream/types.ts
+++ b/packages/backend/src/server/api/stream/types.ts
@@ -11,7 +11,6 @@ import { Emoji } from '@/models/entities/emoji';
import { UserList } from '@/models/entities/user-list';
import { MessagingMessage } from '@/models/entities/messaging-message';
import { UserGroup } from '@/models/entities/user-group';
-import { ReversiGame } from '@/models/entities/games/reversi/game';
import { AbuseUserReport } from '@/models/entities/abuse-user-report';
import { Signin } from '@/models/entities/signin';
import { Page } from '@/models/entities/page';
@@ -37,7 +36,7 @@ export interface UserStreamTypes {
updateUserProfile: UserProfile;
mute: User;
unmute: User;
- follow: Packed<'User'>;
+ follow: Packed<'UserDetailedNotMe'>;
unfollow: Packed<'User'>;
userAdded: Packed<'User'>;
}
@@ -47,7 +46,7 @@ export interface MainStreamTypes {
mention: Packed<'Note'>;
reply: Packed<'Note'>;
renote: Packed<'Note'>;
- follow: Packed<'User'>;
+ follow: Packed<'UserDetailedNotMe'>;
followed: Packed<'User'>;
unfollow: Packed<'User'>;
meUpdated: Packed<'User'>;
@@ -77,8 +76,6 @@ export interface MainStreamTypes {
readAllChannels: undefined;
unreadChannel: Note['id'];
myTokenRegenerated: undefined;
- reversiNoInvites: undefined;
- reversiInvited: Packed<'ReversiMatching'>;
signin: Signin;
registryUpdated: {
scope?: string[];
@@ -158,47 +155,6 @@ export interface MessagingIndexStreamTypes {
message: Packed<'MessagingMessage'>;
}
-export interface ReversiStreamTypes {
- matched: Packed<'ReversiGame'>;
- invited: Packed<'ReversiMatching'>;
-}
-
-export interface ReversiGameStreamTypes {
- started: Packed<'ReversiGame'>;
- ended: {
- winnerId?: User['id'] | null,
- game: Packed<'ReversiGame'>;
- };
- updateSettings: {
- key: string;
- value: FIXME;
- };
- initForm: {
- userId: User['id'];
- form: FIXME;
- };
- updateForm: {
- userId: User['id'];
- id: string;
- value: FIXME;
- };
- message: {
- userId: User['id'];
- message: FIXME;
- };
- changeAccepts: {
- user1: boolean;
- user2: boolean;
- };
- set: {
- at: Date;
- color: boolean;
- pos: number;
- next: boolean;
- };
- watching: User['id'];
-}
-
export interface AdminStreamTypes {
newAbuseUserReport: {
id: AbuseUserReport['id'];
@@ -268,14 +224,6 @@ export type StreamMessages = {
name: `messagingIndexStream:${User['id']}`;
payload: EventUnionFromDictionary<MessagingIndexStreamTypes>;
};
- reversi: {
- name: `reversiStream:${User['id']}`;
- payload: EventUnionFromDictionary<ReversiStreamTypes>;
- };
- reversiGame: {
- name: `reversiGameStream:${ReversiGame['id']}`;
- payload: EventUnionFromDictionary<ReversiGameStreamTypes>;
- };
admin: {
name: `adminStream:${User['id']}`;
payload: EventUnionFromDictionary<AdminStreamTypes>;
diff --git a/packages/backend/src/server/file/send-drive-file.ts b/packages/backend/src/server/file/send-drive-file.ts
index 8bb5655b4f..f3c6c518fa 100644
--- a/packages/backend/src/server/file/send-drive-file.ts
+++ b/packages/backend/src/server/file/send-drive-file.ts
@@ -11,9 +11,10 @@ import { DriveFiles } from '@/models/index';
import { InternalStorage } from '@/services/drive/internal-storage';
import { downloadUrl } from '@/misc/download-url';
import { detectType } from '@/misc/get-file-info';
-import { convertToJpeg, convertToPngOrJpeg } from '@/services/drive/image-processor';
+import { convertToJpeg, convertToPng, convertToPngOrJpeg } from '@/services/drive/image-processor';
import { GenerateVideoThumbnail } from '@/services/drive/generate-video-thumbnail';
import { StatusError } from '@/misc/fetch';
+import { FILE_TYPE_BROWSERSAFE } from '@/const';
//const _filename = fileURLToPath(import.meta.url);
const _filename = __filename;
@@ -27,6 +28,7 @@ const commonReadableHandlerGenerator = (ctx: Koa.Context) => (e: Error): void =>
ctx.set('Cache-Control', 'max-age=300');
};
+// eslint-disable-next-line import/no-default-export
export default async function(ctx: Koa.Context) {
const key = ctx.params.key;
@@ -65,13 +67,19 @@ export default async function(ctx: Koa.Context) {
if (isThumbnail) {
if (['image/jpeg', 'image/webp'].includes(mime)) {
return await convertToJpeg(path, 498, 280);
- } else if (['image/png'].includes(mime)) {
+ } else if (['image/png', 'image/svg+xml'].includes(mime)) {
return await convertToPngOrJpeg(path, 498, 280);
} else if (mime.startsWith('video/')) {
return await GenerateVideoThumbnail(path);
}
}
+ if (isWebpublic) {
+ if (['image/svg+xml'].includes(mime)) {
+ return await convertToPng(path, 2048, 2048);
+ }
+ }
+
return {
data: fs.readFileSync(path),
ext,
@@ -81,7 +89,7 @@ export default async function(ctx: Koa.Context) {
const image = await convertFile();
ctx.body = image.data;
- ctx.set('Content-Type', image.type);
+ ctx.set('Content-Type', FILE_TYPE_BROWSERSAFE.includes(image.type) ? image.type : 'application/octet-stream');
ctx.set('Cache-Control', 'max-age=31536000, immutable');
} catch (e) {
serverLogger.error(`${e}`);
@@ -112,14 +120,14 @@ export default async function(ctx: Koa.Context) {
}).toString();
ctx.body = InternalStorage.read(key);
- ctx.set('Content-Type', mime);
+ ctx.set('Content-Type', FILE_TYPE_BROWSERSAFE.includes(mime) ? mime : 'application/octet-stream');
ctx.set('Cache-Control', 'max-age=31536000, immutable');
ctx.set('Content-Disposition', contentDisposition('inline', filename));
} else {
const readable = InternalStorage.read(file.accessKey!);
readable.on('error', commonReadableHandlerGenerator(ctx));
ctx.body = readable;
- ctx.set('Content-Type', file.type);
+ ctx.set('Content-Type', FILE_TYPE_BROWSERSAFE.includes(file.type) ? file.type : 'application/octet-stream');
ctx.set('Cache-Control', 'max-age=31536000, immutable');
ctx.set('Content-Disposition', contentDisposition('inline', file.name));
}
diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts
index 85fe21accb..764306c7d8 100644
--- a/packages/backend/src/server/index.ts
+++ b/packages/backend/src/server/index.ts
@@ -23,7 +23,7 @@ import Logger from '@/services/logger';
import { envOption } from '../env';
import { UserProfiles, Users } from '@/models/index';
import { networkChart } from '@/services/chart/index';
-import { genAvatar } from '@/misc/gen-avatar';
+import { genIdenticon } from '@/misc/gen-identicon';
import { createTemp } from '@/misc/create-temp';
import { publishMainStream } from '@/services/stream';
import * as Acct from 'misskey-js/built/acct';
@@ -84,9 +84,9 @@ router.get('/avatar/@:acct', async ctx => {
}
});
-router.get('/random-avatar/:x', async ctx => {
+router.get('/identicon/:x', async ctx => {
const [temp] = await createTemp();
- await genAvatar(ctx.params.x, fs.createWriteStream(temp));
+ await genIdenticon(ctx.params.x, fs.createWriteStream(temp));
ctx.set('Content-Type', 'image/png');
ctx.body = fs.createReadStream(temp);
});
diff --git a/packages/backend/src/server/nodeinfo.ts b/packages/backend/src/server/nodeinfo.ts
index 097c6c664d..44f32bf882 100644
--- a/packages/backend/src/server/nodeinfo.ts
+++ b/packages/backend/src/server/nodeinfo.ts
@@ -1,9 +1,8 @@
import * as Router from '@koa/router';
import config from '@/config/index';
import { fetchMeta } from '@/misc/fetch-meta';
-import { Users } from '@/models/index';
-// import User from '../models/user';
-// import Note from '../models/note';
+import { Users, Notes } from '@/models/index';
+import { Not, IsNull, MoreThan } from 'typeorm';
const router = new Router();
@@ -19,20 +18,21 @@ export const links = [/* (awaiting release) {
}];
const nodeinfo2 = async () => {
+ const now = Date.now();
const [
meta,
- // total,
- // activeHalfyear,
- // activeMonth,
- // localPosts,
- // localComments
+ total,
+ activeHalfyear,
+ activeMonth,
+ localPosts,
+ localComments,
] = await Promise.all([
fetchMeta(true),
- // User.count({ host: null }),
- // User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 15552000000) } }),
- // User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 2592000000) } }),
- // Note.count({ '_user.host': null, replyId: null }),
- // Note.count({ '_user.host': null, replyId: { $ne: null } })
+ Users.count({ where: { host: null } }),
+ Users.count({ where: { host: null, updatedAt: MoreThan(new Date(now - 15552000000)) } }),
+ Users.count({ where: { host: null, updatedAt: MoreThan(new Date(now - 2592000000)) } }),
+ Notes.count({ where: { userHost: null, replyId: null } }),
+ Notes.count({ where: { userHost: null, replyId: Not(IsNull()) } }),
]);
const proxyAccount = meta.proxyAccountId ? await Users.pack(meta.proxyAccountId).catch(() => null) : null;
@@ -50,9 +50,9 @@ const nodeinfo2 = async () => {
},
openRegistrations: !meta.disableRegistration,
usage: {
- users: {}, // { total, activeHalfyear, activeMonth },
- // localPosts,
- // localComments
+ users: { total, activeHalfyear, activeMonth },
+ localPosts,
+ localComments,
},
metadata: {
nodeName: meta.name,
diff --git a/packages/backend/src/server/proxy/proxy-media.ts b/packages/backend/src/server/proxy/proxy-media.ts
index 9e13c0877f..c234b70c55 100644
--- a/packages/backend/src/server/proxy/proxy-media.ts
+++ b/packages/backend/src/server/proxy/proxy-media.ts
@@ -6,6 +6,7 @@ import { createTemp } from '@/misc/create-temp';
import { downloadUrl } from '@/misc/download-url';
import { detectType } from '@/misc/get-file-info';
import { StatusError } from '@/misc/fetch';
+import { FILE_TYPE_BROWSERSAFE } from '@/const';
export async function proxyMedia(ctx: Koa.Context) {
const url = 'url' in ctx.query ? ctx.query.url : 'https://' + ctx.params.url;
@@ -18,14 +19,16 @@ export async function proxyMedia(ctx: Koa.Context) {
const { mime, ext } = await detectType(path);
- if (!mime.startsWith('image/')) throw 403;
-
let image: IImage;
- if ('static' in ctx.query && ['image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng', 'image/webp'].includes(mime)) {
+ if ('static' in ctx.query && ['image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng', 'image/webp', 'image/svg+xml'].includes(mime)) {
image = await convertToPng(path, 498, 280);
- } else if ('preview' in ctx.query && ['image/jpeg', 'image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng'].includes(mime)) {
+ } else if ('preview' in ctx.query && ['image/jpeg', 'image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng', 'image/svg+xml'].includes(mime)) {
image = await convertToJpeg(path, 200, 200);
+ } else if (['image/svg+xml'].includes(mime)) {
+ image = await convertToPng(path, 2048, 2048);
+ } else if (!mime.startsWith('image/') || !FILE_TYPE_BROWSERSAFE.includes(mime)) {
+ throw new StatusError('Rejected type', 403, 'Rejected type');
} else {
image = {
data: fs.readFileSync(path),
diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts
index 5623f7db83..e95a115aec 100644
--- a/packages/backend/src/server/web/index.ts
+++ b/packages/backend/src/server/web/index.ts
@@ -390,9 +390,6 @@ router.get('/cli', async ctx => {
const override = (source: string, target: string, depth: number = 0) =>
[, ...target.split('/').filter(x => x), ...source.split('/').filter(x => x).splice(depth)].join('/');
-router.get('/othello', async ctx => ctx.redirect(override(ctx.URL.pathname, 'games/reversi', 1)));
-router.get('/reversi', async ctx => ctx.redirect(override(ctx.URL.pathname, 'games')));
-
router.get('/flush', async ctx => {
await ctx.render('flush');
});
diff --git a/packages/backend/src/services/chart/core.ts b/packages/backend/src/services/chart/core.ts
index f97fa521d3..e406449f4f 100644
--- a/packages/backend/src/services/chart/core.ts
+++ b/packages/backend/src/services/chart/core.ts
@@ -7,7 +7,7 @@
import * as nestedProperty from 'nested-property';
import autobind from 'autobind-decorator';
import Logger from '../logger';
-import { SimpleSchema } from '@/misc/simple-schema';
+import { Schema } from '@/misc/schema';
import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm';
import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '@/prelude/time';
import { getChartInsertLock } from '@/misc/app-lock';
@@ -57,7 +57,7 @@ export default abstract class Chart<T extends Record<string, any>> {
diff: DeepPartial<T>;
group: string | null;
}[] = [];
- public schema: SimpleSchema;
+ public schema: Schema;
protected repositoryForHour: Repository<Log>;
protected repositoryForDay: Repository<Log>;
@@ -71,7 +71,7 @@ export default abstract class Chart<T extends Record<string, any>> {
protected abstract fetchActual(group: string | null): Promise<DeepPartial<T>>;
@autobind
- private static convertSchemaToFlatColumnDefinitions(schema: SimpleSchema) {
+ private static convertSchemaToFlatColumnDefinitions(schema: Schema) {
const columns = {} as Record<string, unknown>;
const flatColumns = (x: Obj, path?: string) => {
for (const [k, v] of Object.entries(x)) {
@@ -183,7 +183,7 @@ export default abstract class Chart<T extends Record<string, any>> {
}
@autobind
- public static schemaToEntity(name: string, schema: SimpleSchema, grouped = false): {
+ public static schemaToEntity(name: string, schema: Schema, grouped = false): {
hour: EntitySchema,
day: EntitySchema,
} {
@@ -233,7 +233,7 @@ export default abstract class Chart<T extends Record<string, any>> {
};
}
- constructor(name: string, schema: SimpleSchema, grouped = false) {
+ constructor(name: string, schema: Schema, grouped = false) {
this.name = name;
this.schema = schema;
@@ -573,8 +573,8 @@ export default abstract class Chart<T extends Record<string, any>> {
}
}
-export function convertLog(logSchema: SimpleSchema): SimpleSchema {
- const v: SimpleSchema = JSON.parse(JSON.stringify(logSchema)); // copy
+export function convertLog(logSchema: Schema): Schema {
+ const v: Schema = JSON.parse(JSON.stringify(logSchema)); // copy
if (v.type === 'number') {
v.type = 'array';
v.items = {
diff --git a/packages/backend/src/services/create-notification.ts b/packages/backend/src/services/create-notification.ts
index fc43ab29d7..1c1c1fcdff 100644
--- a/packages/backend/src/services/create-notification.ts
+++ b/packages/backend/src/services/create-notification.ts
@@ -20,7 +20,7 @@ export async function createNotification(
const isMuted = profile?.mutingNotificationTypes.includes(type);
// Create notification
- const notification = await Notifications.save({
+ const notification = await Notifications.insert({
id: genId(),
createdAt: new Date(),
notifieeId: notifieeId,
@@ -28,7 +28,8 @@ export async function createNotification(
// 相手がこの通知をミュートしているようなら、既読を予めつけておく
isRead: isMuted,
...data,
- } as Partial<Notification>);
+ } as Partial<Notification>)
+ .then(x => Notifications.findOneOrFail(x.identifiers[0]));
const packed = await Notifications.pack(notification, {});
diff --git a/packages/backend/src/services/drive/add-file.ts b/packages/backend/src/services/drive/add-file.ts
index ee4d51a96d..a89e068f45 100644
--- a/packages/backend/src/services/drive/add-file.ts
+++ b/packages/backend/src/services/drive/add-file.ts
@@ -20,6 +20,7 @@ import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
import * as S3 from 'aws-sdk/clients/s3';
import { getS3 } from './s3';
import * as sharp from 'sharp';
+import { FILE_TYPE_BROWSERSAFE } from '@/const';
const logger = driveLogger.createSubLogger('register', 'yellow');
@@ -49,6 +50,12 @@ async function save(file: DriveFile, path: string, name: string, type: string, h
if (type === 'image/vnd.mozilla.apng') ext = '.apng';
}
+ // 拡張子からContent-Typeを設定してそうな挙動を示すオブジェクトストレージ (upcloud?) も存在するので、
+ // 許可されているファイル形式でしか拡張子をつけない
+ if (!FILE_TYPE_BROWSERSAFE.includes(type)) {
+ ext = '';
+ }
+
const baseUrl = meta.objectStorageBaseUrl
|| `${ meta.objectStorageUseSSL ? 'https' : 'http' }://${ meta.objectStorageEndpoint }${ meta.objectStoragePort ? `:${meta.objectStoragePort}` : '' }/${ meta.objectStorageBucket }`;
@@ -94,13 +101,14 @@ async function save(file: DriveFile, path: string, name: string, type: string, h
file.accessKey = key;
file.thumbnailAccessKey = thumbnailKey;
file.webpublicAccessKey = webpublicKey;
+ file.webpublicType = alts.webpublic?.type ?? null;
file.name = name;
file.type = type;
file.md5 = hash;
file.size = size;
file.storedInternal = false;
- return await DriveFiles.save(file);
+ return await DriveFiles.insert(file).then(x => DriveFiles.findOneOrFail(x.identifiers[0]));
} else { // use internal storage
const accessKey = uuid();
const thumbnailAccessKey = 'thumbnail-' + uuid();
@@ -128,12 +136,13 @@ async function save(file: DriveFile, path: string, name: string, type: string, h
file.accessKey = accessKey;
file.thumbnailAccessKey = thumbnailAccessKey;
file.webpublicAccessKey = webpublicAccessKey;
+ file.webpublicType = alts.webpublic?.type ?? null;
file.name = name;
file.type = type;
file.md5 = hash;
file.size = size;
- return await DriveFiles.save(file);
+ return await DriveFiles.insert(file).then(x => DriveFiles.findOneOrFail(x.identifiers[0]));
}
}
@@ -160,7 +169,7 @@ export async function generateAlts(path: string, type: string, generateWeb: bool
}
}
- if (!['image/jpeg', 'image/png', 'image/webp'].includes(type)) {
+ if (!['image/jpeg', 'image/png', 'image/webp', 'image/svg+xml'].includes(type)) {
logger.debug(`web image and thumbnail not created (not an required file)`);
return {
webpublic: null,
@@ -201,7 +210,7 @@ export async function generateAlts(path: string, type: string, generateWeb: bool
webpublic = await convertSharpToJpeg(img, 2048, 2048);
} else if (['image/webp'].includes(type)) {
webpublic = await convertSharpToWebp(img, 2048, 2048);
- } else if (['image/png'].includes(type)) {
+ } else if (['image/png', 'image/svg+xml'].includes(type)) {
webpublic = await convertSharpToPng(img, 2048, 2048);
} else {
logger.debug(`web image not created (not an required image)`);
@@ -220,7 +229,7 @@ export async function generateAlts(path: string, type: string, generateWeb: bool
try {
if (['image/jpeg', 'image/webp'].includes(type)) {
thumbnail = await convertSharpToJpeg(img, 498, 280);
- } else if (['image/png'].includes(type)) {
+ } else if (['image/png', 'image/svg+xml'].includes(type)) {
thumbnail = await convertSharpToPngOrJpeg(img, 498, 280);
} else {
logger.debug(`thumbnail not created (not an required file)`);
@@ -241,6 +250,7 @@ export async function generateAlts(path: string, type: string, generateWeb: bool
*/
async function upload(key: string, stream: fs.ReadStream | Buffer, type: string, filename?: string) {
if (type === 'image/apng') type = 'image/png';
+ if (!FILE_TYPE_BROWSERSAFE.includes(type)) type = 'application/octet-stream';
const meta = await fetchMeta();
@@ -287,33 +297,45 @@ async function deleteOldFile(user: IRemoteUser) {
}
}
+type AddFileArgs = {
+ /** User who wish to add file */
+ user: { id: User['id']; host: User['host'] } | null;
+ /** File path */
+ path: string;
+ /** Name */
+ name?: string | null;
+ /** Comment */
+ comment?: string | null;
+ /** Folder ID */
+ folderId?: any;
+ /** If set to true, forcibly upload the file even if there is a file with the same hash. */
+ force?: boolean;
+ /** Do not save file to local */
+ isLink?: boolean;
+ /** URL of source (URLからアップロードされた場合(ローカル/リモート)の元URL) */
+ url?: string | null;
+ /** URL of source (リモートインスタンスのURLからアップロードされた場合の元URL) */
+ uri?: string | null;
+ /** Mark file as sensitive */
+ sensitive?: boolean | null;
+};
+
/**
* Add file to drive
*
- * @param user User who wish to add file
- * @param path File path
- * @param name Name
- * @param comment Comment
- * @param folderId Folder ID
- * @param force If set to true, forcibly upload the file even if there is a file with the same hash.
- * @param isLink Do not save file to local
- * @param url URL of source (URLからアップロードされた場合(ローカル/リモート)の元URL)
- * @param uri URL of source (リモートインスタンスのURLからアップロードされた場合の元URL)
- * @param sensitive Mark file as sensitive
- * @return Created drive file
*/
-export default async function(
- user: { id: User['id']; host: User['host'] } | null,
- path: string,
- name: string | null = null,
- comment: string | null = null,
- folderId: any = null,
- force: boolean = false,
- isLink: boolean = false,
- url: string | null = null,
- uri: string | null = null,
- sensitive: boolean | null = null
-): Promise<DriveFile> {
+export async function addFile({
+ user,
+ path,
+ name = null,
+ comment = null,
+ folderId = null,
+ force = false,
+ isLink = false,
+ url = null,
+ uri = null,
+ sensitive = null
+}: AddFileArgs): Promise<DriveFile> {
const info = await getFileInfo(path);
logger.info(`${JSON.stringify(info)}`);
@@ -428,7 +450,7 @@ export default async function(
file.type = info.type.mime;
file.storedInternal = false;
- file = await DriveFiles.save(file);
+ file = await DriveFiles.insert(file).then(x => DriveFiles.findOneOrFail(x.identifiers[0]));
} catch (e) {
// duplicate key error (when already registered)
if (isDuplicateKeyValueError(e)) {
diff --git a/packages/backend/src/services/drive/upload-from-url.ts b/packages/backend/src/services/drive/upload-from-url.ts
index 28f42bc344..7c5fa5ce3f 100644
--- a/packages/backend/src/services/drive/upload-from-url.ts
+++ b/packages/backend/src/services/drive/upload-from-url.ts
@@ -1,5 +1,5 @@
import { URL } from 'url';
-import create from './add-file';
+import { addFile } from './add-file';
import { User } from '@/models/entities/user';
import { driveLogger } from './logger';
import { createTemp } from '@/misc/create-temp';
@@ -10,16 +10,27 @@ import { DriveFiles } from '@/models/index';
const logger = driveLogger.createSubLogger('downloader');
-export default async (
- url: string,
- user: { id: User['id']; host: User['host'] } | null,
- folderId: DriveFolder['id'] | null = null,
- uri: string | null = null,
+type Args = {
+ url: string;
+ user: { id: User['id']; host: User['host'] } | null;
+ folderId?: DriveFolder['id'] | null;
+ uri?: string | null;
+ sensitive?: boolean;
+ force?: boolean;
+ isLink?: boolean;
+ comment?: string | null;
+};
+
+export async function uploadFromUrl({
+ url,
+ user,
+ folderId = null,
+ uri = null,
sensitive = false,
force = false,
- link = false,
+ isLink = false,
comment = null
-): Promise<DriveFile> => {
+}: Args): Promise<DriveFile> {
let name = new URL(url).pathname.split('/').pop() || null;
if (name == null || !DriveFiles.validateFileName(name)) {
name = null;
@@ -41,7 +52,7 @@ export default async (
let error;
try {
- driveFile = await create(user, path, name, comment, folderId, force, link, url, uri, sensitive);
+ driveFile = await addFile({ user, path, name, comment, folderId, force, isLink, url, uri, sensitive });
logger.succ(`Got: ${driveFile.id}`);
} catch (e) {
error = e;
@@ -59,4 +70,4 @@ export default async (
} else {
return driveFile!;
}
-};
+}
diff --git a/packages/backend/src/services/following/create.ts b/packages/backend/src/services/following/create.ts
index 45bd226588..bc5ac275b5 100644
--- a/packages/backend/src/services/following/create.ts
+++ b/packages/backend/src/services/following/create.ts
@@ -14,6 +14,7 @@ import { instanceChart, perUserFollowingChart } from '@/services/chart/index';
import { genId } from '@/misc/gen-id';
import { createNotification } from '../create-notification';
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
+import { Packed } from '@/misc/schema';
const logger = new Logger('following/create');
@@ -89,8 +90,8 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[
Users.pack(followee.id, follower, {
detail: true,
}).then(packed => {
- publishUserEvent(follower.id, 'follow', packed);
- publishMainStream(follower.id, 'follow', packed);
+ publishUserEvent(follower.id, 'follow', packed as Packed<"UserDetailedNotMe">);
+ publishMainStream(follower.id, 'follow', packed as Packed<"UserDetailedNotMe">);
});
}
diff --git a/packages/backend/src/services/following/requests/create.ts b/packages/backend/src/services/following/requests/create.ts
index cc1abcce19..e45023015d 100644
--- a/packages/backend/src/services/following/requests/create.ts
+++ b/packages/backend/src/services/following/requests/create.ts
@@ -25,7 +25,7 @@ export default async function(follower: { id: User['id']; host: User['host']; ur
if (blocking != null) throw new Error('blocking');
if (blocked != null) throw new Error('blocked');
- const followRequest = await FollowRequests.save({
+ const followRequest = await FollowRequests.insert({
id: genId(),
createdAt: new Date(),
followerId: follower.id,
@@ -39,7 +39,7 @@ export default async function(follower: { id: User['id']; host: User['host']; ur
followeeHost: followee.host,
followeeInbox: Users.isRemoteUser(followee) ? followee.inbox : undefined,
followeeSharedInbox: Users.isRemoteUser(followee) ? followee.sharedInbox : undefined,
- });
+ }).then(x => FollowRequests.findOneOrFail(x.identifiers[0]));
// Publish receiveRequest event
if (Users.isLocalUser(followee)) {
diff --git a/packages/backend/src/services/note/reaction/create.ts b/packages/backend/src/services/note/reaction/create.ts
index e0baa6a096..47f46419dd 100644
--- a/packages/backend/src/services/note/reaction/create.ts
+++ b/packages/backend/src/services/note/reaction/create.ts
@@ -81,19 +81,15 @@ export default async (user: { id: User['id']; host: User['host']; }, note: Note,
name: decodedReaction.name,
host: decodedReaction.host,
},
- select: ['name', 'host', 'url'],
+ select: ['name', 'host', 'originalUrl', 'publicUrl'],
});
- if (emoji) {
- emoji = {
- name: emoji.host ? `${emoji.name}@${emoji.host}` : `${emoji.name}@.`,
- url: emoji.url,
- } as any;
- }
-
publishNoteStream(note.id, 'reacted', {
reaction: decodedReaction.reaction,
- emoji: emoji,
+ emoji: emoji != null ? {
+ name: emoji.host ? `${emoji.name}@${emoji.host}` : `${emoji.name}@.`,
+ url: emoji.publicUrl || emoji.originalUrl, // || emoji.originalUrl してるのは後方互換性のため
+ } : null,
userId: user.id,
});
diff --git a/packages/backend/src/services/register-or-fetch-instance-doc.ts b/packages/backend/src/services/register-or-fetch-instance-doc.ts
index a548ab0497..18b42ed15b 100644
--- a/packages/backend/src/services/register-or-fetch-instance-doc.ts
+++ b/packages/backend/src/services/register-or-fetch-instance-doc.ts
@@ -16,12 +16,12 @@ export async function registerOrFetchInstanceDoc(host: string): Promise<Instance
const index = await Instances.findOne({ host });
if (index == null) {
- const i = await Instances.save({
+ const i = await Instances.insert({
id: genId(),
host,
caughtAt: new Date(),
lastCommunicatedAt: new Date(),
- });
+ }).then(x => Instances.findOneOrFail(x.identifiers[0]));
federationChart.update(true);
diff --git a/packages/backend/src/services/relay.ts b/packages/backend/src/services/relay.ts
index 422da88846..33a5ef7f9b 100644
--- a/packages/backend/src/services/relay.ts
+++ b/packages/backend/src/services/relay.ts
@@ -22,11 +22,11 @@ export async function getRelayActor(): Promise<ILocalUser> {
}
export async function addRelay(inbox: string) {
- const relay = await Relays.save({
+ const relay = await Relays.insert({
id: genId(),
inbox,
status: 'requesting',
- });
+ }).then(x => Relays.findOneOrFail(x.identifiers[0]));
const relayActor = await getRelayActor();
const follow = await renderFollowRelay(relay, relayActor);
diff --git a/packages/backend/src/services/stream.ts b/packages/backend/src/services/stream.ts
index 7d11ff3f45..c0cefe9af4 100644
--- a/packages/backend/src/services/stream.ts
+++ b/packages/backend/src/services/stream.ts
@@ -2,7 +2,6 @@ import { redisClient } from '../db/redis';
import { User } from '@/models/entities/user';
import { Note } from '@/models/entities/note';
import { UserList } from '@/models/entities/user-list';
-import { ReversiGame } from '@/models/entities/games/reversi/game';
import { UserGroup } from '@/models/entities/user-group';
import config from '@/config/index';
import { Antenna } from '@/models/entities/antenna';
@@ -20,8 +19,6 @@ import {
MessagingIndexStreamTypes,
MessagingStreamTypes,
NoteStreamTypes,
- ReversiGameStreamTypes,
- ReversiStreamTypes,
UserListStreamTypes,
UserStreamTypes,
} from '@/server/api/stream/types';
@@ -90,14 +87,6 @@ class Publisher {
this.publish(`messagingIndexStream:${userId}`, type, typeof value === 'undefined' ? null : value);
};
- public publishReversiStream = <K extends keyof ReversiStreamTypes>(userId: User['id'], type: K, value?: ReversiStreamTypes[K]): void => {
- this.publish(`reversiStream:${userId}`, type, typeof value === 'undefined' ? null : value);
- };
-
- public publishReversiGameStream = <K extends keyof ReversiGameStreamTypes>(gameId: ReversiGame['id'], type: K, value?: ReversiGameStreamTypes[K]): void => {
- this.publish(`reversiGameStream:${gameId}`, type, typeof value === 'undefined' ? null : value);
- };
-
public publishNotesStream = (note: Packed<'Note'>): void => {
this.publish('notesStream', null, note);
};
@@ -124,6 +113,4 @@ export const publishAntennaStream = publisher.publishAntennaStream;
export const publishMessagingStream = publisher.publishMessagingStream;
export const publishGroupMessagingStream = publisher.publishGroupMessagingStream;
export const publishMessagingIndexStream = publisher.publishMessagingIndexStream;
-export const publishReversiStream = publisher.publishReversiStream;
-export const publishReversiGameStream = publisher.publishReversiGameStream;
export const publishAdminStream = publisher.publishAdminStream;
diff --git a/packages/backend/src/tools/add-emoji.ts b/packages/backend/src/tools/add-emoji.ts
deleted file mode 100644
index a3f4b54c7e..0000000000
--- a/packages/backend/src/tools/add-emoji.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { initDb } from '@/db/postgre';
-import { genId } from '@/misc/gen-id';
-
-async function main(name: string, url: string, alias?: string): Promise<any> {
- await initDb();
- const { Emojis } = await import('@/models/index');
-
- const aliases = alias != null ? [ alias ] : [];
-
- await Emojis.save({
- id: genId(),
- host: null,
- name,
- url,
- aliases,
- updatedAt: new Date(),
- });
-}
-
-const args = process.argv.slice(2);
-const name = args[0];
-const url = args[1];
-
-if (!name) throw new Error('require name');
-if (!url) throw new Error('require url');
-
-main(name, url).then(() => {
- console.log('success');
- process.exit(0);
-}).catch(e => {
- console.warn(e);
- process.exit(1);
-});
diff --git a/packages/backend/test/docker-compose.yml b/packages/backend/test/docker-compose.yml
index c045e7c6c4..5f95bec4c0 100644
--- a/packages/backend/test/docker-compose.yml
+++ b/packages/backend/test/docker-compose.yml
@@ -2,12 +2,12 @@ version: "3"
services:
redistest:
- image: redis:4.0-alpine
+ image: redis:6
ports:
- "127.0.0.1:56312:6379"
dbtest:
- image: postgres:12.2-alpine
+ image: postgres:13
ports:
- "127.0.0.1:54312:5432"
environment:
diff --git a/packages/backend/yarn.lock b/packages/backend/yarn.lock
index 0652d1df3f..99e2e2306e 100644
--- a/packages/backend/yarn.lock
+++ b/packages/backend/yarn.lock
@@ -82,14 +82,14 @@
pump "^3.0.0"
secure-json-parse "^2.1.0"
-"@eslint/eslintrc@^1.0.4":
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.4.tgz#dfe0ff7ba270848d10c5add0715e04964c034b31"
- integrity sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==
+"@eslint/eslintrc@^1.0.5":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.5.tgz#33f1b838dbf1f923bfa517e008362b78ddbbf318"
+ integrity sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
- espree "^9.0.0"
+ espree "^9.2.0"
globals "^13.9.0"
ignore "^4.0.6"
import-fresh "^3.2.1"
@@ -97,19 +97,24 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"
-"@humanwhocodes/config-array@^0.6.0":
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.6.0.tgz#b5621fdb3b32309d2d16575456cbc277fa8f021a"
- integrity sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==
+"@gar/promisify@^1.0.1":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210"
+ integrity sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==
+
+"@humanwhocodes/config-array@^0.9.2":
+ version "0.9.2"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.2.tgz#68be55c737023009dfc5fe245d51181bb6476914"
+ integrity sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==
dependencies:
- "@humanwhocodes/object-schema" "^1.2.0"
+ "@humanwhocodes/object-schema" "^1.2.1"
debug "^4.1.1"
minimatch "^3.0.4"
-"@humanwhocodes/object-schema@^1.2.0":
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf"
- integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==
+"@humanwhocodes/object-schema@^1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
+ integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@koa/cors@3.1.0":
version "3.1.0"
@@ -134,6 +139,36 @@
methods "^1.1.2"
path-to-regexp "^6.1.0"
+"@node-redis/bloom@^1.0.0":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@node-redis/bloom/-/bloom-1.0.1.tgz#144474a0b7dc4a4b91badea2cfa9538ce0a1854e"
+ integrity sha512-mXEBvEIgF4tUzdIN89LiYsbi6//EdpFA7L8M+DHCvePXg+bfHWi+ct5VI6nHUFQE5+ohm/9wmgihCH3HSkeKsw==
+
+"@node-redis/client@^1.0.2":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@node-redis/client/-/client-1.0.2.tgz#7f09fb739675728fbc6e73536f7cd1be99bf7b8f"
+ integrity sha512-C+gkx68pmTnxfV+y4pzasvCH3s4UGHNOAUNhdJxGI27aMdnXNDZct7ffDHBL7bAZSGv9FSwCP5PeYvEIEKGbiA==
+ dependencies:
+ cluster-key-slot "1.1.0"
+ generic-pool "3.8.2"
+ redis-parser "3.0.0"
+ yallist "4.0.0"
+
+"@node-redis/json@^1.0.2":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@node-redis/json/-/json-1.0.2.tgz#8ad2d0f026698dc1a4238cc3d1eb099a3bee5ab8"
+ integrity sha512-qVRgn8WfG46QQ08CghSbY4VhHFgaTY71WjpwRBGEuqGPfWwfRcIf3OqSpR7Q/45X+v3xd8mvYjywqh0wqJ8T+g==
+
+"@node-redis/search@^1.0.2":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@node-redis/search/-/search-1.0.2.tgz#8cfc91006ea787df801d41410283e1f59027f818"
+ integrity sha512-gWhEeji+kTAvzZeguUNJdMSZNH2c5dv3Bci8Nn2f7VGuf6IvvwuZDSBOuOlirLVgayVuWzAG7EhwaZWK1VDnWQ==
+
+"@node-redis/time-series@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@node-redis/time-series/-/time-series-1.0.1.tgz#703149f8fa4f6fff377c61a0873911e7c1ba5cc3"
+ integrity sha512-+nTn6EewVj3GlUXPuD3dgheWqo219jTxlo6R+pg24OeVvFHx9aFGGiyOgj3vBPhWUdRZ0xMcujXV5ki4fbLyMw==
+
"@nodelib/fs.scandir@2.1.3":
version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
@@ -155,6 +190,14 @@
"@nodelib/fs.scandir" "2.1.3"
fastq "^1.6.0"
+"@npmcli/fs@^1.0.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.0.tgz#bec1d1b89c170d40e1b73ad6c943b0b75e7d2951"
+ integrity sha512-VhP1qZLXcrXRIaPoqb4YA55JQxLNF3jNR4T55IdOJa3+IFJKNYHtPvtXx8slmeMavj37vCzCfrqQM1vWLsYKLA==
+ dependencies:
+ "@gar/promisify" "^1.0.1"
+ semver "^7.3.5"
+
"@npmcli/move-file@^1.0.1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674"
@@ -163,29 +206,30 @@
mkdirp "^1.0.4"
rimraf "^3.0.2"
-"@redocly/ajv@^8.6.2":
- version "8.6.2"
- resolved "https://registry.yarnpkg.com/@redocly/ajv/-/ajv-8.6.2.tgz#8c4e485e72f7864f91fae40093bed548ec2619b2"
- integrity sha512-tU8fQs0D76ZKhJ2cWtnfQthWqiZgGBx0gH0+5D8JvaBEBaqA8foPPBt3Nonwr3ygyv5xrw2IzKWgIY86BlGs+w==
+"@redocly/ajv@^8.6.4":
+ version "8.6.4"
+ resolved "https://registry.yarnpkg.com/@redocly/ajv/-/ajv-8.6.4.tgz#94053e7a9d4146d1a4feacd3813892873f229a85"
+ integrity sha512-y9qNj0//tZtWB2jfXNK3BX18BSBp9zNR7KE7lMysVHwbZtY392OJCjm6Rb/h4UHH2r1AqjNEHFD6bRn+DqU9Mw==
dependencies:
fast-deep-equal "^3.1.1"
json-schema-traverse "^1.0.0"
require-from-string "^2.0.2"
uri-js "^4.2.2"
-"@redocly/openapi-core@1.0.0-beta.54":
- version "1.0.0-beta.54"
- resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.54.tgz#42575a849c4dd54b9d0c6413fb8ca547e087cd11"
- integrity sha512-uYs0N1Trjkh7u8IMIuCU2VxCXhMyGWSZUkP/WNdTR1OgBUtvNdF9C32zoQV+hyCIH4gVu42ROHkjisy333ZX+w==
+"@redocly/openapi-core@1.0.0-beta.79":
+ version "1.0.0-beta.79"
+ resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.79.tgz#7512b3507ab99dc78226f9069669c5302abb0969"
+ integrity sha512-do79vGt3iiHsaVG9LKY8dH+d1E7TLHr+3T+CQ1lqagtWVjYOxqGaoxAT8tRD7R1W0z8BmS4e2poNON6c1sxP5g==
dependencies:
- "@redocly/ajv" "^8.6.2"
+ "@redocly/ajv" "^8.6.4"
"@types/node" "^14.11.8"
colorette "^1.2.0"
js-levenshtein "^1.1.6"
- js-yaml "^3.14.1"
+ js-yaml "^4.1.0"
lodash.isequal "^4.5.0"
minimatch "^3.0.4"
node-fetch "^2.6.1"
+ pluralize "^8.0.0"
yaml-ast-parser "0.0.43"
"@sindresorhus/is@^3.0.0":
@@ -245,11 +289,6 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
-"@trysound/sax@0.2.0":
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad"
- integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==
-
"@tsconfig/node10@^1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.7.tgz#1eb1de36c73478a2479cc661ef5af1c16d86d606"
@@ -295,12 +334,13 @@
"@types/connect" "*"
"@types/node" "*"
-"@types/bull@3.15.5":
- version "3.15.5"
- resolved "https://registry.yarnpkg.com/@types/bull/-/bull-3.15.5.tgz#a4459c127c5b10fb847531579a2cd5db35751366"
- integrity sha512-XgJQWJ03jyKMfdoL8IAIoHIo7JkkL74kcxuujTONkSJswm0giIJ9kuVgDNHS0OvD+OiPNcFmbBl0H3scj2+A8A==
+"@types/bull@3.15.7":
+ version "3.15.7"
+ resolved "https://registry.yarnpkg.com/@types/bull/-/bull-3.15.7.tgz#a9d7fb332cc02dc021d0eb234b9604b356e9e6de"
+ integrity sha512-7NC7XN5NoS0A+leJ/dR69ZfKaegOlCZaii/xGgKnCyh1UYisRncibImb7VMwrc3OdJcbDJt6+4om70TeNl3J7g==
dependencies:
"@types/ioredis" "*"
+ "@types/redis" "^2.8.0"
"@types/cacheable-request@^6.0.1":
version "6.0.1"
@@ -356,10 +396,10 @@
resolved "https://registry.yarnpkg.com/@types/disposable-email-domains/-/disposable-email-domains-1.0.2.tgz#0280f6b38fa7f14e54b056a434135ecd254483b1"
integrity sha512-SDKwyYTjk3y5aZBxxc38yRecpJPjsqn57STz1bNxYYlv4k11bBe7QB8w4llXDTmQXKT1mFvgGmJv+8Zdu3YmJw==
-"@types/escape-regexp@0.0.0":
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/@types/escape-regexp/-/escape-regexp-0.0.0.tgz#bff0225f9ef30d0dbdbe0e2a24283ee5342990c3"
- integrity sha512-HTansGo4tJ7K7W9I9LBdQqnHtPB/Y7tlS+EMrkboaAQLsRPhRpHaqAHe01K1HVXM5e1u1IplRd8EBh+pJrp7Dg==
+"@types/escape-regexp@0.0.1":
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/@types/escape-regexp/-/escape-regexp-0.0.1.tgz#f1a977ccdf2ef059e9862bd3af5e92cbbe723e0e"
+ integrity sha512-ogj/ZTIdeFkiuxDwawYuZSIgC6suFGgBeZPr6Xs5lHEcvIXTjXGtH+/n8f1XhZhespaUwJ5LIGRICPji972FLw==
"@types/eslint-scope@^3.7.0":
version "3.7.0"
@@ -400,10 +440,10 @@
"@types/qs" "*"
"@types/serve-static" "*"
-"@types/fluent-ffmpeg@2.1.17":
- version "2.1.17"
- resolved "https://registry.yarnpkg.com/@types/fluent-ffmpeg/-/fluent-ffmpeg-2.1.17.tgz#6958dda400fe1b33c21f3683db76905cb210d053"
- integrity sha512-/bdvjKw/mtBHlJ2370d04nt4CsWqU5MrwS/NtO96V01jxitJ4+iq8OFNcqc5CegeV3TQOK3uueK02kvRK+zjUg==
+"@types/fluent-ffmpeg@2.1.20":
+ version "2.1.20"
+ resolved "https://registry.yarnpkg.com/@types/fluent-ffmpeg/-/fluent-ffmpeg-2.1.20.tgz#3b5f42fc8263761d58284fa46ee6759a64ce54ac"
+ integrity sha512-B+OvhCdJ3LgEq2PhvWNOiB/EfwnXLElfMCgc4Z1K5zXgSfo9I6uGKwR/lqmNPFQuebNnes7re3gqkV77SyypLg==
dependencies:
"@types/node" "*"
@@ -442,15 +482,15 @@
resolved "https://registry.yarnpkg.com/@types/is-url/-/is-url-1.2.30.tgz#85567e8bee4fee69202bc3448f9fb34b0d56c50a"
integrity sha512-AnlNFwjzC8XLda5VjRl4ItSd8qp8pSNowvsut0WwQyBWHpOxjxRJm8iO6uETWqEyLdYdb9/1j+Qd9gQ4l5I4fw==
-"@types/js-yaml@4.0.4":
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.4.tgz#cc38781257612581a1a0eb25f1709d2b06812fce"
- integrity sha512-AuHubXUmg0AzkXH0Mx6sIxeY/1C110mm/EkE/gB1sTRz3h2dao2W/63q42SlVST+lICxz5Oki2hzYA6+KnnieQ==
+"@types/js-yaml@4.0.5":
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138"
+ integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==
-"@types/jsdom@16.2.13":
- version "16.2.13"
- resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.13.tgz#126c8b7441b159d6234610a48de77b6066f1823f"
- integrity sha512-8JQCjdeAidptSsOcRWk2iTm9wCcwn9l+kRG6k5bzUacrnm1ezV4forq0kWjUih/tumAeoG+OspOvQEbbRucBTw==
+"@types/jsdom@16.2.14":
+ version "16.2.14"
+ resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.14.tgz#26fe9da6a8870715b154bb84cd3b2e53433d8720"
+ integrity sha512-6BAy1xXEmMuHeAJ4Fv4yXKwBDTGTOseExKE3OaHiNycdHdZw59KfYzrt0DkDluvwmik1HRt6QS7bImxUmpSy+w==
dependencies:
"@types/node" "*"
"@types/parse5" "*"
@@ -493,10 +533,10 @@
dependencies:
"@types/node" "*"
-"@types/koa-bodyparser@4.3.3":
- version "4.3.3"
- resolved "https://registry.yarnpkg.com/@types/koa-bodyparser/-/koa-bodyparser-4.3.3.tgz#9c7d4295576bc863d550002f732f1c57dd88cc58"
- integrity sha512-/ileIpXsy1fFEzgZhZ07eZH8rAVL7jwuk/kaoVEfauO6s80g2LIDIJKEyDbuAL9S/BWflKzEC0PHD6aXkmaSbw==
+"@types/koa-bodyparser@4.3.5":
+ version "4.3.5"
+ resolved "https://registry.yarnpkg.com/@types/koa-bodyparser/-/koa-bodyparser-4.3.5.tgz#0c5fa44d7150202ffc16b89bd730ce1b6c7bc250"
+ integrity sha512-NRqqoTtt7cfdDk/KNo+EwCIKRuzPAu/wsaZ7tgIvSIBtNfxuZHYueaLoWdxX3ZftWavQv07NE46TcpyoZGqpgQ==
dependencies:
"@types/koa" "*"
@@ -577,10 +617,10 @@
"@types/koa-compose" "*"
"@types/node" "*"
-"@types/koa__cors@3.0.3":
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/@types/koa__cors/-/koa__cors-3.0.3.tgz#49d75813b443ba3d4da28ea6cf6244b7e99a3b23"
- integrity sha512-74Xb4hJOPGKlrQ4PRBk1A/p0gfLpgbnpT0o67OMVbwyeMXvlBN+ZCRztAAmkKZs+8hKbgMutUlZVbA52Hr/0IA==
+"@types/koa__cors@3.1.1":
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/@types/koa__cors/-/koa__cors-3.1.1.tgz#198b5abbc425a672ae57c311b420bc270e65bdef"
+ integrity sha512-O7MBkCocnLrpEvkMrYAp17arUDS+KuS5bXMG/Z4aPSbrO7vrYB6YrqcsTD3Dp2OnAL3j4WME2k/x2kOcyzwNUw==
dependencies:
"@types/koa" "*"
@@ -591,10 +631,10 @@
dependencies:
"@types/koa" "*"
-"@types/koa__router@8.0.8":
- version "8.0.8"
- resolved "https://registry.yarnpkg.com/@types/koa__router/-/koa__router-8.0.8.tgz#b1e0e9a512498777d3366bbdf0e853df27ec831c"
- integrity sha512-9pGCaDtzCsj4HJ8HmGuqzk8+s57sPj4njWd08GG5o92n5Xp9io2snc40CPpXFhoKcZ8OKhuu6ht4gNou9e1C2w==
+"@types/koa__router@8.0.11":
+ version "8.0.11"
+ resolved "https://registry.yarnpkg.com/@types/koa__router/-/koa__router-8.0.11.tgz#d7b37e6db934fc072ea1baa2ab92bc8ac4564f3e"
+ integrity sha512-WXgKWpBsbS14kzmzD9LeFapOIa678h7zvUHxDwXwSx4ETKXhXLVUAToX6jZ/U7EihM7qwyD9W/BZvB0MRu7MTQ==
dependencies:
"@types/koa" "*"
@@ -613,23 +653,22 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323"
integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==
-"@types/node-fetch@2.5.12":
- version "2.5.12"
- resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66"
- integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==
+"@types/node-fetch@3.0.3":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-3.0.3.tgz#9d969c9a748e841554a40ee435d26e53fa3ee899"
+ integrity sha512-HhggYPH5N+AQe/OmN6fmhKmRRt2XuNJow+R3pQwJxOOF9GuwM7O2mheyGeIrs5MOIeNjDEdgdoyHBOrFeJBR3g==
dependencies:
- "@types/node" "*"
- form-data "^3.0.0"
+ node-fetch "*"
"@types/node@*":
version "16.6.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.2.tgz#331b7b9f8621c638284787c5559423822fdffc50"
integrity sha512-LSw8TZt12ZudbpHc6EkIyDM3nHVWKYrAvGy6EAJfNfjusbwnThqjqxUKKRwuV3iWYeW/LYMzNgaq3MaLffQ2xA==
-"@types/node@16.11.7":
- version "16.11.7"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.7.tgz#36820945061326978c42a01e56b61cd223dfdc42"
- integrity sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==
+"@types/node@17.0.10":
+ version "17.0.10"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.10.tgz#616f16e9d3a2a3d618136b1be244315d95bd7cab"
+ integrity sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog==
"@types/node@^14.11.8":
version "14.17.9"
@@ -665,20 +704,20 @@
resolved "https://registry.yarnpkg.com/@types/portscanner/-/portscanner-2.1.1.tgz#89d5094e16f3d941f20f3889dfa5d3a164b3dd3b"
integrity sha512-1NsVIbgBKvrqxwtMN0V6CLji1ERwKSI/RWz0J3y++CzSwYNGBStCfpIFgxV3ZwxsDR5PoZqoUWhwraDm+Ztn0Q==
-"@types/pug@2.0.5":
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/@types/pug/-/pug-2.0.5.tgz#69bc700934dd473c7ab97270bd2dbacefe562231"
- integrity sha512-LOnASQoeNZMkzexRuyqcBBDZ6rS+rQxUMkmj5A0PkhhiSZivLIuz6Hxyr1mkGoEZEkk66faROmpMi4fFkrKsBA==
+"@types/pug@2.0.6":
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/@types/pug/-/pug-2.0.6.tgz#f830323c88172e66826d0bde413498b61054b5a6"
+ integrity sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==
"@types/punycode@2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/punycode/-/punycode-2.1.0.tgz#89e4f3d09b3f92e87a80505af19be7e0c31d4e83"
integrity sha512-PG5aLpW6PJOeV2fHRslP4IOMWn+G+Uq8CfnyJ+PDS8ndCbU+soO+fB3NKCKo0p/Jh2Y4aPaiQZsrOXFdzpcA6g==
-"@types/qrcode@1.4.1":
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/@types/qrcode/-/qrcode-1.4.1.tgz#0689f400c3a95d2db040c99c99834faa09ee9dc1"
- integrity sha512-vxMyr7JM7tYPxu8vUE83NiosWX5DZieCyYeJRoOIg0pAkyofCBzknJ2ycUZkPGDFis2RS8GN/BeJLnRnAPxeCA==
+"@types/qrcode@1.4.2":
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/@types/qrcode/-/qrcode-1.4.2.tgz#7d7142d6fa9921f195db342ed08b539181546c74"
+ integrity sha512-7uNT9L4WQTNJejHTSTdaJhfBSCN73xtXaHFyBJ8TSwiLhe4PRuTue7Iph0s2nG9R/ifUaSnGhLUOZavlBEqDWQ==
dependencies:
"@types/node" "*"
@@ -697,10 +736,12 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c"
integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==
-"@types/ratelimiter@3.4.2":
- version "3.4.2"
- resolved "https://registry.yarnpkg.com/@types/ratelimiter/-/ratelimiter-3.4.2.tgz#adf1a6d0cbe72d42207efc510a9170602e23456c"
- integrity sha512-iz+yyY+ViphaM8ZwrX1mUQzelIeC59zyaaLKTJ0YVOOCkCpIYpaysiIM4z5Xv9HdXYqIb80S+DhH7J22A0rW2w==
+"@types/ratelimiter@3.4.3":
+ version "3.4.3"
+ resolved "https://registry.yarnpkg.com/@types/ratelimiter/-/ratelimiter-3.4.3.tgz#2159c234b9d75bcc2be39379f05c6af0a5e4a3b7"
+ integrity sha512-B/IRdHGcttRsDeDJ4+VFjzRA1mzqTxsYlg2X8GLQtTgRUMhQQc+bL8zFmuHhZkK4oA+Ldb4K1NogspNDxevWBA==
+ dependencies:
+ "@types/redis" "^2.8.0"
"@types/readable-stream@^2.3.9":
version "2.3.9"
@@ -710,7 +751,14 @@
"@types/node" "*"
safe-buffer "*"
-"@types/redis@2.8.32":
+"@types/redis@4.0.11":
+ version "4.0.11"
+ resolved "https://registry.yarnpkg.com/@types/redis/-/redis-4.0.11.tgz#0bb4c11ac9900a21ad40d2a6768ec6aaf651c0e1"
+ integrity sha512-bI+gth8La8Wg/QCR1+V1fhrL9+LZUSWfcqpOj2Kc80ZQ4ffbdL173vQd5wovmoV9i071FU9oP2g6etLuEwb6Rg==
+ dependencies:
+ redis "*"
+
+"@types/redis@^2.8.0":
version "2.8.32"
resolved "https://registry.yarnpkg.com/@types/redis/-/redis-2.8.32.tgz#1d3430219afbee10f8cfa389dad2571a05ecfb11"
integrity sha512-7jkMKxcGq9p242exlbsVzuJb57KqHRhNl4dHoQu2Y5v9bCAbtIXXH0R3HleSQW4CTOqpHIYUW3t6tpUj4BVQ+w==
@@ -736,10 +784,10 @@
dependencies:
"@types/node" "*"
-"@types/sanitize-html@2.5.0":
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/@types/sanitize-html/-/sanitize-html-2.5.0.tgz#bfef58fbcf2674b20ffcc23c3506faa68c3a13e3"
- integrity sha512-PeFIEZsO9m1+ACJlXUaimgrR+5DEDiIXhz7Hso307jmq5Yz0lb5kDp8LiTr5dMMMliC/jNNx/qds7Zoxa4zexw==
+"@types/sanitize-html@2.6.2":
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/@types/sanitize-html/-/sanitize-html-2.6.2.tgz#9c47960841b9def1e4c9dfebaaab010a3f6e97b9"
+ integrity sha512-7Lu2zMQnmHHQGKXVvCOhSziQMpa+R2hMHFefzbYoYMHeaXR0uXqNeOc3JeQQQ8/6Xa2Br/P1IQTLzV09xxAiUQ==
dependencies:
htmlparser2 "^6.0.0"
@@ -756,10 +804,10 @@
"@types/express-serve-static-core" "*"
"@types/mime" "*"
-"@types/sharp@0.29.3":
- version "0.29.3"
- resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.29.3.tgz#54ceb81b68bb99a0e62db2b52f4fb0bea84878ac"
- integrity sha512-83Xp05eK2hvfNnmKLr2Fz0C2A0jrr2TnSLqKRbkLTYuAu+Erj6mKQLoEMGafE73Om8p3q3ryZxtHFM/7hy4Adg==
+"@types/sharp@0.29.5":
+ version "0.29.5"
+ resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.29.5.tgz#9c7032d30d138ad16dde6326beaff2af757b91b3"
+ integrity sha512-3TC+S3H5RwnJmLYMHrcdfNjz/CaApKmujjY9b6PU/pE6n0qfooi99YqXGWoW8frU9EWYj/XTI35Pzxa+ThAZ5Q==
dependencies:
"@types/node" "*"
@@ -773,10 +821,10 @@
resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"
integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==
-"@types/speakeasy@2.0.6":
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/@types/speakeasy/-/speakeasy-2.0.6.tgz#12540f7b64d08180393ae2c5c8c280866a85da61"
- integrity sha512-2wIXZp5yJUddhsSZarYCZIakCvzwQgTVdtT29DYVdFzc0cHttanaQx9THRhtjY4kDqVaF2jhyFOEofozOioFdQ==
+"@types/speakeasy@2.0.7":
+ version "2.0.7"
+ resolved "https://registry.yarnpkg.com/@types/speakeasy/-/speakeasy-2.0.7.tgz#cb087c501b3eef744a1ae620c19812dd1c3b2f3f"
+ integrity sha512-JEcOhN2SQCoX86ZfiZEe8px84sVJtivBXMZfOVyARTYEj0hrwwbj1nF0FwEL3nJSoEV6uTbcdLllMKBgAYHWCQ==
dependencies:
"@types/node" "*"
@@ -795,10 +843,10 @@
resolved "https://registry.yarnpkg.com/@types/tinycolor2/-/tinycolor2-1.4.3.tgz#ed4a0901f954b126e6a914b4839c77462d56e706"
integrity sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==
-"@types/tmp@0.2.2":
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.2.tgz#424537a3b91828cb26aaf697f21ae3cd1b69f7e7"
- integrity sha512-MhSa0yylXtVMsyT8qFpHA1DLHj4DvQGH5ntxrhHSh8PxUVNi35Wk+P5hVgqbO2qZqOotqr9jaoPRL+iRjWYm/A==
+"@types/tmp@0.2.3":
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.3.tgz#908bfb113419fd6a42273674c00994d40902c165"
+ integrity sha512-dDZH/tXzwjutnuk4UacGgFRwV+JSLaXL1ikvidfJprkb7L9Nx1njcRHHmi3Dsvt7pgqqTEeucQuOrWHPFgzVHA==
"@types/tough-cookie@*":
version "4.0.0"
@@ -812,10 +860,10 @@
dependencies:
source-map "^0.6.1"
-"@types/uuid@8.3.1":
- version "8.3.1"
- resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.1.tgz#1a32969cf8f0364b3d8c8af9cc3555b7805df14f"
- integrity sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==
+"@types/uuid@8.3.4":
+ version "8.3.4"
+ resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc"
+ integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==
"@types/web-push@3.3.2":
version "3.3.2"
@@ -869,10 +917,10 @@
dependencies:
"@types/node" "*"
-"@types/ws@8.2.0":
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.2.0.tgz#75faefbe2328f3b833cb8dc640658328990d04f3"
- integrity sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==
+"@types/ws@8.2.2":
+ version "8.2.2"
+ resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.2.2.tgz#7c5be4decb19500ae6b3d563043cd407bf366c21"
+ integrity sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==
dependencies:
"@types/node" "*"
@@ -881,13 +929,14 @@
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.2.tgz#808c9fa7e4517274ed555fa158f2de4b4f468e71"
integrity sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg==
-"@typescript-eslint/eslint-plugin@5.3.1":
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.3.1.tgz#d8ff412f10f54f6364e7fd7c1e70eb6767f434c3"
- integrity sha512-cFImaoIr5Ojj358xI/SDhjog57OK2NqlpxwdcgyxDA3bJlZcJq5CPzUXtpD7CxI2Hm6ATU7w5fQnnkVnmwpHqw==
+"@typescript-eslint/eslint-plugin@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.0.tgz#e90afea96dff8620892ad216b0e4ccdf8ee32d3a"
+ integrity sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ==
dependencies:
- "@typescript-eslint/experimental-utils" "5.3.1"
- "@typescript-eslint/scope-manager" "5.3.1"
+ "@typescript-eslint/scope-manager" "5.10.0"
+ "@typescript-eslint/type-utils" "5.10.0"
+ "@typescript-eslint/utils" "5.10.0"
debug "^4.3.2"
functional-red-black-tree "^1.0.1"
ignore "^5.1.8"
@@ -895,94 +944,69 @@
semver "^7.3.5"
tsutils "^3.21.0"
-"@typescript-eslint/experimental-utils@5.3.1":
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.3.1.tgz#bbd8f9b67b4d5fdcb9d2f90297d8fcda22561e05"
- integrity sha512-RgFn5asjZ5daUhbK5Sp0peq0SSMytqcrkNfU4pnDma2D8P3ElZ6JbYjY8IMSFfZAJ0f3x3tnO3vXHweYg0g59w==
- dependencies:
- "@types/json-schema" "^7.0.9"
- "@typescript-eslint/scope-manager" "5.3.1"
- "@typescript-eslint/types" "5.3.1"
- "@typescript-eslint/typescript-estree" "5.3.1"
- eslint-scope "^5.1.1"
- eslint-utils "^3.0.0"
-
-"@typescript-eslint/parser@5.1.0":
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.1.0.tgz#6c7f837d210d2bc0a811e7ea742af414f4e00908"
- integrity sha512-vx1P+mhCtYw3+bRHmbalq/VKP2Y3gnzNgxGxfEWc6OFpuEL7iQdAeq11Ke3Rhy8NjgB+AHsIWEwni3e+Y7djKA==
+"@typescript-eslint/parser@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.10.0.tgz#8f59e036f5f1cffc178cacbd5ccdd02aeb96c91c"
+ integrity sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw==
dependencies:
- "@typescript-eslint/scope-manager" "5.1.0"
- "@typescript-eslint/types" "5.1.0"
- "@typescript-eslint/typescript-estree" "5.1.0"
+ "@typescript-eslint/scope-manager" "5.10.0"
+ "@typescript-eslint/types" "5.10.0"
+ "@typescript-eslint/typescript-estree" "5.10.0"
debug "^4.3.2"
-"@typescript-eslint/scope-manager@5.1.0":
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.1.0.tgz#6f1f26ad66a8f71bbb33b635e74fec43f76b44df"
- integrity sha512-yYlyVjvn5lvwCL37i4hPsa1s0ORsjkauhTqbb8MnpvUs7xykmcjGqwlNZ2Q5QpoqkJ1odlM2bqHqJwa28qV6Tw==
+"@typescript-eslint/scope-manager@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz#bb5d872e8b9e36203908595507fbc4d3105329cb"
+ integrity sha512-tgNgUgb4MhqK6DoKn3RBhyZ9aJga7EQrw+2/OiDk5hKf3pTVZWyqBi7ukP+Z0iEEDMF5FDa64LqODzlfE4O/Dg==
dependencies:
- "@typescript-eslint/types" "5.1.0"
- "@typescript-eslint/visitor-keys" "5.1.0"
+ "@typescript-eslint/types" "5.10.0"
+ "@typescript-eslint/visitor-keys" "5.10.0"
-"@typescript-eslint/scope-manager@5.3.1":
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz#3cfbfbcf5488fb2a9a6fbbe97963ee1e8d419269"
- integrity sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==
+"@typescript-eslint/type-utils@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.10.0.tgz#8524b9479c19c478347a7df216827e749e4a51e5"
+ integrity sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ==
dependencies:
- "@typescript-eslint/types" "5.3.1"
- "@typescript-eslint/visitor-keys" "5.3.1"
-
-"@typescript-eslint/types@5.1.0":
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.1.0.tgz#a8a75ddfc611660de6be17d3ad950302385607a9"
- integrity sha512-sEwNINVxcB4ZgC6Fe6rUyMlvsB2jvVdgxjZEjQUQVlaSPMNamDOwO6/TB98kFt4sYYfNhdhTPBEQqNQZjMMswA==
-
-"@typescript-eslint/types@5.3.1":
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.3.1.tgz#afaa715b69ebfcfde3af8b0403bf27527912f9b7"
- integrity sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==
-
-"@typescript-eslint/typescript-estree@5.1.0":
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.1.0.tgz#132aea34372df09decda961cb42457433aa6e83d"
- integrity sha512-SSz+l9YrIIsW4s0ZqaEfnjl156XQ4VRmJsbA0ZE1XkXrD3cRpzuZSVCyqeCMR3EBjF27IisWakbBDGhGNIOvfQ==
- dependencies:
- "@typescript-eslint/types" "5.1.0"
- "@typescript-eslint/visitor-keys" "5.1.0"
+ "@typescript-eslint/utils" "5.10.0"
debug "^4.3.2"
- globby "^11.0.4"
- is-glob "^4.0.3"
- semver "^7.3.5"
tsutils "^3.21.0"
-"@typescript-eslint/typescript-estree@5.3.1":
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.3.1.tgz#50cc4bfb93dc31bc75e08ae52e29fcb786d606ec"
- integrity sha512-PwFbh/PKDVo/Wct6N3w+E4rLZxUDgsoII/GrWM2A62ETOzJd4M6s0Mu7w4CWsZraTbaC5UQI+dLeyOIFF1PquQ==
+"@typescript-eslint/types@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.10.0.tgz#beb3cb345076f5b088afe996d57bcd1dfddaa75c"
+ integrity sha512-wUljCgkqHsMZbw60IbOqT/puLfyqqD5PquGiBo1u1IS3PLxdi3RDGlyf032IJyh+eQoGhz9kzhtZa+VC4eWTlQ==
+
+"@typescript-eslint/typescript-estree@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.0.tgz#4be24a3dea0f930bb1397c46187d0efdd955a224"
+ integrity sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA==
dependencies:
- "@typescript-eslint/types" "5.3.1"
- "@typescript-eslint/visitor-keys" "5.3.1"
+ "@typescript-eslint/types" "5.10.0"
+ "@typescript-eslint/visitor-keys" "5.10.0"
debug "^4.3.2"
globby "^11.0.4"
is-glob "^4.0.3"
semver "^7.3.5"
tsutils "^3.21.0"
-"@typescript-eslint/visitor-keys@5.1.0":
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.1.0.tgz#e01a01b27eb173092705ae983aa1451bd1842630"
- integrity sha512-uqNXepKBg81JVwjuqAxYrXa1Ql/YDzM+8g/pS+TCPxba0wZttl8m5DkrasbfnmJGHs4lQ2jTbcZ5azGhI7kK+w==
+"@typescript-eslint/utils@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.10.0.tgz#c3d152a85da77c400e37281355561c72fb1b5a65"
+ integrity sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg==
dependencies:
- "@typescript-eslint/types" "5.1.0"
- eslint-visitor-keys "^3.0.0"
+ "@types/json-schema" "^7.0.9"
+ "@typescript-eslint/scope-manager" "5.10.0"
+ "@typescript-eslint/types" "5.10.0"
+ "@typescript-eslint/typescript-estree" "5.10.0"
+ eslint-scope "^5.1.1"
+ eslint-utils "^3.0.0"
-"@typescript-eslint/visitor-keys@5.3.1":
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz#c2860ff22939352db4f3806f34b21d8ad00588ba"
- integrity sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==
+"@typescript-eslint/visitor-keys@5.10.0":
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.0.tgz#770215497ad67cd15a572b52089991d5dfe06281"
+ integrity sha512-GMxj0K1uyrFLPKASLmZzCuSddmjZVbVj3Ouy5QVuIGKZopxvOr24JsS7gruz6C3GExE01mublZ3mIBOaon9zuQ==
dependencies:
- "@typescript-eslint/types" "5.3.1"
+ "@typescript-eslint/types" "5.10.0"
eslint-visitor-keys "^3.0.0"
"@ungap/promise-all-settled@1.1.2":
@@ -1189,12 +1213,12 @@ acorn@^8.4.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c"
integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==
-acorn@^8.5.0:
- version "8.5.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2"
- integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==
+acorn@^8.7.0:
+ version "8.7.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf"
+ integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==
-agent-base@6:
+agent-base@6, agent-base@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
@@ -1233,12 +1257,7 @@ ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-alphanum-sort@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
- integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
-
-ansi-colors@4.1.1, ansi-colors@^4.1.1:
+ansi-colors@4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
@@ -1253,11 +1272,6 @@ ansi-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
-ansi-regex@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
- integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
-
ansi-regex@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
@@ -1268,7 +1282,7 @@ ansi-regex@^5.0.1:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
-ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
@@ -1311,6 +1325,11 @@ aproba@^1.0.3:
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
+"aproba@^1.0.3 || ^2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc"
+ integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==
+
archiver-utils@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2"
@@ -1340,6 +1359,14 @@ archiver@5.3.0:
tar-stream "^2.2.0"
zip-stream "^4.1.0"
+are-we-there-yet@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c"
+ integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^3.6.0"
+
are-we-there-yet@~1.1.2:
version "1.1.5"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
@@ -1353,13 +1380,6 @@ arg@^4.1.0:
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
-argparse@^1.0.7:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
- integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
- dependencies:
- sprintf-js "~1.0.2"
-
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
@@ -1449,11 +1469,6 @@ autobind-decorator@2.4.0, autobind-decorator@^2.4.0:
resolved "https://registry.yarnpkg.com/autobind-decorator/-/autobind-decorator-2.4.0.tgz#ea9e1c98708cf3b5b356f7cf9f10f265ff18239c"
integrity sha512-OGYhWUO72V6DafbF8PM8rm3EPbfuyMZcJhtm5/n26IDwO18pohE4eNazLoCGhPiXOCD0gEGmrbU3849QvM8bbw==
-autosize@4.0.4:
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/autosize/-/autosize-4.0.4.tgz#924f13853a466b633b9309330833936d8bccce03"
- integrity sha512-5yxLQ22O0fCRGoxGfeLSNt3J8LB1v+umtpMnPW6XjkTWXKoN0AmXAIhelJcDtFT/Y/wYWmfE+oqU10Q0b8FhaQ==
-
autwh@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/autwh/-/autwh-0.1.0.tgz#24a5300923309d105133401a2568f9c8ab7d7e03"
@@ -1461,27 +1476,27 @@ autwh@0.1.0:
dependencies:
oauth "0.9.15"
-aws-sdk@2.1013.0:
- version "2.1013.0"
- resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1013.0.tgz#85babc473b0bc90cc1160eb48baf616ddb86e346"
- integrity sha512-TXxkp/meAdofpC15goFpNuur7fvh/mcMRfHJoP1jYzTtD0wcoB4FK16GLcny0uDYgkQgZuiO9QYv3Rq5bhGCqQ==
+aws-sdk@2.1061.0:
+ version "2.1061.0"
+ resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1061.0.tgz#79c75e6856e5a59e0857d0d066a8ff5ff5e0d752"
+ integrity sha512-T29yV+EPo4Fis9hAArxAXS/u6utKnlBq3DEu85LTSIA8i6e6Xg7e9u7Rveo8DmrlVrf7EGCNThaeF9WERHnwLg==
dependencies:
buffer "4.9.2"
events "1.1.1"
ieee754 "1.1.13"
- jmespath "0.15.0"
+ jmespath "0.16.0"
querystring "0.2.0"
sax "1.2.1"
url "0.10.3"
uuid "3.3.2"
xml2js "0.4.19"
-axios@^0.19.2:
- version "0.19.2"
- resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
- integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
+axios@^0.24.0:
+ version "0.24.0"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
+ integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
dependencies:
- follow-redirects "1.5.10"
+ follow-redirects "^1.14.4"
babel-walk@3.0.0-canary-5:
version "3.0.0-canary-5"
@@ -1527,6 +1542,11 @@ big-integer@^1.6.16:
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e"
integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==
+big-integer@^1.6.17:
+ version "1.6.51"
+ resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
+ integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
+
big.js@^5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
@@ -1537,6 +1557,14 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c"
integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==
+binary@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79"
+ integrity sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=
+ dependencies:
+ buffers "~0.1.1"
+ chainsaw "~0.1.0"
+
bl@^4.0.1, bl@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489"
@@ -1551,6 +1579,11 @@ bluebird@^3.7.2:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
+bluebird@~3.4.1:
+ version "3.4.7"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3"
+ integrity sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=
+
blurhash@1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/blurhash/-/blurhash-1.1.4.tgz#a7010ceb3019cd2c9809b17c910ebf6175d29244"
@@ -1561,7 +1594,7 @@ bn.js@^4.0.0:
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==
-boolbase@^1.0.0, boolbase@~1.0.0:
+boolbase@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
@@ -1581,16 +1614,17 @@ braces@^3.0.1, braces@~3.0.2:
dependencies:
fill-range "^7.0.1"
-broadcast-channel@4.5.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-4.5.0.tgz#d4717c493e219908fcb7f2f9078fe0baf95b77c1"
- integrity sha512-jp+VPlQ1HyR0CM3uIYUrdpXupBvhTMFRkjR6mEmt5W4HaGDPFEzrO2Jqvi2PZ6zCC4zwLeco7CC5EUJPrVH8Tw==
+broadcast-channel@4.9.0:
+ version "4.9.0"
+ resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-4.9.0.tgz#8af337d4ea19aeb6b819ec2eb3dda942b28c724c"
+ integrity sha512-xWzFb3wrOZGJF2kOSs2D3KvHXdLDMVb+WypEIoNvwblcHgUBydVy65pDJ9RS4WN9Kyvs0UVQuCCzfKme0G6Qjw==
dependencies:
"@babel/runtime" "^7.16.0"
detect-node "^2.1.0"
microseconds "0.2.0"
nano-time "1.0.0"
oblivious-set "1.0.0"
+ p-queue "6.6.2"
rimraf "3.0.2"
unload "2.3.1"
@@ -1604,7 +1638,7 @@ browser-stdout@1.3.1:
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
-browserslist@^4.0.0, browserslist@^4.14.5:
+browserslist@^4.14.5:
version "4.16.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717"
integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==
@@ -1615,48 +1649,6 @@ browserslist@^4.0.0, browserslist@^4.14.5:
escalade "^3.1.1"
node-releases "^1.1.70"
-browserslist@^4.16.0:
- version "4.16.4"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.4.tgz#7ebf913487f40caf4637b892b268069951c35d58"
- integrity sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==
- dependencies:
- caniuse-lite "^1.0.30001208"
- colorette "^1.2.2"
- electron-to-chromium "^1.3.712"
- escalade "^3.1.1"
- node-releases "^1.1.71"
-
-browserslist@^4.16.6:
- version "4.16.6"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2"
- integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==
- dependencies:
- caniuse-lite "^1.0.30001219"
- colorette "^1.2.2"
- electron-to-chromium "^1.3.723"
- escalade "^3.1.1"
- node-releases "^1.1.71"
-
-bs-logger@0.x:
- version "0.2.6"
- resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8"
- integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==
- dependencies:
- fast-json-stable-stringify "2.x"
-
-buffer-alloc-unsafe@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
- integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==
-
-buffer-alloc@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
- integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==
- dependencies:
- buffer-alloc-unsafe "^1.1.0"
- buffer-fill "^1.0.0"
-
buffer-crc32@^0.2.1, buffer-crc32@^0.2.13:
version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
@@ -1667,21 +1659,16 @@ buffer-equal-constant-time@1.0.1:
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=
-buffer-fill@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
- integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
-
-buffer-from@1.x:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
- integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
-
-buffer-from@^1.0.0, buffer-from@^1.1.1:
+buffer-from@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
+buffer-indexof-polyfill@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz#d2732135c5999c64b277fcf9b1abe3498254729c"
+ integrity sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==
+
buffer-writer@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04"
@@ -1696,7 +1683,7 @@ buffer@4.9.2:
ieee754 "^1.1.4"
isarray "^1.0.0"
-buffer@^5.4.3, buffer@^5.5.0:
+buffer@^5.5.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786"
integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==
@@ -1712,6 +1699,11 @@ buffer@^6.0.3:
base64-js "^1.3.1"
ieee754 "^1.2.1"
+buffers@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
+ integrity sha1-skV5w77U1tOWru5tmorn9Ugqt7s=
+
bufferutil@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.1.tgz#3a177e8e5819a1243fe16b63a199951a7ad8d4a7"
@@ -1719,10 +1711,10 @@ bufferutil@^4.0.1:
dependencies:
node-gyp-build "~3.7.0"
-bull@4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/bull/-/bull-4.1.0.tgz#ff8f628694e7dbbdf89b6a6860a1f33e990527fd"
- integrity sha512-rQcLuAmzZIv1dHJO/yKrWu497xcTxMpYeTEBfpStrJFZ1UZpBSGHSx+defbtFVeGEeY8Pn0aMGRvRtldUBVUyQ==
+bull@4.2.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/bull/-/bull-4.2.1.tgz#c5a7e1496c7903274ce90192e4e5cb18f6c866c0"
+ integrity sha512-YkCQZMOub++siHw3SbYYXZ5xGEn6Tt3BPoCVq/irPNCxUqUYzta8yDlXyyAsfMKMVj0M7PcnynUabfMf9PFpOA==
dependencies:
cron-parser "^2.13.0"
debuglog "^1.0.0"
@@ -1730,9 +1722,7 @@ bull@4.1.0:
ioredis "^4.27.0"
lodash "^4.17.21"
p-timeout "^3.2.0"
- promise.prototype.finally "^3.1.2"
semver "^7.3.2"
- util.promisify "^1.0.1"
uuid "^8.3.0"
busboy@^0.2.11:
@@ -1748,11 +1738,12 @@ bytes@3.1.0, bytes@^3.1.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
-cacache@^15.0.5:
- version "15.1.0"
- resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.1.0.tgz#164c2f857ee606e4cc793c63018fefd0ea5eba7b"
- integrity sha512-mfx0C+mCfWjD1PnwQ9yaOrwG1ou9FkKnx0SvzUHWdFt7r7GaRtzT+9M8HAvLu62zIHtnpQ/1m93nWNDCckJGXQ==
+cacache@^15.2.0:
+ version "15.3.0"
+ resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb"
+ integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==
dependencies:
+ "@npmcli/fs" "^1.0.0"
"@npmcli/move-file" "^1.0.1"
chownr "^2.0.0"
fs-minipass "^2.0.0"
@@ -1830,36 +1821,11 @@ camelcase@^6.0.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
-caniuse-api@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0"
- integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==
- dependencies:
- browserslist "^4.0.0"
- caniuse-lite "^1.0.0"
- lodash.memoize "^4.1.2"
- lodash.uniq "^4.5.0"
-
-caniuse-lite@^1.0.0:
- version "1.0.30001048"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001048.tgz#4bb4f1bc2eb304e5e1154da80b93dee3f1cf447e"
- integrity sha512-g1iSHKVxornw0K8LG9LLdf+Fxnv7T1Z+mMsf0/YYLclQX4Cd522Ap0Lrw6NFqHgezit78dtyWxzlV2Xfc7vgRg==
-
caniuse-lite@^1.0.30001181:
version "1.0.30001191"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001191.tgz#bacb432b6701f690c8c5f7c680166b9a9f0843d9"
integrity sha512-xJJqzyd+7GCJXkcoBiQ1GuxEiOBCLQ0aVW9HMekifZsAVGdj5eJ4mFB9fEhSHipq9IOk/QXFJUiIr9lZT+EsGw==
-caniuse-lite@^1.0.30001208:
- version "1.0.30001208"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz#a999014a35cebd4f98c405930a057a0d75352eb9"
- integrity sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==
-
-caniuse-lite@^1.0.30001219:
- version "1.0.30001230"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz#8135c57459854b2240b57a4a6786044bdc5a9f71"
- integrity sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==
-
canonicalize@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-1.0.1.tgz#657b4f3fa38a6ecb97a9e5b7b26d7a19cc6e0da9"
@@ -1880,6 +1846,13 @@ cbor@8.1.0:
dependencies:
nofilter "^3.1.0"
+chainsaw@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98"
+ integrity sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=
+ dependencies:
+ traverse ">=0.3.0 <0.4"
+
chalk@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72"
@@ -1925,23 +1898,6 @@ character-parser@^2.2.0:
dependencies:
is-regex "^1.0.3"
-chart.js@3.6.0:
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-3.6.0.tgz#a87fce8431d4e7c5523d721f487f53aada1e42fe"
- integrity sha512-iOzzDKePL+bj+ccIsVAgWQehCXv8xOKGbaU2fO/myivH736zcx535PGJzQGanvcSGVOqX6yuLZsN3ygcQ35UgQ==
-
-chartjs-adapter-date-fns@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-2.0.0.tgz#5e53b2f660b993698f936f509c86dddf9ed44c6b"
- integrity sha512-rmZINGLe+9IiiEB0kb57vH3UugAtYw33anRiw5kS2Tu87agpetDDoouquycWc9pRsKtQo5j+vLsYHyr8etAvFw==
-
-chartjs-plugin-zoom@1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/chartjs-plugin-zoom/-/chartjs-plugin-zoom-1.1.1.tgz#8a28923a17fcb5eb57a0dc94c5113bf402677647"
- integrity sha512-1q54WOzK7FtAjkbemQeqvmFUV0btNYIQny2HbQ6Awq9wUtCz7Zmj6vIgp3C1DYMQwN0nqgpC3vnApqiwI7cSdQ==
- dependencies:
- hammerjs "^2.0.8"
-
cheerio@0.22.0:
version "0.22.0"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e"
@@ -2013,14 +1969,14 @@ cli-highlight@2.1.11, cli-highlight@^2.1.11:
parse5-htmlparser2-tree-adapter "^6.0.0"
yargs "^16.0.0"
-cliui@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
- integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==
+cliui@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
+ integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
dependencies:
- string-width "^3.1.0"
- strip-ansi "^5.2.0"
- wrap-ansi "^5.1.0"
+ string-width "^4.2.0"
+ strip-ansi "^6.0.0"
+ wrap-ansi "^6.2.0"
cliui@^7.0.2:
version "7.0.4"
@@ -2038,7 +1994,7 @@ clone-response@^1.0.2:
dependencies:
mimic-response "^1.0.0"
-cluster-key-slot@^1.1.0:
+cluster-key-slot@1.1.0, cluster-key-slot@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz#30474b2a981fb12172695833052bc0d01336d10d"
integrity sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw==
@@ -2105,6 +2061,11 @@ color-string@^1.6.0:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
+color-support@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
+ integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
+
color@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/color/-/color-4.0.1.tgz#21df44cd10245a91b1ccf5ba031609b0e10e7d67"
@@ -2113,12 +2074,7 @@ color@^4.0.1:
color-convert "^2.0.1"
color-string "^1.6.0"
-colord@^2.9.1:
- version "2.9.1"
- resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.1.tgz#c961ea0efeb57c9f0f4834458f26cb9cc4a3f90e"
- integrity sha512-4LBMSt09vR0uLnPVkOUBnmxgoaeN4ewRbx801wY/bXcltXfpR/G46OdWn96XpYmCWuYvO46aBZP4NgX8HpNAcw==
-
-colorette@^1.2.0, colorette@^1.2.1, colorette@^1.2.2:
+colorette@^1.2.0, colorette@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==
@@ -2135,21 +2091,11 @@ commander@^2.19.0, commander@^2.20.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
-commander@^7.2.0:
- version "7.2.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
- integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
-
commander@^8.2.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
-compare-versions@3.6.0:
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
- integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
-
compress-commons@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d"
@@ -2192,7 +2138,7 @@ config-chain@^1.1.12:
ini "^1.3.4"
proto-list "~1.2.1"
-console-control-strings@^1.0.0, console-control-strings@~1.1.0:
+console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
@@ -2212,7 +2158,14 @@ constantinople@^4.0.1:
"@babel/parser" "^7.6.0"
"@babel/types" "^7.6.1"
-content-disposition@0.5.3, content-disposition@~0.5.2:
+content-disposition@0.5.4:
+ version "0.5.4"
+ resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe"
+ integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==
+ dependencies:
+ safe-buffer "5.2.1"
+
+content-disposition@~0.5.2:
version "0.5.3"
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
@@ -2287,43 +2240,6 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"
-css-color-names@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-1.0.1.tgz#6ff7ee81a823ad46e020fa2fd6ab40a887e2ba67"
- integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA==
-
-css-declaration-sorter@^6.0.3:
- version "6.0.3"
- resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.0.3.tgz#9dfd8ea0df4cc7846827876fafb52314890c21a9"
- integrity sha512-52P95mvW1SMzuRZegvpluT6yEv0FqQusydKQPZsNN5Q7hh8EwQvN8E2nwuJ16BBvNN6LcoIZXu/Bk58DAhrrxw==
- dependencies:
- timsort "^0.3.0"
-
-css-loader@6.5.1:
- version "6.5.1"
- resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.5.1.tgz#0c43d4fbe0d97f699c91e9818cb585759091d1b1"
- integrity sha512-gEy2w9AnJNnD9Kuo4XAP9VflW/ujKoS9c/syO+uWMlm5igc7LysKzPXaDoR2vroROkSwsTS2tGr1yGGEbZOYZQ==
- dependencies:
- icss-utils "^5.1.0"
- postcss "^8.2.15"
- postcss-modules-extract-imports "^3.0.0"
- postcss-modules-local-by-default "^4.0.0"
- postcss-modules-scope "^3.0.0"
- postcss-modules-values "^4.0.0"
- postcss-value-parser "^4.1.0"
- semver "^7.3.5"
-
-css-select@^4.1.3:
- version "4.1.3"
- resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067"
- integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==
- dependencies:
- boolbase "^1.0.0"
- css-what "^5.0.0"
- domhandler "^4.2.0"
- domutils "^2.6.0"
- nth-check "^2.0.0"
-
css-select@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"
@@ -2334,86 +2250,11 @@ css-select@~1.2.0:
domutils "1.5.1"
nth-check "~1.0.1"
-css-tree@^1.1.2, css-tree@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
- integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==
- dependencies:
- mdn-data "2.0.14"
- source-map "^0.6.1"
-
css-what@2.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2"
integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==
-css-what@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe"
- integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==
-
-cssesc@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
- integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
-
-cssnano-preset-default@^5.1.6:
- version "5.1.6"
- resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.6.tgz#1bdb83be6a6b1fee6dc5e9ec2e61286bcadcc7a6"
- integrity sha512-X2nDeNGBXc0486oHjT2vSj+TdeyVsxRvJUxaOH50hOM6vSDLkKd0+59YXpSZRInJ4sNtBOykS4KsPfhdrU/35w==
- dependencies:
- css-declaration-sorter "^6.0.3"
- cssnano-utils "^2.0.1"
- postcss-calc "^8.0.0"
- postcss-colormin "^5.2.1"
- postcss-convert-values "^5.0.2"
- postcss-discard-comments "^5.0.1"
- postcss-discard-duplicates "^5.0.1"
- postcss-discard-empty "^5.0.1"
- postcss-discard-overridden "^5.0.1"
- postcss-merge-longhand "^5.0.3"
- postcss-merge-rules "^5.0.2"
- postcss-minify-font-values "^5.0.1"
- postcss-minify-gradients "^5.0.3"
- postcss-minify-params "^5.0.1"
- postcss-minify-selectors "^5.1.0"
- postcss-normalize-charset "^5.0.1"
- postcss-normalize-display-values "^5.0.1"
- postcss-normalize-positions "^5.0.1"
- postcss-normalize-repeat-style "^5.0.1"
- postcss-normalize-string "^5.0.1"
- postcss-normalize-timing-functions "^5.0.1"
- postcss-normalize-unicode "^5.0.1"
- postcss-normalize-url "^5.0.2"
- postcss-normalize-whitespace "^5.0.1"
- postcss-ordered-values "^5.0.2"
- postcss-reduce-initial "^5.0.1"
- postcss-reduce-transforms "^5.0.1"
- postcss-svgo "^5.0.3"
- postcss-unique-selectors "^5.0.1"
-
-cssnano-utils@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.1.tgz#8660aa2b37ed869d2e2f22918196a9a8b6498ce2"
- integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==
-
-cssnano@5.0.10:
- version "5.0.10"
- resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.10.tgz#92207eb7c9c6dc08d318050726f9fad0adf7220b"
- integrity sha512-YfNhVJJ04imffOpbPbXP2zjIoByf0m8E2c/s/HnvSvjXgzXMfgopVjAEGvxYOjkOpWuRQDg/OZFjO7WW94Ri8w==
- dependencies:
- cssnano-preset-default "^5.1.6"
- is-resolvable "^1.1.0"
- lilconfig "^2.0.3"
- yaml "^1.10.2"
-
-csso@^4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529"
- integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==
- dependencies:
- css-tree "^1.1.2"
-
cssom@^0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10"
@@ -2451,6 +2292,11 @@ data-uri-to-buffer@^3.0.1:
resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636"
integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==
+data-uri-to-buffer@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b"
+ integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==
+
data-urls@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b"
@@ -2460,11 +2306,6 @@ data-urls@^2.0.0:
whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0"
-date-fns@2.25.0:
- version "2.25.0"
- resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.25.0.tgz#8c5c8f1d958be3809a9a03f4b742eba894fc5680"
- integrity sha512-ovYRFnTrbGPD4nqaEqescPEv1mNwvt+UTqI3Ay9SzNtey9NZnYu6E2qCcBBgJ6/2VF1zGGygpyTDITqpQQ5e+w==
-
dateformat@4.5.1:
version "4.5.1"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.5.1.tgz#c20e7a9ca77d147906b6dc2261a8be0a5bd2173c"
@@ -2491,13 +2332,6 @@ debug@4.3.3:
dependencies:
ms "2.1.2"
-debug@=3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
- integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
- dependencies:
- ms "2.0.0"
-
debug@^3.2.6:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
@@ -2539,13 +2373,6 @@ decimal.js@^10.2.1:
resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3"
integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==
-decompress-response@^4.2.0:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986"
- integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==
- dependencies:
- mimic-response "^2.0.0"
-
decompress-response@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
@@ -2553,17 +2380,15 @@ decompress-response@^6.0.0:
dependencies:
mimic-response "^3.1.0"
-deep-email-validator@0.1.18:
- version "0.1.18"
- resolved "https://registry.yarnpkg.com/deep-email-validator/-/deep-email-validator-0.1.18.tgz#a072a93f28e11863cc6b9ca3ae964e0e45b3ece8"
- integrity sha512-eo2WEUidQvppg6Qdek8iwOqmXvaxRJ2D2VJKbIOwUgLZNFveDDdJMBsFc+yq0S+lILEUcmzrJRrCWbyoe7QUzQ==
+deep-email-validator@0.1.21:
+ version "0.1.21"
+ resolved "https://registry.yarnpkg.com/deep-email-validator/-/deep-email-validator-0.1.21.tgz#5d0120fe1aeae83ab7cb39378a40a381b681219f"
+ integrity sha512-DBAmMzbr+MAubXQ+TS9tZuPwLcdKscb8YzKZiwoLqF3NmaeEgXvSSHhZ0EXOFeKFE2FNWC4mNXCyiQ/JdFXUwg==
dependencies:
"@types/disposable-email-domains" "^1.0.1"
- axios "^0.19.2"
- disposable-email-domains "^1.0.53"
- lodash "^4.17.15"
+ axios "^0.24.0"
+ disposable-email-domains "^1.0.59"
mailcheck "^1.1.1"
- ts-jest "^25.2.1"
deep-equal@~1.0.1:
version "1.0.1"
@@ -2590,7 +2415,7 @@ defer-to-connect@^2.0.0:
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.0.tgz#83d6b199db041593ac84d781b5222308ccf4c2c1"
integrity sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg==
-define-properties@^1.1.2, define-properties@^1.1.3:
+define-properties@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
@@ -2677,10 +2502,10 @@ dir-glob@^3.0.1:
dependencies:
path-type "^4.0.0"
-disposable-email-domains@^1.0.53:
- version "1.0.58"
- resolved "https://registry.yarnpkg.com/disposable-email-domains/-/disposable-email-domains-1.0.58.tgz#ac9c879c02c4f0898bfb6c0c80b959c0b0b7bc51"
- integrity sha512-frnNCPqTjk6t/sosPoco6EIFHbP9SazHQkeltJNfZeUyNgewaVf+kFjEfVkVDVd436Vln43YElJPb8JozhBs7Q==
+disposable-email-domains@^1.0.59:
+ version "1.0.59"
+ resolved "https://registry.yarnpkg.com/disposable-email-domains/-/disposable-email-domains-1.0.59.tgz#8b3670667dcef9d0d21b224de283d56d468913c2"
+ integrity sha512-45NbOP1Oboaddf0pD5mGnT+1msEifY6VUcR9Msq4zBHk2EeGv9PxiwuoynIfdGID1BSFR3U3egPfMbERkqXxUQ==
doctrine@^2.1.0:
version "2.1.0"
@@ -2785,7 +2610,7 @@ domutils@^1.5.1:
dom-serializer "0"
domelementtype "1"
-domutils@^2.5.2, domutils@^2.6.0:
+domutils@^2.5.2:
version "2.8.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"
integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==
@@ -2799,6 +2624,13 @@ dotenv@^8.2.0:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
+duplexer2@~0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
+ integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=
+ dependencies:
+ readable-stream "^2.0.2"
+
ecc-jsbn@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
@@ -2834,21 +2666,6 @@ electron-to-chromium@^1.3.649:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.672.tgz#3a6e335016dab4bc584d5292adc4f98f54541f6a"
integrity sha512-gFQe7HBb0lbOMqK2GAS5/1F+B0IMdYiAgB9OT/w1F4M7lgJK2aNOMNOM622aEax+nS1cTMytkiT0uMOkbtFmHw==
-electron-to-chromium@^1.3.712:
- version "1.3.717"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz#78d4c857070755fb58ab64bcc173db1d51cbc25f"
- integrity sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ==
-
-electron-to-chromium@^1.3.723:
- version "1.3.742"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.742.tgz#7223215acbbd3a5284962ebcb6df85d88b95f200"
- integrity sha512-ihL14knI9FikJmH2XUIDdZFWJxvr14rPSdOhJ7PpS27xbz8qmaRwCwyg/bmFwjWKmWK9QyamiCZVCvXm5CH//Q==
-
-emoji-regex@^7.0.1:
- version "7.0.3"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
- integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
-
emoji-regex@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
@@ -2859,6 +2676,11 @@ emojis-list@^3.0.0:
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78"
integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==
+encode-utf8@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda"
+ integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==
+
encodeurl@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
@@ -2894,13 +2716,6 @@ enhanced-resolve@^5.7.0:
graceful-fs "^4.2.4"
tapable "^2.2.0"
-enquirer@^2.3.5:
- version "2.3.6"
- resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
- integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
- dependencies:
- ansi-colors "^4.1.1"
-
entities@^1.1.1, entities@~1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
@@ -2921,23 +2736,6 @@ err-code@^2.0.2:
resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==
-es-abstract@^1.17.0-next.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5:
- version "1.17.5"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9"
- integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==
- dependencies:
- es-to-primitive "^1.2.1"
- function-bind "^1.1.1"
- has "^1.0.3"
- has-symbols "^1.0.1"
- is-callable "^1.1.5"
- is-regex "^1.0.5"
- object-inspect "^1.7.0"
- object-keys "^1.1.1"
- object.assign "^4.1.0"
- string.prototype.trimleft "^2.1.1"
- string.prototype.trimright "^2.1.1"
-
es-abstract@^1.19.0, es-abstract@^1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3"
@@ -3049,43 +2847,32 @@ eslint-import-resolver-node@^0.3.6:
debug "^3.2.7"
resolve "^1.20.0"
-eslint-module-utils@^2.7.1:
- version "2.7.1"
- resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz#b435001c9f8dd4ab7f6d0efcae4b9696d4c24b7c"
- integrity sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==
+eslint-module-utils@^2.7.2:
+ version "2.7.2"
+ resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz#1d0aa455dcf41052339b63cada8ab5fd57577129"
+ integrity sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==
dependencies:
debug "^3.2.7"
find-up "^2.1.0"
- pkg-dir "^2.0.0"
-eslint-plugin-import@2.25.3:
- version "2.25.3"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz#a554b5f66e08fb4f6dc99221866e57cfff824766"
- integrity sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==
+eslint-plugin-import@2.25.4:
+ version "2.25.4"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1"
+ integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==
dependencies:
array-includes "^3.1.4"
array.prototype.flat "^1.2.5"
debug "^2.6.9"
doctrine "^2.1.0"
eslint-import-resolver-node "^0.3.6"
- eslint-module-utils "^2.7.1"
+ eslint-module-utils "^2.7.2"
has "^1.0.3"
is-core-module "^2.8.0"
is-glob "^4.0.3"
minimatch "^3.0.4"
object.values "^1.1.5"
resolve "^1.20.0"
- tsconfig-paths "^3.11.0"
-
-eslint-plugin-vue@8.0.3:
- version "8.0.3"
- resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-8.0.3.tgz#791cc4543940319e612ea61a1d779e8c87cf749a"
- integrity sha512-Rlhhy5ltzde0sRwSkqHuNePTXLMMaJ5+qsQubM4RYloYsQ8cXlnJT5MDaCzSirkGADipOHtmQXIbbPFAzUrADg==
- dependencies:
- eslint-utils "^3.0.0"
- natural-compare "^1.4.0"
- semver "^7.3.5"
- vue-eslint-parser "^8.0.1"
+ tsconfig-paths "^3.12.0"
eslint-scope@^5.1.1:
version "5.1.1"
@@ -3095,10 +2882,10 @@ eslint-scope@^5.1.1:
esrecurse "^4.3.0"
estraverse "^4.1.1"
-eslint-scope@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-6.0.0.tgz#9cf45b13c5ac8f3d4c50f46a5121f61b3e318978"
- integrity sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==
+eslint-scope@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.0.tgz#c1f6ea30ac583031f203d65c73e723b01298f153"
+ integrity sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==
dependencies:
esrecurse "^4.3.0"
estraverse "^5.2.0"
@@ -3120,24 +2907,28 @@ eslint-visitor-keys@^3.0.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186"
integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==
-eslint@8.2.0:
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.2.0.tgz#44d3fb506d0f866a506d97a0fc0e90ee6d06a815"
- integrity sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==
+eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz#6fbb166a6798ee5991358bc2daa1ba76cc1254a1"
+ integrity sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==
+
+eslint@8.7.0:
+ version "8.7.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.7.0.tgz#22e036842ee5b7cf87b03fe237731675b4d3633c"
+ integrity sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==
dependencies:
- "@eslint/eslintrc" "^1.0.4"
- "@humanwhocodes/config-array" "^0.6.0"
+ "@eslint/eslintrc" "^1.0.5"
+ "@humanwhocodes/config-array" "^0.9.2"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
debug "^4.3.2"
doctrine "^3.0.0"
- enquirer "^2.3.5"
escape-string-regexp "^4.0.0"
- eslint-scope "^6.0.0"
+ eslint-scope "^7.1.0"
eslint-utils "^3.0.0"
- eslint-visitor-keys "^3.0.0"
- espree "^9.0.0"
+ eslint-visitor-keys "^3.2.0"
+ espree "^9.3.0"
esquery "^1.4.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
@@ -3145,7 +2936,7 @@ eslint@8.2.0:
functional-red-black-tree "^1.0.1"
glob-parent "^6.0.1"
globals "^13.6.0"
- ignore "^4.0.6"
+ ignore "^5.2.0"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
@@ -3156,9 +2947,7 @@ eslint@8.2.0:
minimatch "^3.0.4"
natural-compare "^1.4.0"
optionator "^0.9.1"
- progress "^2.0.0"
regexpp "^3.2.0"
- semver "^7.2.1"
strip-ansi "^6.0.1"
strip-json-comments "^3.1.0"
text-table "^0.2.0"
@@ -3169,16 +2958,16 @@ esm@^3.2.22:
resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
-espree@^9.0.0:
- version "9.0.0"
- resolved "https://registry.yarnpkg.com/espree/-/espree-9.0.0.tgz#e90a2965698228502e771c7a58489b1a9d107090"
- integrity sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==
+espree@^9.2.0, espree@^9.3.0:
+ version "9.3.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.0.tgz#c1240d79183b72aaee6ccfa5a90bc9111df085a8"
+ integrity sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==
dependencies:
- acorn "^8.5.0"
+ acorn "^8.7.0"
acorn-jsx "^5.3.1"
- eslint-visitor-keys "^3.0.0"
+ eslint-visitor-keys "^3.1.0"
-esprima@^4.0.0, esprima@^4.0.1:
+esprima@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
@@ -3222,7 +3011,7 @@ event-target-shim@^5.0.0:
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
-eventemitter3@4.0.7, eventemitter3@^4.0.7:
+eventemitter3@4.0.7, eventemitter3@^4.0.4, eventemitter3@^4.0.7:
version "4.0.7"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
@@ -3315,7 +3104,7 @@ fast-glob@^3.1.1:
micromatch "^4.0.2"
picomatch "^2.2.1"
-fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0:
+fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
@@ -3349,6 +3138,14 @@ fetch-blob@^2.1.1:
resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-2.1.2.tgz#a7805db1361bd44c1ef62bb57fb5fe8ea173ef3c"
integrity sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow==
+fetch-blob@^3.1.2, fetch-blob@^3.1.4:
+ version "3.1.4"
+ resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.1.4.tgz#e8c6567f80ad7fc22fd302e7dcb72bafde9c1717"
+ integrity sha512-Eq5Xv5+VlSrYWEqKrusxY1C3Hm/hjeAsCGVG3ft7pZahlUAChpGZT/Ms1WmSLnEAisEXszjzu/s+ce6HZB2VHA==
+ dependencies:
+ node-domexception "^1.0.0"
+ web-streams-polyfill "^3.0.3"
+
file-entry-cache@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
@@ -3395,12 +3192,13 @@ find-up@^2.1.0:
dependencies:
locate-path "^2.0.0"
-find-up@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
- integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
+find-up@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
+ integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
dependencies:
- locate-path "^3.0.0"
+ locate-path "^5.0.0"
+ path-exists "^4.0.0"
findup-sync@^4.0.0:
version "4.0.0"
@@ -3438,12 +3236,10 @@ fluent-ffmpeg@2.1.2:
async ">=0.2.9"
which "^1.1.1"
-follow-redirects@1.5.10:
- version "1.5.10"
- resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
- integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
- dependencies:
- debug "=3.1.0"
+follow-redirects@^1.14.4:
+ version "1.14.7"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
+ integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
form-data@^3.0.0:
version "3.0.0"
@@ -3454,6 +3250,13 @@ form-data@^3.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"
+formdata-polyfill@^4.0.10:
+ version "4.0.10"
+ resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"
+ integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==
+ dependencies:
+ fetch-blob "^3.1.2"
+
fresh@~0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
@@ -3490,6 +3293,16 @@ fsevents@~2.1.2:
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
+fstream@^1.0.12:
+ version "1.0.12"
+ resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045"
+ integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==
+ dependencies:
+ graceful-fs "^4.1.2"
+ inherits "~2.0.0"
+ mkdirp ">=0.5 0"
+ rimraf "2"
+
function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
@@ -3500,6 +3313,21 @@ functional-red-black-tree@^1.0.1:
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
+gauge@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.0.tgz#afba07aa0374a93c6219603b1fb83eaa2264d8f8"
+ integrity sha512-F8sU45yQpjQjxKkm1UOAhf0U/O0aFt//Fl7hsrNVto+patMHjs7dPI9mFOGUKbhrgKm0S3EjW3scMFuQmWSROw==
+ dependencies:
+ ansi-regex "^5.0.1"
+ aproba "^1.0.3 || ^2.0.0"
+ color-support "^1.1.2"
+ console-control-strings "^1.0.0"
+ has-unicode "^2.0.1"
+ signal-exit "^3.0.0"
+ string-width "^4.2.3"
+ strip-ansi "^6.0.1"
+ wide-align "^1.1.2"
+
gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
@@ -3514,6 +3342,11 @@ gauge@~2.7.3:
strip-ansi "^3.0.1"
wide-align "^1.1.0"
+generic-pool@3.8.2:
+ version "3.8.2"
+ resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-3.8.2.tgz#aab4f280adb522fdfbdc5e5b64d718d3683f04e9"
+ integrity sha512-nGToKy6p3PAbYQ7p1UlWl6vSPwfwU6TMSWK7TTu+WUY4ZjyZQGniGGt2oNVvyNSpyZYSB43zMXVLcBm08MTMkg==
+
get-caller-file@^2.0.1, get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
@@ -3700,7 +3533,7 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.4:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
-graceful-fs@^4.2.0:
+graceful-fs@^4.2.0, graceful-fs@^4.2.2:
version "4.2.8"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a"
integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==
@@ -3715,11 +3548,6 @@ growl@1.10.5:
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==
-hammerjs@^2.0.8:
- version "2.0.8"
- resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1"
- integrity sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=
-
has-bigints@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113"
@@ -3735,7 +3563,7 @@ has-flag@^4.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
-has-symbols@^1.0.0, has-symbols@^1.0.1:
+has-symbols@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
@@ -3752,7 +3580,7 @@ has-tostringtag@^1.0.0:
dependencies:
has-symbols "^1.0.2"
-has-unicode@^2.0.0:
+has-unicode@^2.0.0, has-unicode@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
@@ -3875,13 +3703,13 @@ http-proxy-agent@^4.0.1:
agent-base "6"
debug "4"
-http-signature@1.3.5:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.5.tgz#9f19496ffbf3227298d7b5f156e0e1a948678683"
- integrity sha512-NwoTQYSJoFt34jSBbwzDHDofoA61NGXzu6wXh95o1Ry62EnmKjXb/nR/RknLeZ3G/uGwrlKNY2z7uPt+Cdl7Tw==
+http-signature@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.6.tgz#cb6fbfdf86d1c974f343be94e87f7fc128662cf9"
+ integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==
dependencies:
assert-plus "^1.0.0"
- jsprim "^1.2.2"
+ jsprim "^2.0.2"
sshpk "^1.14.1"
http2-wrapper@^1.0.0-beta.5.0:
@@ -3946,18 +3774,6 @@ iconv-lite@^0.6.2:
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
-icss-utils@^5.0.0, icss-utils@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae"
- integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==
-
-idb-keyval@5.1.3:
- version "5.1.3"
- resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-5.1.3.tgz#6ef5dff371897c23f144322dc6374eadd6a345d9"
- integrity sha512-N9HbCK/FaXSRVI+k6Xq4QgWxbcZRUv+SfG1y7HJ28JdV8yEJu6k+C/YLea7npGckX2DQJeEVuMc4bKOBeU/2LQ==
- dependencies:
- safari-14-idb-fix "^1.0.4"
-
ieee754@1.1.13, ieee754@^1.1.4:
version "1.1.13"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
@@ -3983,6 +3799,11 @@ ignore@^5.1.8:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.9.tgz#9ec1a5cbe8e1446ec60d4420060d43aa6e7382fb"
integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==
+ignore@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
+ integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
+
import-fresh@^3.0.0, import-fresh@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
@@ -4001,11 +3822,6 @@ indent-string@^4.0.0:
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
-indexes-of@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
- integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc=
-
infer-owner@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467"
@@ -4024,7 +3840,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3:
+inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@@ -4039,15 +3855,10 @@ ini@^1.3.4, ini@~1.3.0:
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84"
integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==
-insert-text-at-cursor@0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/insert-text-at-cursor/-/insert-text-at-cursor-0.3.0.tgz#1819607680ec1570618347c4cd475e791faa25da"
- integrity sha512-/nPtyeX9xPUvxZf+r0518B7uqNKlP+LqNJqSiXFEaa2T71rWIwTVXGH7hB9xO/EVdwa5/pWlFCPwShOW81XIxQ==
-
-install-artifact-from-github@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/install-artifact-from-github/-/install-artifact-from-github-1.2.0.tgz#adcbd123c16a4337ec44ea76d0ebf253cc16b074"
- integrity sha512-3OxCPcY55XlVM3kkfIpeCgmoSKnMsz2A3Dbhsq0RXpIknKQmrX1YiznCeW9cD2ItFmDxziA3w6Eg8d80AoL3oA==
+install-artifact-from-github@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/install-artifact-from-github/-/install-artifact-from-github-1.3.0.tgz#cab6ff821976b8a35b0c079da19a727c90381a40"
+ integrity sha512-iT8v1GwOAX0pPXifF/5ihnMhHOCo3OeK7z3TQa4CtSNCIg8k0UxqBEk9jRwz8OP68hHXvJ2gxRa89KYHtBkqGA==
internal-slot@^1.0.3:
version "1.0.3"
@@ -4105,11 +3916,6 @@ ipaddr.js@^2.0.1:
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0"
integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==
-is-absolute-url@^3.0.3:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698"
- integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==
-
is-arrayish@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
@@ -4142,7 +3948,7 @@ is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-is-callable@^1.1.4, is-callable@^1.1.5:
+is-callable@^1.1.4:
version "1.1.5"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab"
integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==
@@ -4288,7 +4094,7 @@ is-promise@^2.0.0:
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1"
integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==
-is-regex@^1.0.3, is-regex@^1.0.5:
+is-regex@^1.0.3:
version "1.0.5"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae"
integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==
@@ -4303,11 +4109,6 @@ is-regex@^1.1.4:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
-is-resolvable@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
- integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==
-
is-shared-array-buffer@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6"
@@ -4325,10 +4126,10 @@ is-string@^1.0.5, is-string@^1.0.7:
dependencies:
has-tostringtag "^1.0.0"
-is-svg@4.3.1:
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.3.1.tgz#8c63ec8c67c8c7f0a8de0a71c8c7d58eccf4406b"
- integrity sha512-h2CGs+yPUyvkgTJQS9cJzo9lYK06WgRiXUqBBHtglSzVKAuH4/oWsqk7LGfbSa1hGk9QcZ0SyQtVggvBA8LZXA==
+is-svg@4.3.2:
+ version "4.3.2"
+ resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.3.2.tgz#a119e9932e1af53f6be1969d1790d6cc5fd947d3"
+ integrity sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw==
dependencies:
fast-xml-parser "^3.19.0"
@@ -4378,11 +4179,6 @@ isarray@^1.0.0, isarray@~1.0.0:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
-isarray@^2.0.1:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
- integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==
-
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@@ -4397,10 +4193,10 @@ jest-worker@^26.6.2:
merge-stream "^2.0.0"
supports-color "^7.0.0"
-jmespath@0.15.0:
- version "0.15.0"
- resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217"
- integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=
+jmespath@0.16.0:
+ version "0.16.0"
+ resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076"
+ integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==
jpeg-js@^0.4.1:
version "0.4.1"
@@ -4442,14 +4238,6 @@ js-yaml@4.1.0, js-yaml@^4.0.0, js-yaml@^4.1.0:
dependencies:
argparse "^2.0.1"
-js-yaml@^3.14.1:
- version "3.14.1"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
- integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
- dependencies:
- argparse "^1.0.7"
- esprima "^4.0.0"
-
jsbn@1.1.0, jsbn@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040"
@@ -4518,10 +4306,10 @@ json-schema-traverse@^1.0.0:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
-json-schema@0.2.3:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
- integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
+json-schema@0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5"
+ integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
@@ -4542,7 +4330,7 @@ json5-loader@4.0.1:
loader-utils "^2.0.0"
schema-utils "^3.0.0"
-json5@2.2.0, json5@2.x:
+json5@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
@@ -4589,14 +4377,14 @@ jsonld@5.2.0:
lru-cache "^6.0.0"
rdf-canonize "^3.0.0"
-jsprim@^1.2.2:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
- integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
+jsprim@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-2.0.2.tgz#77ca23dbcd4135cd364800d22ff82c2185803d4d"
+ integrity sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==
dependencies:
assert-plus "1.0.0"
extsprintf "1.3.0"
- json-schema "0.2.3"
+ json-schema "0.4.0"
verror "1.10.0"
jsrsasign@8.0.20:
@@ -4817,10 +4605,10 @@ levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
-lilconfig@^2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.3.tgz#68f3005e921dafbd2a2afb48379986aa6d2579fd"
- integrity sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg==
+listenercount@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937"
+ integrity sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=
loader-runner@^4.2.0:
version "4.2.0"
@@ -4844,13 +4632,12 @@ locate-path@^2.0.0:
p-locate "^2.0.0"
path-exists "^3.0.0"
-locate-path@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
- integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
+locate-path@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
+ integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
dependencies:
- p-locate "^3.0.0"
- path-exists "^3.0.0"
+ p-locate "^4.1.0"
locate-path@^6.0.0:
version "6.0.0"
@@ -4919,11 +4706,6 @@ lodash.map@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
-lodash.memoize@4.x, lodash.memoize@^4.1.2:
- version "4.1.2"
- resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
- integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
-
lodash.merge@^4.4.0, lodash.merge@^4.6.2:
version "4.6.2"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
@@ -4959,12 +4741,7 @@ lodash.union@^4.6.0:
resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88"
integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=
-lodash.uniq@^4.5.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
- integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
-
-lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0:
+lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -5001,18 +4778,18 @@ mailcheck@^1.1.1:
resolved "https://registry.yarnpkg.com/mailcheck/-/mailcheck-1.1.1.tgz#d87cf6ba0b64ba512199dbf93f1489f479591e34"
integrity sha1-2Hz2ugtkulEhmdv5PxSJ9HlZHjQ=
-make-error@1.x, make-error@^1.1.1:
+make-error@^1.1.1:
version "1.3.6"
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
-make-fetch-happen@^8.0.14:
- version "8.0.14"
- resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222"
- integrity sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ==
+make-fetch-happen@^9.1.0:
+ version "9.1.0"
+ resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968"
+ integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==
dependencies:
agentkeepalive "^4.1.3"
- cacache "^15.0.5"
+ cacache "^15.2.0"
http-cache-semantics "^4.1.0"
http-proxy-agent "^4.0.1"
https-proxy-agent "^5.0.0"
@@ -5023,15 +4800,11 @@ make-fetch-happen@^8.0.14:
minipass-fetch "^1.3.2"
minipass-flush "^1.0.5"
minipass-pipeline "^1.2.4"
+ negotiator "^0.6.2"
promise-retry "^2.0.1"
- socks-proxy-agent "^5.0.0"
+ socks-proxy-agent "^6.0.0"
ssri "^8.0.0"
-mdn-data@2.0.14:
- version "2.0.14"
- resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"
- integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==
-
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -5057,21 +4830,13 @@ methods@^1.1.2:
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
-mfm-js@0.20.0:
- version "0.20.0"
- resolved "https://registry.yarnpkg.com/mfm-js/-/mfm-js-0.20.0.tgz#3afdcd7959461fd825aa8af9b9e8a57cdbddc290"
- integrity sha512-1+3tV3nWUKQNh/ztX3wXu5iLBtdsg6q3wUhl+XyOhc2H3sQdG+sih/w2c0nR9TIawjN+Z1/pvgGzxMJHfmKQmA==
+mfm-js@0.21.0:
+ version "0.21.0"
+ resolved "https://registry.yarnpkg.com/mfm-js/-/mfm-js-0.21.0.tgz#954cc6e7071700b0b1872c78a90bada10be7f772"
+ integrity sha512-nyQXaipa7rmAw9ER9uYigMvGcdCwhSv93abZBwccnSnPOc1W3S/WW0+sN28g3YSmlHDCA0i2q9aAFc9EgOi5KA==
dependencies:
twemoji-parser "13.1.x"
-micromatch@4.x:
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
- integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
- dependencies:
- braces "^3.0.1"
- picomatch "^2.2.3"
-
micromatch@^4.0.0, micromatch@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
@@ -5119,11 +4884,6 @@ mimic-response@^1.0.0:
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
-mimic-response@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43"
- integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==
-
mimic-response@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9"
@@ -5207,10 +4967,10 @@ minizlib@^2.0.0, minizlib@^2.1.1:
minipass "^3.0.0"
yallist "^4.0.0"
-misskey-js@0.0.8:
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/misskey-js/-/misskey-js-0.0.8.tgz#b47a1ec54bff96b23cc2a6b307a3895f99a94424"
- integrity sha512-Q1L6FaroVz8kpW7T4xQyJmJKSwjOYPbNY3TspOUWmbIBDf2JP0HVeKEFLI9dvdSL0kSkdQNz3MSVLjlHiyPqLQ==
+misskey-js@0.0.13:
+ version "0.0.13"
+ resolved "https://registry.yarnpkg.com/misskey-js/-/misskey-js-0.0.13.tgz#03a4e469186e28752d599dc4093519eb64647970"
+ integrity sha512-kBdJdfe281gtykzzsrN3IAxWUQIimzPiJGyKWf863ggWJlWYVPmP9hTFlX2z8oPOaypgVBPEPHyw/jNUdc2DbQ==
dependencies:
autobind-decorator "^2.4.0"
eventemitter3 "^4.0.7"
@@ -5226,7 +4986,7 @@ mkdirp-classic@^0.5.3:
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
-mkdirp@0.x, mkdirp@^0.5.4:
+"mkdirp@>=0.5 0", mkdirp@^0.5.4:
version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
@@ -5301,10 +5061,10 @@ ms@3.0.0-canary.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-3.0.0-canary.1.tgz#c7b34fbce381492fd0b345d1cf56e14d67b77b80"
integrity sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g==
-multer@1.4.3:
- version "1.4.3"
- resolved "https://registry.yarnpkg.com/multer/-/multer-1.4.3.tgz#4db352d6992e028ac0eacf7be45c6efd0264297b"
- integrity sha512-np0YLKncuZoTzufbkM6wEKp68EhWJXcU6fq6QqrSwkckd2LlMgd1UqhUJLj6NS/5sZ8dE8LYDWslsltJznnXlg==
+multer@1.4.4:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/multer/-/multer-1.4.4.tgz#e2bc6cac0df57a8832b858d7418ccaa8ebaf7d8c"
+ integrity sha512-2wY2+xD4udX612aMqMcB8Ws2Voq6NIUPEtD1be6m411T4uDH/VtL9i//xvcyFlTVfRdaBsk7hV5tgrGQqhuBiw==
dependencies:
append-field "^1.0.0"
busboy "^0.2.11"
@@ -5329,10 +5089,10 @@ mz@^2.4.0, mz@^2.7.0:
object-assign "^4.0.1"
thenify-all "^1.0.0"
-nan@^2.14.2:
- version "2.14.2"
- resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
- integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
+nan@^2.15.0:
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee"
+ integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==
nano-time@1.0.0:
version "1.0.0"
@@ -5346,11 +5106,6 @@ nanoid@3.1.20:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==
-nanoid@^3.1.23:
- version "3.1.23"
- resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81"
- integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==
-
nanoid@^3.1.30:
version "3.1.30"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362"
@@ -5375,7 +5130,7 @@ needle@^2.5.2:
iconv-lite "^0.4.4"
sax "^1.2.4"
-negotiator@0.6.2:
+negotiator@0.6.2, negotiator@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
@@ -5405,18 +5160,32 @@ next-tick@~1.0.0:
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
integrity sha1-yobR/ogoFpsBICCOPchCS524NCw=
-node-abi@^2.21.0:
- version "2.21.0"
- resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.21.0.tgz#c2dc9ebad6f4f53d6ea9b531e7b8faad81041d48"
- integrity sha512-smhrivuPqEM3H5LmnY3KU6HfYv0u4QklgAxfFyRNujKUzbUcYZ+Jc2EhukB9SRcD2VpqhxM7n/MIcp1Ua1/JMg==
+node-abi@^3.3.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.5.0.tgz#26e8b7b251c3260a5ac5ba5aef3b4345a0229248"
+ integrity sha512-LtHvNIBgOy5mO8mPEUtkCW/YCRWYEKshIvqhe1GHHyXEHEB5mgICyYnAcl4qan3uFeRROErKGzatFHPf6kDxWw==
dependencies:
- semver "^5.4.1"
+ semver "^7.3.5"
node-addon-api@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.2.0.tgz#117cbb5a959dff0992e1c586ae0393573e4d2a87"
integrity sha512-eazsqzwG2lskuzBqCGPi7Ac2UgOoMz8JVOXVhTvvPDYhthvNpefx8jWD8Np7Gv+2Sz0FlPWZk0nJV0z598Wn8Q==
+node-domexception@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
+ integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
+
+node-fetch@*:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.0.tgz#59390db4e489184fa35d4b74caf5510e8dfbaf3b"
+ integrity sha512-8xeimMwMItMw8hRrOl3C9/xzU49HV/yE6ORew/l+dxWimO5A4Ra8ld2rerlJvc/O7et5Z1zrWsPX43v1QBjCxw==
+ dependencies:
+ data-uri-to-buffer "^4.0.0"
+ fetch-blob "^3.1.4"
+ formdata-polyfill "^4.0.10"
+
node-fetch@2.6.1, node-fetch@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
@@ -5435,31 +5204,31 @@ node-gyp-build@~3.7.0:
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.7.0.tgz#daa77a4f547b9aed3e2aac779eaf151afd60ec8d"
integrity sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==
-node-gyp@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.0.0.tgz#225af2b06b8419ae81f924bf25ae4c167f6378a5"
- integrity sha512-Jod6NxyWtcwrpAQe0O/aXOpC5QfncotgtG73dg65z6VW/C6g/G4jiajXQUBIJ8pk/VfM6mBYE9BN/HvudTunUQ==
+node-gyp@^8.4.1:
+ version "8.4.1"
+ resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937"
+ integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==
dependencies:
env-paths "^2.2.0"
glob "^7.1.4"
graceful-fs "^4.2.6"
- make-fetch-happen "^8.0.14"
+ make-fetch-happen "^9.1.0"
nopt "^5.0.0"
- npmlog "^4.1.2"
+ npmlog "^6.0.0"
rimraf "^3.0.2"
semver "^7.3.5"
- tar "^6.1.0"
+ tar "^6.1.2"
which "^2.0.2"
-node-releases@^1.1.70, node-releases@^1.1.71:
+node-releases@^1.1.70:
version "1.1.71"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb"
integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==
-nodemailer@6.7.0:
- version "6.7.0"
- resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.7.0.tgz#86614722c4e0c33d1b5b02aecb90d6d629932b0d"
- integrity sha512-AtiTVUFHLiiDnMQ43zi0YgkzHOEWUkhDgPlBXrsDzJiJvB29Alo4OKxHQ0ugF3gRqRQIneCLtZU3yiUo7pItZw==
+nodemailer@6.7.2:
+ version "6.7.2"
+ resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.7.2.tgz#44b2ad5f7ed71b7067f7a21c4fedabaec62b85e0"
+ integrity sha512-Dz7zVwlef4k5R71fdmxwR8Q39fiboGbu3xgswkzGwczUfjp873rVxt1O46+Fh0j1ORnAC6L9+heI8uUpO6DT7Q==
nofilter@^2.0.3:
version "2.0.3"
@@ -5498,11 +5267,6 @@ normalize-url@^4.1.0:
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
-normalize-url@^6.0.1:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a"
- integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==
-
npm-run-path@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.0.1.tgz#748dd68ed7de377bb1f7132c7dafe657be5ab400"
@@ -5510,7 +5274,7 @@ npm-run-path@^5.0.1:
dependencies:
path-key "^4.0.0"
-npmlog@^4.0.1, npmlog@^4.1.2:
+npmlog@^4.0.1:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
@@ -5520,12 +5284,15 @@ npmlog@^4.0.1, npmlog@^4.1.2:
gauge "~2.7.3"
set-blocking "~2.0.0"
-nth-check@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125"
- integrity sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==
+npmlog@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.0.tgz#ba9ef39413c3d936ea91553db7be49c34ad0520c"
+ integrity sha512-03ppFRGlsyUaQFbGC2C8QWJN/C/K7PsfyD9aQdhVKAQIH4sQBc8WASqFBP7O+Ut4d2oo5LoeoboB3cGdBZSp6Q==
dependencies:
- boolbase "^1.0.0"
+ are-we-there-yet "^2.0.0"
+ console-control-strings "^1.1.0"
+ gauge "^4.0.0"
+ set-blocking "^2.0.0"
nth-check@~1.0.1:
version "1.0.2"
@@ -5559,26 +5326,11 @@ object-inspect@^1.11.0, object-inspect@^1.9.0:
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1"
integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==
-object-inspect@^1.7.0:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67"
- integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==
-
-object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1:
+object-keys@^1.0.12, object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
-object.assign@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
- integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
- dependencies:
- define-properties "^1.1.2"
- function-bind "^1.1.1"
- has-symbols "^1.0.0"
- object-keys "^1.0.11"
-
object.assign@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940"
@@ -5589,14 +5341,6 @@ object.assign@^4.1.2:
has-symbols "^1.0.1"
object-keys "^1.1.1"
-object.getownpropertydescriptors@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649"
- integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.0-next.1"
-
object.values@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac"
@@ -5706,7 +5450,7 @@ p-limit@^1.1.0:
dependencies:
p-try "^1.0.0"
-p-limit@^2.0.0:
+p-limit@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
@@ -5734,12 +5478,12 @@ p-locate@^2.0.0:
dependencies:
p-limit "^1.1.0"
-p-locate@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
- integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
+p-locate@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
+ integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
dependencies:
- p-limit "^2.0.0"
+ p-limit "^2.2.0"
p-locate@^5.0.0:
version "5.0.0"
@@ -5760,6 +5504,14 @@ p-map@^4.0.0:
dependencies:
aggregate-error "^3.0.0"
+p-queue@6.6.2:
+ version "6.6.2"
+ resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426"
+ integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==
+ dependencies:
+ eventemitter3 "^4.0.4"
+ p-timeout "^3.2.0"
+
p-timeout@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
@@ -5932,28 +5684,26 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
-picomatch@^2.2.3:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
- integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
-
pify@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
-pkg-dir@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
- integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=
- dependencies:
- find-up "^2.1.0"
+pluralize@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
+ integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==
-pngjs@^3.3.0, pngjs@^3.3.1:
+pngjs@^3.3.1:
version "3.4.0"
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f"
integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==
+pngjs@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb"
+ integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==
+
portscanner@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-2.2.0.tgz#6059189b3efa0965c9d96a56b958eb9508411cf1"
@@ -5962,274 +5712,6 @@ portscanner@2.2.0:
async "^2.6.0"
is-number-like "^1.0.3"
-postcss-calc@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.0.0.tgz#a05b87aacd132740a5db09462a3612453e5df90a"
- integrity sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g==
- dependencies:
- postcss-selector-parser "^6.0.2"
- postcss-value-parser "^4.0.2"
-
-postcss-colormin@^5.2.1:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.2.1.tgz#6e444a806fd3c578827dbad022762df19334414d"
- integrity sha512-VVwMrEYLcHYePUYV99Ymuoi7WhKrMGy/V9/kTS0DkCoJYmmjdOMneyhzYUxcNgteKDVbrewOkSM7Wje/MFwxzA==
- dependencies:
- browserslist "^4.16.6"
- caniuse-api "^3.0.0"
- colord "^2.9.1"
- postcss-value-parser "^4.1.0"
-
-postcss-convert-values@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.0.2.tgz#879b849dc3677c7d6bc94b6a2c1a3f0808798059"
- integrity sha512-KQ04E2yadmfa1LqXm7UIDwW1ftxU/QWZmz6NKnHnUvJ3LEYbbcX6i329f/ig+WnEByHegulocXrECaZGLpL8Zg==
- dependencies:
- postcss-value-parser "^4.1.0"
-
-postcss-discard-comments@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz#9eae4b747cf760d31f2447c27f0619d5718901fe"
- integrity sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==
-
-postcss-discard-duplicates@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz#68f7cc6458fe6bab2e46c9f55ae52869f680e66d"
- integrity sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==
-
-postcss-discard-empty@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz#ee136c39e27d5d2ed4da0ee5ed02bc8a9f8bf6d8"
- integrity sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==
-
-postcss-discard-overridden@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz#454b41f707300b98109a75005ca4ab0ff2743ac6"
- integrity sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==
-
-postcss-merge-longhand@^5.0.3:
- version "5.0.3"
- resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.0.3.tgz#42194a5ffbaa5513edbf606ef79c44958564658b"
- integrity sha512-kmB+1TjMTj/bPw6MCDUiqSA5e/x4fvLffiAdthra3a0m2/IjTrWsTmD3FdSskzUjEwkj5ZHBDEbv5dOcqD7CMQ==
- dependencies:
- css-color-names "^1.0.1"
- postcss-value-parser "^4.1.0"
- stylehacks "^5.0.1"
-
-postcss-merge-rules@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz#d6e4d65018badbdb7dcc789c4f39b941305d410a"
- integrity sha512-5K+Md7S3GwBewfB4rjDeol6V/RZ8S+v4B66Zk2gChRqLTCC8yjnHQ601omj9TKftS19OPGqZ/XzoqpzNQQLwbg==
- dependencies:
- browserslist "^4.16.6"
- caniuse-api "^3.0.0"
- cssnano-utils "^2.0.1"
- postcss-selector-parser "^6.0.5"
- vendors "^1.0.3"
-
-postcss-minify-font-values@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz#a90cefbfdaa075bd3dbaa1b33588bb4dc268addf"
- integrity sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA==
- dependencies:
- postcss-value-parser "^4.1.0"
-
-postcss-minify-gradients@^5.0.3:
- version "5.0.3"
- resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.3.tgz#f970a11cc71e08e9095e78ec3a6b34b91c19550e"
- integrity sha512-Z91Ol22nB6XJW+5oe31+YxRsYooxOdFKcbOqY/V8Fxse1Y3vqlNRpi1cxCqoACZTQEhl+xvt4hsbWiV5R+XI9Q==
- dependencies:
- colord "^2.9.1"
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
-
-postcss-minify-params@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz#371153ba164b9d8562842fdcd929c98abd9e5b6c"
- integrity sha512-4RUC4k2A/Q9mGco1Z8ODc7h+A0z7L7X2ypO1B6V8057eVK6mZ6xwz6QN64nHuHLbqbclkX1wyzRnIrdZehTEHw==
- dependencies:
- alphanum-sort "^1.0.2"
- browserslist "^4.16.0"
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
- uniqs "^2.0.0"
-
-postcss-minify-selectors@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz#4385c845d3979ff160291774523ffa54eafd5a54"
- integrity sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og==
- dependencies:
- alphanum-sort "^1.0.2"
- postcss-selector-parser "^6.0.5"
-
-postcss-modules-extract-imports@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d"
- integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==
-
-postcss-modules-local-by-default@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c"
- integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==
- dependencies:
- icss-utils "^5.0.0"
- postcss-selector-parser "^6.0.2"
- postcss-value-parser "^4.1.0"
-
-postcss-modules-scope@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06"
- integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==
- dependencies:
- postcss-selector-parser "^6.0.4"
-
-postcss-modules-values@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c"
- integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==
- dependencies:
- icss-utils "^5.0.0"
-
-postcss-normalize-charset@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz#121559d1bebc55ac8d24af37f67bd4da9efd91d0"
- integrity sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==
-
-postcss-normalize-display-values@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz#62650b965981a955dffee83363453db82f6ad1fd"
- integrity sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ==
- dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
-
-postcss-normalize-positions@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz#868f6af1795fdfa86fbbe960dceb47e5f9492fe5"
- integrity sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg==
- dependencies:
- postcss-value-parser "^4.1.0"
-
-postcss-normalize-repeat-style@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz#cbc0de1383b57f5bb61ddd6a84653b5e8665b2b5"
- integrity sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w==
- dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
-
-postcss-normalize-string@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz#d9eafaa4df78c7a3b973ae346ef0e47c554985b0"
- integrity sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA==
- dependencies:
- postcss-value-parser "^4.1.0"
-
-postcss-normalize-timing-functions@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz#8ee41103b9130429c6cbba736932b75c5e2cb08c"
- integrity sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q==
- dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
-
-postcss-normalize-unicode@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz#82d672d648a411814aa5bf3ae565379ccd9f5e37"
- integrity sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA==
- dependencies:
- browserslist "^4.16.0"
- postcss-value-parser "^4.1.0"
-
-postcss-normalize-url@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz#ddcdfb7cede1270740cf3e4dfc6008bd96abc763"
- integrity sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ==
- dependencies:
- is-absolute-url "^3.0.3"
- normalize-url "^6.0.1"
- postcss-value-parser "^4.1.0"
-
-postcss-normalize-whitespace@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz#b0b40b5bcac83585ff07ead2daf2dcfbeeef8e9a"
- integrity sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA==
- dependencies:
- postcss-value-parser "^4.1.0"
-
-postcss-ordered-values@^5.0.2:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz#1f351426977be00e0f765b3164ad753dac8ed044"
- integrity sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ==
- dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
-
-postcss-reduce-initial@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz#9d6369865b0f6f6f6b165a0ef5dc1a4856c7e946"
- integrity sha512-zlCZPKLLTMAqA3ZWH57HlbCjkD55LX9dsRyxlls+wfuRfqCi5mSlZVan0heX5cHr154Dq9AfbH70LyhrSAezJw==
- dependencies:
- browserslist "^4.16.0"
- caniuse-api "^3.0.0"
-
-postcss-reduce-transforms@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz#93c12f6a159474aa711d5269923e2383cedcf640"
- integrity sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA==
- dependencies:
- cssnano-utils "^2.0.1"
- postcss-value-parser "^4.1.0"
-
-postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4:
- version "6.0.4"
- resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3"
- integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==
- dependencies:
- cssesc "^3.0.0"
- indexes-of "^1.0.1"
- uniq "^1.0.1"
- util-deprecate "^1.0.2"
-
-postcss-selector-parser@^6.0.5:
- version "6.0.6"
- resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea"
- integrity sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==
- dependencies:
- cssesc "^3.0.0"
- util-deprecate "^1.0.2"
-
-postcss-svgo@^5.0.3:
- version "5.0.3"
- resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.0.3.tgz#d945185756e5dfaae07f9edb0d3cae7ff79f9b30"
- integrity sha512-41XZUA1wNDAZrQ3XgWREL/M2zSw8LJPvb5ZWivljBsUQAGoEKMYm6okHsTjJxKYI4M75RQEH4KYlEM52VwdXVA==
- dependencies:
- postcss-value-parser "^4.1.0"
- svgo "^2.7.0"
-
-postcss-unique-selectors@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz#3be5c1d7363352eff838bd62b0b07a0abad43bfc"
- integrity sha512-gwi1NhHV4FMmPn+qwBNuot1sG1t2OmacLQ/AX29lzyggnjd+MnVD5uqQmpXO3J17KGL2WAxQruj1qTd3H0gG/w==
- dependencies:
- alphanum-sort "^1.0.2"
- postcss-selector-parser "^6.0.5"
- uniqs "^2.0.0"
-
-postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb"
- integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
-
-postcss@^8.2.15:
- version "8.3.0"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.0.tgz#b1a713f6172ca427e3f05ef1303de8b65683325f"
- integrity sha512-+ogXpdAjWGa+fdYY5BQ96V/6tAo+TdSSIMP5huJBIygdWwKtVoB5JWZ7yUd4xZ8r+8Kvvx4nyg/PQ071H4UtcQ==
- dependencies:
- colorette "^1.2.2"
- nanoid "^3.1.23"
- source-map-js "^0.6.2"
-
postcss@^8.3.11:
version "8.3.11"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.11.tgz#c3beca7ea811cd5e1c4a3ec6d2e7599ef1f8f858"
@@ -6261,10 +5743,10 @@ postgres-interval@^1.1.0:
dependencies:
xtend "^4.0.0"
-prebuild-install@^6.1.4:
- version "6.1.4"
- resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f"
- integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==
+prebuild-install@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.0.0.tgz#3c5ce3902f1cb9d6de5ae94ca53575e4af0c1574"
+ integrity sha512-IvSenf33K7JcgddNz2D5w521EgO+4aMMjFt73Uk9FRzQ7P+QZPKrp7qPsDydsSwjGt3T5xRNnM1bj1zMTD5fTA==
dependencies:
detect-libc "^1.0.3"
expand-template "^2.0.3"
@@ -6272,11 +5754,11 @@ prebuild-install@^6.1.4:
minimist "^1.2.3"
mkdirp-classic "^0.5.3"
napi-build-utils "^1.0.1"
- node-abi "^2.21.0"
+ node-abi "^3.3.0"
npmlog "^4.0.1"
pump "^3.0.0"
rc "^1.2.7"
- simple-get "^3.0.3"
+ simple-get "^4.0.0"
tar-fs "^2.0.0"
tunnel-agent "^0.6.0"
@@ -6304,11 +5786,6 @@ printj@~1.1.0:
resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222"
integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==
-prismjs@1.25.0:
- version "1.25.0"
- resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.25.0.tgz#6f822df1bdad965734b310b315a23315cf999756"
- integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==
-
private-ip@2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/private-ip/-/private-ip-2.3.3.tgz#1e80ff8443e5ac78f555631aec3ea6ff027fa6aa"
@@ -6319,10 +5796,10 @@ private-ip@2.3.3:
is-ip "^3.1.0"
netmask "^2.0.2"
-probe-image-size@7.2.1:
- version "7.2.1"
- resolved "https://registry.yarnpkg.com/probe-image-size/-/probe-image-size-7.2.1.tgz#df0c924e67e247bc94f8fcb0fad7f0081061fc44"
- integrity sha512-d+6L3NvQBCNt4peRDoEfA7r9bPm6/qy18FnLKwg4NWBC5JrJm0pMLRg1kF4XNsPe1bUdt3WIMonPJzQWN2HXjQ==
+probe-image-size@7.2.2:
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/probe-image-size/-/probe-image-size-7.2.2.tgz#e5851b9be7864f21e3bac5e6e4fac9da9055b412"
+ integrity sha512-QUm+w1S9WTsT5GZB830u0BHExrUmF0J4fyRm5kbLUMEP3fl9UVYXc3xOBVqZNnH9tnvVEJO8vDk3PMtsLqjxug==
dependencies:
lodash.merge "^4.6.2"
needle "^2.5.2"
@@ -6333,11 +5810,6 @@ process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
-progress@^2.0.0:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
- integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
-
promise-inflight@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
@@ -6356,15 +5828,6 @@ promise-retry@^2.0.1:
err-code "^2.0.2"
retry "^0.12.0"
-promise.prototype.finally@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.2.tgz#b8af89160c9c673cefe3b4c4435b53cfd0287067"
- integrity sha512-A2HuJWl2opDH0EafgdjwEw7HysI8ff/n4lW4QEVBCUXFk9QeGecBWv0Deph0UmLe3tTNYegz8MOjsVuE6SMoJA==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.0-next.0"
- function-bind "^1.1.1"
-
promise@^7.0.1:
version "7.3.1"
resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
@@ -6508,10 +5971,10 @@ punycode@2.1.1, punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
-pureimage@0.3.5:
- version "0.3.5"
- resolved "https://registry.yarnpkg.com/pureimage/-/pureimage-0.3.5.tgz#cd5e91f7b6409fcf4880297aaa3e7fc0afc24d5e"
- integrity sha512-+CFUEpoX6GemlKlHihI7Ii4IqKqF5KZjd682sAxwzbc4t4zU4Gwhxd4W3UMZW94nJzf0n4nA9zJrwTR4jZB4TA==
+pureimage@0.3.8:
+ version "0.3.8"
+ resolved "https://registry.yarnpkg.com/pureimage/-/pureimage-0.3.8.tgz#b9c2a127f3182ab94fb4520e83f4fbcbdd9b38f1"
+ integrity sha512-+CuR0HM0VmBfKKQTM56myBonDZAhZkS6ymJ8W5oYYDXG7y7X34B/dEH3UesbJI497Vc2OkA+g8T1/Xj/FTyQ8A==
dependencies:
jpeg-js "^0.4.1"
opentype.js "^0.4.3"
@@ -6522,18 +5985,15 @@ q@1.4.1:
resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e"
integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=
-qrcode@1.4.4:
- version "1.4.4"
- resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.4.4.tgz#f0c43568a7e7510a55efc3b88d9602f71963ea83"
- integrity sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==
+qrcode@1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.0.tgz#95abb8a91fdafd86f8190f2836abbfc500c72d1b"
+ integrity sha512-9MgRpgVc+/+47dFvQeD6U2s0Z92EsKzcHogtum4QB+UNd025WOJSHvn/hjk9xmzj7Stj95CyUAs31mrjxliEsQ==
dependencies:
- buffer "^5.4.3"
- buffer-alloc "^1.2.0"
- buffer-from "^1.1.1"
dijkstrajs "^1.0.1"
- isarray "^2.0.1"
- pngjs "^3.3.0"
- yargs "^13.2.4"
+ encode-utf8 "^1.0.3"
+ pngjs "^5.0.0"
+ yargs "^15.3.1"
qs@^6.4.0, qs@^6.5.2:
version "6.9.3"
@@ -6601,14 +6061,14 @@ rdf-canonize@^3.0.0:
dependencies:
setimmediate "^1.0.5"
-re2@1.16.0:
- version "1.16.0"
- resolved "https://registry.yarnpkg.com/re2/-/re2-1.16.0.tgz#f311eb4865b1296123800ea8e013cec8dab25590"
- integrity sha512-eizTZL2ZO0ZseLqfD4t3Qd0M3b3Nr0MBWpX81EbPMIud/1d/CSfUIx2GQK8fWiAeHoSekO5EOeFib2udTZLwYw==
+re2@1.17.3:
+ version "1.17.3"
+ resolved "https://registry.yarnpkg.com/re2/-/re2-1.17.3.tgz#8cceb48f52c45b860b1f67cee8a44726f7d05e9a"
+ integrity sha512-Dp5iWVR8W3C7Nm9DziMY4BleMPRb/pe6kvfbzLv80dVYaXRc9jRnwwNqU0oE/taRm0qYR1+Qrtzk9rPjS9ecaQ==
dependencies:
- install-artifact-from-github "^1.2.0"
- nan "^2.14.2"
- node-gyp "^8.0.0"
+ install-artifact-from-github "^1.3.0"
+ nan "^2.15.0"
+ node-gyp "^8.4.1"
readable-stream@1.1.x:
version "1.1.14"
@@ -6620,7 +6080,7 @@ readable-stream@1.1.x:
isarray "0.0.1"
string_decoder "~0.10.x"
-readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2:
+readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@~2.3.6:
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
@@ -6684,13 +6144,24 @@ redis-lock@0.1.4:
resolved "https://registry.yarnpkg.com/redis-lock/-/redis-lock-0.1.4.tgz#e83590bee22b5f01cdb65bfbd88d988045356272"
integrity sha512-7/+zu86XVQfJVx1nHTzux5reglDiyUCDwmW7TSlvVezfhH2YLc/Rc8NE0ejQG+8/0lwKzm29/u/4+ogKeLosiA==
-redis-parser@^3.0.0:
+redis-parser@3.0.0, redis-parser@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4"
integrity sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=
dependencies:
redis-errors "^1.0.0"
+redis@*:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/redis/-/redis-4.0.2.tgz#096cf716842731a24f34c7c3a996c143e2b133bb"
+ integrity sha512-Ip1DJ/lwuvtJz9AZ6pl1Bv33fWzk5d3iQpGzsXpi04ErkT4fq0pfGOm4k/p9DHmPGieEIOWvJ9xmIeQMooLybg==
+ dependencies:
+ "@node-redis/bloom" "^1.0.0"
+ "@node-redis/client" "^1.0.2"
+ "@node-redis/json" "^1.0.2"
+ "@node-redis/search" "^1.0.2"
+ "@node-redis/time-series" "^1.0.1"
+
redis@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/redis/-/redis-3.1.2.tgz#766851117e80653d23e0ed536254677ab647638c"
@@ -6802,6 +6273,13 @@ reusify@^1.0.4:
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
+rimraf@2:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
+ integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
+ dependencies:
+ glob "^7.1.3"
+
rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
@@ -6827,12 +6305,7 @@ s-age@1.1.2:
resolved "https://registry.yarnpkg.com/s-age/-/s-age-1.1.2.tgz#c0cf15233ccc93f41de92ea42c36d957977d1ea2"
integrity sha512-aSN2TlF39WLoZA/6cgYSJZhKt63kJ4EaadejPWjWY9/h4rksIqvfWY3gfd+3uAegSM1IXsA9aWeEhJtkxkFQtA==
-safari-14-idb-fix@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/safari-14-idb-fix/-/safari-14-idb-fix-1.0.4.tgz#5c68ba63e2a8ae0d89a0aa1e13fe89e3aef7da19"
- integrity sha512-4+Y2baQdgJpzu84d0QjySl70Kyygzf0pepVg8NVg4NnQEPpfC91fAn0baNvtStlCjUUxxiu0BOMiafa98fRRuA==
-
-safe-buffer@*:
+safe-buffer@*, safe-buffer@5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -6852,10 +6325,10 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0:
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
-sanitize-html@2.5.3:
- version "2.5.3"
- resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.5.3.tgz#91aa3dc760b072cdf92f9c6973747569b1ba1cd8"
- integrity sha512-DGATXd1fs/Rm287/i5FBKVYSBBUL0iAaztOA1/RFhEs4yqo39/X52i/q/CwsfCUG5cilmXSBmnQmyWfnKhBlOg==
+sanitize-html@2.6.1:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.6.1.tgz#5d37c08e189c61c0631560a889b10d9d155d000e"
+ integrity sha512-DzjSz3H5qDntD7s1TcWCSoRPmNR8UmA+y+xZQOvWgjATe2Br9ZW73+vD3Pj6Snrg0RuEuJdXgrKvnYuiuixRkA==
dependencies:
deepmerge "^4.2.2"
escape-string-regexp "^4.0.0"
@@ -6905,17 +6378,12 @@ seedrandom@3.0.5:
resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7"
integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==
-semver@6.x:
- version "6.3.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
- integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-
-semver@^5.4.1, semver@^5.6.0:
+semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-semver@^7.2.1, semver@^7.3.2, semver@^7.3.4:
+semver@^7.3.2, semver@^7.3.4:
version "7.3.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
@@ -6941,7 +6409,7 @@ set-blocking@^2.0.0, set-blocking@~2.0.0:
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
-setimmediate@^1.0.5:
+setimmediate@^1.0.5, setimmediate@~1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=
@@ -6964,17 +6432,17 @@ sha.js@^2.4.11:
inherits "^2.0.1"
safe-buffer "^5.0.1"
-sharp@0.29.2:
- version "0.29.2"
- resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.29.2.tgz#e8c003cd9cb321585b32dbda6eed3baa7d6f2308"
- integrity sha512-XWRdiYLIJ3tDUejRyG24KERnJzMfIoyiJBntd2S6/uj3NEeNgRFRLgiBlvPxMa8aml14dKKD98yHinSNKp1xzQ==
+sharp@0.29.3:
+ version "0.29.3"
+ resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.29.3.tgz#0da183d626094c974516a48fab9b3e4ba92eb5c2"
+ integrity sha512-fKWUuOw77E4nhpyzCCJR1ayrttHoFHBT2U/kR/qEMRhvPEcluG4BKj324+SCO1e84+knXHwhJ1HHJGnUt4ElGA==
dependencies:
color "^4.0.1"
detect-libc "^1.0.3"
node-addon-api "^4.2.0"
- prebuild-install "^6.1.4"
+ prebuild-install "^7.0.0"
semver "^7.3.5"
- simple-get "^3.1.0"
+ simple-get "^4.0.0"
tar-fs "^2.1.1"
tunnel-agent "^0.6.0"
@@ -7019,12 +6487,12 @@ simple-concat@^1.0.0:
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6"
integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=
-simple-get@^3.0.3, simple-get@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3"
- integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==
+simple-get@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.0.tgz#73fa628278d21de83dadd5512d2cc1f4872bd675"
+ integrity sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ==
dependencies:
- decompress-response "^4.2.0"
+ decompress-response "^6.0.0"
once "^1.3.1"
simple-concat "^1.0.0"
@@ -7045,16 +6513,16 @@ smart-buffer@^4.1.0:
resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba"
integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==
-socks-proxy-agent@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60"
- integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA==
+socks-proxy-agent@^6.0.0:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz#e664e8f1aaf4e1fb3df945f09e3d94f911137f87"
+ integrity sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==
dependencies:
- agent-base "6"
- debug "4"
- socks "^2.3.3"
+ agent-base "^6.0.2"
+ debug "^4.3.1"
+ socks "^2.6.1"
-socks@^2.3.3:
+socks@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e"
integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==
@@ -7109,11 +6577,6 @@ sprintf-js@1.1.2:
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
-sprintf-js@~1.0.2:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
- integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
-
sshpk@^1.14.1:
version "1.16.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
@@ -7136,11 +6599,6 @@ ssri@^8.0.0, ssri@^8.0.1:
dependencies:
minipass "^3.1.1"
-stable@^0.1.8:
- version "0.1.8"
- resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf"
- integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==
-
standard-as-callback@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/standard-as-callback/-/standard-as-callback-2.1.0.tgz#8953fc05359868a77b5b9739a665c5977bb7df45"
@@ -7185,14 +6643,14 @@ string-width@^1.0.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
-string-width@^3.0.0, string-width@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
- integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
+"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.2.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
- emoji-regex "^7.0.1"
- is-fullwidth-code-point "^2.0.0"
- strip-ansi "^5.1.0"
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.1"
string-width@^4.1.0, string-width@^4.2.0:
version "4.2.0"
@@ -7203,14 +6661,6 @@ string-width@^4.1.0, string-width@^4.2.0:
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.0"
-string.prototype.trimend@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913"
- integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.5"
-
string.prototype.trimend@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80"
@@ -7219,32 +6669,6 @@ string.prototype.trimend@^1.0.4:
call-bind "^1.0.2"
define-properties "^1.1.3"
-string.prototype.trimleft@^2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc"
- integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.5"
- string.prototype.trimstart "^1.0.0"
-
-string.prototype.trimright@^2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3"
- integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.5"
- string.prototype.trimend "^1.0.0"
-
-string.prototype.trimstart@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54"
- integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.5"
-
string.prototype.trimstart@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed"
@@ -7293,13 +6717,6 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
-strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
- integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
- dependencies:
- ansi-regex "^4.1.0"
-
strip-ansi@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
@@ -7347,14 +6764,6 @@ style-loader@3.3.1:
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575"
integrity sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==
-stylehacks@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.0.1.tgz#323ec554198520986806388c7fdaebc38d2c06fb"
- integrity sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA==
- dependencies:
- browserslist "^4.16.0"
- postcss-selector-parser "^6.0.4"
-
summaly@2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/summaly/-/summaly-2.5.0.tgz#ec5af6e84857efcb6c844d896e83569e64a923ea"
@@ -7392,19 +6801,6 @@ supports-color@^7.0.0, supports-color@^7.1.0:
dependencies:
has-flag "^4.0.0"
-svgo@^2.7.0:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.8.0.tgz#4ff80cce6710dc2795f0c7c74101e6764cfccd24"
- integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==
- dependencies:
- "@trysound/sax" "0.2.0"
- commander "^7.2.0"
- css-select "^4.1.3"
- css-tree "^1.1.3"
- csso "^4.2.0"
- picocolors "^1.0.0"
- stable "^0.1.8"
-
symbol-tree@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
@@ -7481,10 +6877,10 @@ tar@^6.0.2:
mkdirp "^1.0.3"
yallist "^4.0.0"
-tar@^6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83"
- integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==
+tar@^6.1.2:
+ version "6.1.11"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621"
+ integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
@@ -7543,11 +6939,6 @@ through@2:
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
-timsort@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4"
- integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=
-
tinycolor2@1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803"
@@ -7611,21 +7002,10 @@ trace-redirect@1.0.6:
resolved "https://registry.yarnpkg.com/trace-redirect/-/trace-redirect-1.0.6.tgz#ac629b5bf8247d30dde5a35fe9811b811075b504"
integrity sha512-UUfa1DjjU5flcjMdaFIiIEGDTyu2y/IiMjOX4uGXa7meKBS4vD4f2Uy/tken9Qkd4Jsm4sRsfZcIIPqrRVF3Mg==
-ts-jest@^25.2.1:
- version "25.5.1"
- resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.5.1.tgz#2913afd08f28385d54f2f4e828be4d261f4337c7"
- integrity sha512-kHEUlZMK8fn8vkxDjwbHlxXRB9dHYpyzqKIGDNxbzs+Rz+ssNDSDNusEK8Fk/sDd4xE6iKoQLfFkFVaskmTJyw==
- dependencies:
- bs-logger "0.x"
- buffer-from "1.x"
- fast-json-stable-stringify "2.x"
- json5 "2.x"
- lodash.memoize "4.x"
- make-error "1.x"
- micromatch "4.x"
- mkdirp "0.x"
- semver "6.x"
- yargs-parser "18.x"
+"traverse@>=0.3.0 <0.4":
+ version "0.3.9"
+ resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9"
+ integrity sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=
ts-loader@9.2.6:
version "9.2.6"
@@ -7667,10 +7047,10 @@ tsc-alias@1.4.1:
mylas "^2.1.4"
normalize-path "^3.0.0"
-tsconfig-paths@3.11.0, tsconfig-paths@^3.11.0:
- version "3.11.0"
- resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36"
- integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==
+tsconfig-paths@3.12.0, tsconfig-paths@^3.12.0:
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b"
+ integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==
dependencies:
"@types/json5" "^0.0.29"
json5 "^1.0.1"
@@ -7770,10 +7150,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
-typeorm@0.2.39:
- version "0.2.39"
- resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.39.tgz#4d22fc68d114b2ca88a8d7b064f31af15e836ade"
- integrity sha512-yQdvDpmmmn8wp1We25V76KIBPYR/lDbymNbGC++Uq8mSRhpHIPnlg26VAT4CF6Ypqx72zn8eqr+/72uSo7HdJQ==
+typeorm@0.2.41:
+ version "0.2.41"
+ resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.41.tgz#88758101ac158dc0a0a903d70eaacea2974281cc"
+ integrity sha512-/d8CLJJxKPgsnrZWiMyPI0rz2MFZnBQrnQ5XP3Vu3mswv2WPexb58QM6BEtmRmlTMYN5KFWUz8SKluze+wS9xw==
dependencies:
"@sqltools/formatter" "^1.2.2"
app-root-path "^3.0.0"
@@ -7792,10 +7172,10 @@ typeorm@0.2.39:
yargs "^17.0.1"
zen-observable-ts "^1.0.0"
-typescript@4.4.4:
- version "4.4.4"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c"
- integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==
+typescript@4.5.5:
+ version "4.5.5"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
+ integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==
ulid@2.3.0:
version "2.3.0"
@@ -7812,16 +7192,6 @@ unbox-primitive@^1.0.1:
has-symbols "^1.0.2"
which-boxed-primitive "^1.0.2"
-uniq@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
- integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=
-
-uniqs@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
- integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI=
-
unique-filename@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230"
@@ -7854,6 +7224,22 @@ unpipe@1.0.0:
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
+unzipper@0.10.11:
+ version "0.10.11"
+ resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.11.tgz#0b4991446472cbdb92ee7403909f26c2419c782e"
+ integrity sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==
+ dependencies:
+ big-integer "^1.6.17"
+ binary "~0.3.0"
+ bluebird "~3.4.1"
+ buffer-indexof-polyfill "~1.0.0"
+ duplexer2 "~0.1.4"
+ fstream "^1.0.12"
+ graceful-fs "^4.2.2"
+ listenercount "~1.0.1"
+ readable-stream "~2.3.6"
+ setimmediate "~1.0.4"
+
uri-js@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
@@ -7881,21 +7267,11 @@ utf-8-validate@^5.0.2:
dependencies:
node-gyp-build "~3.7.0"
-util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
+util-deprecate@^1.0.1, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
-util.promisify@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee"
- integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.2"
- has-symbols "^1.0.1"
- object.getownpropertydescriptors "^2.1.0"
-
uuid@3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
@@ -7921,11 +7297,6 @@ vary@^1.1.2:
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
-vendors@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e"
- integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==
-
verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
@@ -7940,19 +7311,6 @@ void-elements@^3.1.0:
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09"
integrity sha1-YU9/v42AHwu18GYfWy9XhXUOTwk=
-vue-eslint-parser@^8.0.1:
- version "8.0.1"
- resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-8.0.1.tgz#25e08b20a414551531f3e19f999902e1ecf45f13"
- integrity sha512-lhWjDXJhe3UZw2uu3ztX51SJAPGPey1Tff2RK3TyZURwbuI4vximQLzz4nQfCv8CZq4xx7uIiogHMMoSJPr33A==
- dependencies:
- debug "^4.3.2"
- eslint-scope "^6.0.0"
- eslint-visitor-keys "^3.0.0"
- espree "^9.0.0"
- esquery "^1.4.0"
- lodash "^4.17.21"
- semver "^7.3.5"
-
w3c-hr-time@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"
@@ -7987,6 +7345,11 @@ web-push@3.4.5:
minimist "^1.2.5"
urlsafe-base64 "^1.0.0"
+web-streams-polyfill@^3.0.3:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.0.tgz#a6b74026b38e4885869fb5c589e90b95ccfc7965"
+ integrity sha512-EqPmREeOzttaLRm5HS7io98goBgZ7IVz79aDvqjD0kYXLtFZTc0T/U6wHTPKyIjb+MdN7DFIIX6hgdBEpWmfPA==
+
webidl-conversions@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
@@ -8113,6 +7476,13 @@ wide-align@1.1.3, wide-align@^1.1.0:
dependencies:
string-width "^1.0.2 || 2"
+wide-align@^1.1.2:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3"
+ integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==
+ dependencies:
+ string-width "^1.0.2 || 2 || 3 || 4"
+
with@^7.0.0:
version "7.0.2"
resolved "https://registry.yarnpkg.com/with/-/with-7.0.2.tgz#ccee3ad542d25538a7a7a80aad212b9828495bac"
@@ -8133,14 +7503,14 @@ workerpool@6.1.0:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b"
integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==
-wrap-ansi@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
- integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==
+wrap-ansi@^6.2.0:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
+ integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
dependencies:
- ansi-styles "^3.2.0"
- string-width "^3.0.0"
- strip-ansi "^5.0.0"
+ ansi-styles "^4.0.0"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
wrap-ansi@^7.0.0:
version "7.0.0"
@@ -8156,10 +7526,10 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
-ws@8.2.3:
- version "8.2.3"
- resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba"
- integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==
+ws@8.4.2:
+ version "8.4.2"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.4.2.tgz#18e749868d8439f2268368829042894b6907aa0b"
+ integrity sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA==
ws@^7.4.6:
version "7.5.3"
@@ -8234,43 +7604,30 @@ yaeti@^0.0.6:
resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577"
integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=
+yallist@4.0.0, yallist@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
+ integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
+
yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
-yallist@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
- integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
-
yaml-ast-parser@0.0.43:
version "0.0.43"
resolved "https://registry.yarnpkg.com/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz#e8a23e6fb4c38076ab92995c5dca33f3d3d7c9bb"
integrity sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==
-yaml@^1.10.2:
- version "1.10.2"
- resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
- integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
-
-yargs-parser@18.x:
- version "18.1.3"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
- integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
- dependencies:
- camelcase "^5.0.0"
- decamelize "^1.2.0"
-
yargs-parser@20.2.4, yargs-parser@^20.2.2:
version "20.2.4"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
-yargs-parser@^13.1.2:
- version "13.1.2"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"
- integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==
+yargs-parser@^18.1.2:
+ version "18.1.3"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
+ integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
dependencies:
camelcase "^5.0.0"
decamelize "^1.2.0"
@@ -8298,21 +7655,22 @@ yargs@16.2.0, yargs@^16.0.0:
y18n "^5.0.5"
yargs-parser "^20.2.2"
-yargs@^13.2.4:
- version "13.3.2"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
- integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
+yargs@^15.3.1:
+ version "15.4.1"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
+ integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
dependencies:
- cliui "^5.0.0"
- find-up "^3.0.0"
+ cliui "^6.0.0"
+ decamelize "^1.2.0"
+ find-up "^4.1.0"
get-caller-file "^2.0.1"
require-directory "^2.1.1"
require-main-filename "^2.0.0"
set-blocking "^2.0.0"
- string-width "^3.0.0"
+ string-width "^4.2.0"
which-module "^2.0.0"
y18n "^4.0.0"
- yargs-parser "^13.1.2"
+ yargs-parser "^18.1.2"
yargs@^17.0.1:
version "17.1.1"