From 608ff73907a142de74aca544fbec823d90ed6dc9 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 5 Sep 2021 23:35:48 +0900 Subject: [PATCH 01/51] =?UTF-8?q?feat:=20=E3=83=AA=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=8B=E3=82=89=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=8C=E9=A3=9B=E3=82=93=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=81=9F=E3=82=89=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#7768)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Delete Actor * Update src/remote/activitypub/kernel/delete/actor.ts Co-authored-by: syuilo Co-authored-by: syuilo --- src/remote/activitypub/kernel/delete/actor.ts | 26 +++++++++++++++++++ src/remote/activitypub/kernel/delete/index.ts | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/remote/activitypub/kernel/delete/actor.ts diff --git a/src/remote/activitypub/kernel/delete/actor.ts b/src/remote/activitypub/kernel/delete/actor.ts new file mode 100644 index 0000000000..502f8d5ab5 --- /dev/null +++ b/src/remote/activitypub/kernel/delete/actor.ts @@ -0,0 +1,26 @@ +import { apLogger } from '../../logger'; +import { createDeleteAccountJob } from '@/queue'; +import { IRemoteUser } from '@/models/entities/user'; +import { Users } from '@/models/index'; + +const logger = apLogger; + +export async function deleteActor(actor: IRemoteUser, uri: string): Promise { + logger.info(`Deleting the Actor: ${uri}`); + + if (actor.uri !== uri) { + return `skip: delete actor ${actor.uri} !== ${uri}`; + } + + if (actor.isDeleted) { + logger.info(`skip: already deleted`); + } + + const job = await createDeleteAccountJob(actor); + + await Users.update(actor.id, { + isDeleted: true, + }); + + return `ok: queued ${job.name} ${job.id}`; +} diff --git a/src/remote/activitypub/kernel/delete/index.ts b/src/remote/activitypub/kernel/delete/index.ts index 474f3f6d60..86a452de76 100644 --- a/src/remote/activitypub/kernel/delete/index.ts +++ b/src/remote/activitypub/kernel/delete/index.ts @@ -2,6 +2,7 @@ import deleteNote from './note'; import { IRemoteUser } from '@/models/entities/user'; import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type'; import { toSingle } from '@/prelude/array'; +import { deleteActor } from './actor'; /** * 削除アクティビティを捌きます @@ -41,7 +42,7 @@ export default async (actor: IRemoteUser, activity: IDelete): Promise => if (validPost.includes(formarType)) { return await deleteNote(actor, uri); } else if (validActor.includes(formarType)) { - return `Delete Actor is not implanted`; + return await deleteActor(actor, uri); } else { return `Unknown type ${formarType}`; } From 0281bdd90c021ad882c064977b6673f3b457d204 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 5 Sep 2021 23:36:20 +0900 Subject: [PATCH 02/51] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf00b64e2..ff0a0e6b60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ --> +## 12.x.x (unreleased) + +### Improvements +- リモートユーザーのDeleteアクティビティに対応 + +### Bugfixes + ## 12.90.1 (2021/09/05) ### Bugfixes From 0faa4470fb41ea2f7ea2770b905bf7e17b7893cc Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 Sep 2021 19:28:02 +0900 Subject: [PATCH 03/51] =?UTF-8?q?GitHub=20Actions=E3=81=A7Docker=20Hub?= =?UTF-8?q?=E3=81=B8=E3=81=AEpush=E3=82=92=E8=A1=8C=E3=81=86=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#7782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create docker.yml * Update .github/workflows/docker.yml Co-authored-by: tamaina * add workflow_dispatch * Multi-platform image * Revert "Multi-platform image" This reverts commit e5bac6632909a5020b0708227ebe248b443c2c2b. Co-authored-by: tamaina --- .github/workflows/docker.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..1c6ad343e3 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,32 @@ +name: Publish Docker image + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: misskey/misskey + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push to Docker Hub + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 935d6473edf259efa3b9c2c167a80cb960b07ad6 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Sep 2021 20:23:31 +0900 Subject: [PATCH 04/51] =?UTF-8?q?chore:=20API=E3=83=89=E3=82=AD=E3=83=A5?= =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AE=E4=BF=AE=E6=AD=A3=20(#7771?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation --- locales/ja-JP.yml | 4 +++ src/misc/api-permissions.ts | 1 + src/models/repositories/notification.ts | 46 +++++++++++++++++++++---- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index e22f50668f..b9623ef0d0 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1150,6 +1150,10 @@ _permissions: "write:user-groups": "ユーザーグループを操作する" "read:channels": "チャンネルを見る" "write:channels": "チャンネルを操作する" + "read:gallery": "ギャラリーを見る" + "write:gallery": "ギャラリーを操作する" + "read:gallery-likes": "ギャラリーのいいねを見る" + "write:gallery-likes": "ギャラリーのいいねを操作する" _auth: shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?" diff --git a/src/misc/api-permissions.ts b/src/misc/api-permissions.ts index eb20c3d289..160cdf9fd6 100644 --- a/src/misc/api-permissions.ts +++ b/src/misc/api-permissions.ts @@ -32,3 +32,4 @@ export const kinds = [ 'read:gallery-likes', 'write:gallery-likes', ]; +// IF YOU ADD KINDS(PERMISSIONS), YOU MUST ADD TRANSLATIONS (under _permissions). diff --git a/src/models/repositories/notification.ts b/src/models/repositories/notification.ts index 55af96b6d7..ed9de7ef4c 100644 --- a/src/models/repositories/notification.ts +++ b/src/models/repositories/notification.ts @@ -7,6 +7,7 @@ import { Note } from '@/models/entities/note'; import { NoteReaction } from '@/models/entities/note-reaction'; import { User } from '@/models/entities/user'; import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis'; +import { notificationTypes } from '@/types'; export type PackedNotification = SchemaType; @@ -124,20 +125,53 @@ export const packedNotificationSchema = { 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: ['follow', 'followRequestAccepted', 'receiveFollowRequest', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote'], - }, - userId: { - type: 'string' as const, - optional: true as const, nullable: true as const, - format: 'id', + enum: [...notificationTypes], }, user: { type: 'object' as const, ref: 'User', 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', + 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, + }, } }; From c63ba5470a1d04a86908d504c7044bd4987c20fc Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 11 Sep 2021 11:32:47 +0900 Subject: [PATCH 05/51] fix: use master branch when build docker image --- .github/workflows/docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c6ad343e3..fe6c3bfd20 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v2 + with: + ref: master - name: Docker meta id: meta uses: docker/metadata-action@v3 From f59f424795490e6ae2fe0be65ee3debb0776e939 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 11 Sep 2021 11:37:35 +0900 Subject: [PATCH 06/51] Revert "fix: use master branch when build docker image" This reverts commit c63ba5470a1d04a86908d504c7044bd4987c20fc. --- .github/workflows/docker.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fe6c3bfd20..1c6ad343e3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,8 +13,6 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v2 - with: - ref: master - name: Docker meta id: meta uses: docker/metadata-action@v3 From 53f3b779bf16abcda4f6e026c51384f3b8fbcc62 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 12 Sep 2021 01:12:23 +0900 Subject: [PATCH 07/51] refactor: Expand schema (#7772) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation * test * fix * yatta * remove no longer needed "as PackedUser/PackedNote" * clean up * add simple-schema * fix lint * define items in full Schema * revert https://github.com/misskey-dev/misskey/pull/7772#discussion_r706627736 * user packとnote packの型不整合を修正 --- src/misc/schema.ts | 70 +++++++++++++++---- src/misc/simple-schema.ts | 15 ++++ src/models/repositories/blocking.ts | 2 +- src/models/repositories/clip.ts | 2 +- src/models/repositories/drive-file.ts | 4 +- src/models/repositories/drive-folder.ts | 2 +- src/models/repositories/following.ts | 4 +- src/models/repositories/gallery-post.ts | 6 +- src/models/repositories/messaging-message.ts | 8 +-- src/models/repositories/muting.ts | 2 +- src/models/repositories/note-favorite.ts | 2 +- src/models/repositories/note-reaction.ts | 2 +- src/models/repositories/note.ts | 33 ++++++--- src/models/repositories/notification.ts | 4 +- src/models/repositories/page.ts | 2 +- src/models/repositories/user.ts | 34 +++------ src/server/api/endpoints.ts | 4 +- src/server/api/openapi/schemas.ts | 49 ++----------- .../api/stream/channels/global-timeline.ts | 2 +- .../api/stream/channels/home-timeline.ts | 2 +- .../api/stream/channels/hybrid-timeline.ts | 5 +- .../api/stream/channels/local-timeline.ts | 5 +- src/server/api/stream/index.ts | 4 +- src/services/chart/core.ts | 14 ++-- 24 files changed, 148 insertions(+), 129 deletions(-) create mode 100644 src/misc/simple-schema.ts diff --git a/src/misc/schema.ts b/src/misc/schema.ts index e14e6e0dd7..d27c9eff99 100644 --- a/src/misc/schema.ts +++ b/src/misc/schema.ts @@ -1,15 +1,57 @@ -export type Schema = { - type: 'boolean' | 'number' | 'string' | 'array' | 'object' | 'any'; - nullable: boolean; - optional: boolean; +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'; + +export const refs = { + User: packedUserSchema, + UserList: packedUserListSchema, + UserGroup: packedUserGroupSchema, + App: packedAppSchema, + MessagingMessage: packedMessagingMessageSchema, + Note: packedNoteSchema, + NoteReaction: packedNoteReactionSchema, + NoteFavorite: packedNoteFavoriteSchema, + Notification: packedNotificationSchema, + DriveFile: packedDriveFileSchema, + DriveFolder: packedDriveFolderSchema, + Following: packedFollowingSchema, + Muting: packedMutingSchema, + Blocking: packedBlockingSchema, + Hashtag: packedHashtagSchema, + Page: packedPageSchema, + Channel: packedChannelSchema, + QueueCount: packedQueueCountSchema, + Antenna: packedAntennaSchema, + Clip: packedClipSchema, + FederationInstance: packedFederationInstanceSchema, + GalleryPost: packedGalleryPostSchema, +}; + +export interface Schema extends SimpleSchema { items?: Schema; properties?: Obj; - description?: string; - example?: any; - format?: string; - ref?: string; - enum?: string[]; -}; + ref?: keyof typeof refs; +} type NonUndefinedPropertyNames = { [K in keyof T]: T[K]['optional'] extends true ? never : K @@ -22,7 +64,7 @@ type UndefinedPropertyNames = { type OnlyRequired = Pick>; type OnlyOptional = Pick>; -export type Obj = { [key: string]: Schema }; +export interface Obj extends SimpleObj { [key: string]: Schema; } export type ObjType = { [P in keyof OnlyOptional]?: SchemaType } & @@ -48,6 +90,10 @@ export type SchemaType

= p['type'] extends 'string' ? NullOrUndefined : p['type'] extends 'boolean' ? NullOrUndefined : p['type'] extends 'array' ? NullOrUndefined>[]> : - p['type'] extends 'object' ? NullOrUndefined>> : + p['type'] extends 'object' ? ( + p['ref'] extends keyof typeof refs + ? NullOrUndefined> + : NullOrUndefined>> + ) : p['type'] extends 'any' ? NullOrUndefined : any; diff --git a/src/misc/simple-schema.ts b/src/misc/simple-schema.ts new file mode 100644 index 0000000000..abbb348e24 --- /dev/null +++ b/src/misc/simple-schema.ts @@ -0,0 +1,15 @@ +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/src/models/repositories/blocking.ts b/src/models/repositories/blocking.ts index dd3a10905c..515b3a6b16 100644 --- a/src/models/repositories/blocking.ts +++ b/src/models/repositories/blocking.ts @@ -56,7 +56,7 @@ export const packedBlockingSchema = { blockee: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, } }; diff --git a/src/models/repositories/clip.ts b/src/models/repositories/clip.ts index 49dc3a332e..e3d718bef4 100644 --- a/src/models/repositories/clip.ts +++ b/src/models/repositories/clip.ts @@ -53,7 +53,7 @@ export const packedClipSchema = { }, user: { type: 'object' as const, - ref: 'User', + ref: 'User' as const, optional: false as const, nullable: false as const, }, name: { diff --git a/src/models/repositories/drive-file.ts b/src/models/repositories/drive-file.ts index 42a60ff03c..63bd020cbe 100644 --- a/src/models/repositories/drive-file.ts +++ b/src/models/repositories/drive-file.ts @@ -234,7 +234,7 @@ export const packedDriveFileSchema = { folder: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'DriveFolder' + ref: 'DriveFolder' as const, }, userId: { type: 'string' as const, @@ -245,7 +245,7 @@ export const packedDriveFileSchema = { user: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'User' + ref: 'User' as const, } }, }; diff --git a/src/models/repositories/drive-folder.ts b/src/models/repositories/drive-folder.ts index 4228284f82..bc73018f29 100644 --- a/src/models/repositories/drive-folder.ts +++ b/src/models/repositories/drive-folder.ts @@ -87,7 +87,7 @@ export const packedDriveFolderSchema = { parent: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'DriveFolder' + ref: 'DriveFolder' as const, }, }, }; diff --git a/src/models/repositories/following.ts b/src/models/repositories/following.ts index 3bb120bc4b..24ddd0d676 100644 --- a/src/models/repositories/following.ts +++ b/src/models/repositories/following.ts @@ -110,7 +110,7 @@ export const packedFollowingSchema = { followee: { type: 'object' as const, optional: true as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, followerId: { type: 'string' as const, @@ -120,7 +120,7 @@ export const packedFollowingSchema = { follower: { type: 'object' as const, optional: true as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, } }; diff --git a/src/models/repositories/gallery-post.ts b/src/models/repositories/gallery-post.ts index 03edb35213..afa22e9edf 100644 --- a/src/models/repositories/gallery-post.ts +++ b/src/models/repositories/gallery-post.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm'; import { GalleryPost } from '@/models/entities/gallery-post'; -import { SchemaType } from '../../misc/schema'; +import { SchemaType } from '@/misc/schema'; import { Users, DriveFiles, GalleryLikes } from '../index'; import { awaitAll } from '@/prelude/await-all'; import { User } from '@/models/entities/user'; @@ -76,7 +76,7 @@ export const packedGalleryPostSchema = { }, user: { type: 'object' as const, - ref: 'User', + ref: 'User' as const, optional: false as const, nullable: false as const, }, fileIds: { @@ -94,7 +94,7 @@ export const packedGalleryPostSchema = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile' + ref: 'DriveFile' as const, } }, tags: { diff --git a/src/models/repositories/messaging-message.ts b/src/models/repositories/messaging-message.ts index 1a4a8eecc4..f97905af2f 100644 --- a/src/models/repositories/messaging-message.ts +++ b/src/models/repositories/messaging-message.ts @@ -67,7 +67,7 @@ export const packedMessagingMessageSchema = { }, user: { type: 'object' as const, - ref: 'User', + ref: 'User' as const, optional: true as const, nullable: false as const, }, text: { @@ -82,7 +82,7 @@ export const packedMessagingMessageSchema = { file: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, recipientId: { type: 'string' as const, @@ -92,7 +92,7 @@ export const packedMessagingMessageSchema = { recipient: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'User' + ref: 'User' as const, }, groupId: { type: 'string' as const, @@ -102,7 +102,7 @@ export const packedMessagingMessageSchema = { group: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'UserGroup' + ref: 'UserGroup' as const, }, isRead: { type: 'boolean' as const, diff --git a/src/models/repositories/muting.ts b/src/models/repositories/muting.ts index e46f4ae448..d957b1792d 100644 --- a/src/models/repositories/muting.ts +++ b/src/models/repositories/muting.ts @@ -56,7 +56,7 @@ export const packedMutingSchema = { mutee: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, } }; diff --git a/src/models/repositories/note-favorite.ts b/src/models/repositories/note-favorite.ts index 3248c32ded..47586a9116 100644 --- a/src/models/repositories/note-favorite.ts +++ b/src/models/repositories/note-favorite.ts @@ -45,7 +45,7 @@ export const packedNoteFavoriteSchema = { note: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, noteId: { type: 'string' as const, diff --git a/src/models/repositories/note-reaction.ts b/src/models/repositories/note-reaction.ts index c349edf182..e73a832109 100644 --- a/src/models/repositories/note-reaction.ts +++ b/src/models/repositories/note-reaction.ts @@ -42,7 +42,7 @@ export const packedNoteReactionSchema = { user: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, type: { type: 'string' as const, diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index 9e0f5e55f0..376a09d0c6 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -95,7 +95,7 @@ export class NoteRepository extends Repository { hide = true; } else if (meId === packedNote.userId) { hide = false; - } else if (packedNote.reply && (meId === (packedNote.reply as PackedNote).userId)) { + } else if (packedNote.reply && (meId === packedNote.reply.userId)) { // 自分の投稿に対するリプライ hide = false; } else if (packedNote.mentions && packedNote.mentions.some(id => meId === id)) { @@ -353,7 +353,7 @@ export const packedNoteSchema = { }, user: { type: 'object' as const, - ref: 'User', + ref: 'User' as const, optional: false as const, nullable: false as const, }, replyId: { @@ -371,12 +371,12 @@ export const packedNoteSchema = { reply: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'Note' + ref: 'Note' as const, }, renote: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'Note' + ref: 'Note' as const, }, viaMobile: { type: 'boolean' as const, @@ -423,7 +423,7 @@ export const packedNoteSchema = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile' + ref: 'DriveFile' as const, } }, tags: { @@ -447,11 +447,24 @@ export const packedNoteSchema = { channel: { type: 'object' as const, optional: true as const, nullable: true as const, - ref: 'Channel' + 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: false as const, nullable: true as const, + optional: true as const, nullable: false as const, }, emojis: { type: 'array' as const, @@ -466,7 +479,7 @@ export const packedNoteSchema = { }, url: { type: 'string' as const, - optional: false as const, nullable: false as const, + optional: false as const, nullable: true as const, }, }, }, @@ -485,11 +498,11 @@ export const packedNoteSchema = { }, uri: { type: 'string' as const, - optional: false as const, nullable: true as const, + optional: true as const, nullable: false as const, }, url: { type: 'string' as const, - optional: false as const, nullable: true as const, + optional: true as const, nullable: false as const, }, myReaction: { diff --git a/src/models/repositories/notification.ts b/src/models/repositories/notification.ts index ed9de7ef4c..b7f9e3643c 100644 --- a/src/models/repositories/notification.ts +++ b/src/models/repositories/notification.ts @@ -136,7 +136,7 @@ export const packedNotificationSchema = { }, user: { type: 'object' as const, - ref: 'User', + ref: 'User' as const, optional: true as const, nullable: true as const, }, userId: { @@ -146,7 +146,7 @@ export const packedNotificationSchema = { }, note: { type: 'object' as const, - ref: 'Note', + ref: 'Note' as const, optional: true as const, nullable: true as const, }, reaction: { diff --git a/src/models/repositories/page.ts b/src/models/repositories/page.ts index 757aaa5a3f..1a61e2c99c 100644 --- a/src/models/repositories/page.ts +++ b/src/models/repositories/page.ts @@ -137,7 +137,7 @@ export const packedPageSchema = { }, user: { type: 'object' as const, - ref: 'User', + ref: 'User' as const, optional: false as const, nullable: false as const, }, } diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index d4bb995ce2..39c90cf5ed 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -375,12 +375,12 @@ export const packedUserSchema = { }, isAdmin: { type: 'boolean' as const, - nullable: false as const, optional: false as const, + nullable: false as const, optional: true as const, default: false }, isModerator: { type: 'boolean' as const, - nullable: false as const, optional: false as const, + nullable: false as const, optional: true as const, default: false }, isBot: { @@ -402,23 +402,11 @@ export const packedUserSchema = { type: 'string' as const, nullable: false as const, optional: false as const }, - host: { - type: 'string' as const, - nullable: true as const, optional: false as const - }, url: { type: 'string' as const, nullable: false as const, optional: false as const, format: 'url' }, - aliases: { - type: 'array' as const, - nullable: false as const, optional: false as const, - items: { - type: 'string' as const, - nullable: false as const, optional: false as const - } - } } } }, @@ -457,7 +445,7 @@ export const packedUserSchema = { }, isSuspended: { type: 'boolean' as const, - nullable: false as const, optional: false as const, + nullable: false as const, optional: true as const, example: false }, description: { @@ -476,7 +464,7 @@ export const packedUserSchema = { }, fields: { type: 'array' as const, - nullable: false as const, optional: false as const, + nullable: false as const, optional: true as const, items: { type: 'object' as const, nullable: false as const, optional: false as const, @@ -520,31 +508,31 @@ export const packedUserSchema = { items: { type: 'object' as const, nullable: false as const, optional: false as const, - ref: 'Note' + ref: 'Note' as const, } }, pinnedPageId: { type: 'string' as const, - nullable: true as const, optional: false as const + nullable: true as const, optional: true as const }, pinnedPage: { type: 'object' as const, - nullable: true as const, optional: false as const, - ref: 'Page' + nullable: true as const, optional: true as const, + ref: 'Page' as const, }, twoFactorEnabled: { type: 'boolean' as const, - nullable: false as const, optional: false as const, + nullable: false as const, optional: true as const, default: false }, usePasswordLessLogin: { type: 'boolean' as const, - nullable: false as const, optional: false as const, + nullable: false as const, optional: true as const, default: false }, securityKeys: { type: 'boolean' as const, - nullable: false as const, optional: false as const, + nullable: false as const, optional: true as const, default: false }, avatarId: { diff --git a/src/server/api/endpoints.ts b/src/server/api/endpoints.ts index 640b14ed6a..6d9d2b0782 100644 --- a/src/server/api/endpoints.ts +++ b/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 { Schema } from '@/misc/schema'; +import { SimpleSchema } from '@/misc/simple-schema'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; @@ -34,7 +34,7 @@ export interface IEndpointMeta { }; }; - res?: Schema; + res?: SimpleSchema; /** * このエンドポイントにリクエストするのにユーザー情報が必須か否か diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts index 5402dc6f48..12fc207c47 100644 --- a/src/server/api/openapi/schemas.ts +++ b/src/server/api/openapi/schemas.ts @@ -1,26 +1,4 @@ -import { packedUserSchema } from '@/models/repositories/user'; -import { Schema } from '@/misc/schema'; -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 { refs, Schema } from '@/misc/schema'; export function convertSchemaToOpenApiSchema(schema: Schema) { const res: any = schema; @@ -72,26 +50,7 @@ export const schemas = { required: ['error'] }, - User: convertSchemaToOpenApiSchema(packedUserSchema), - UserList: convertSchemaToOpenApiSchema(packedUserListSchema), - UserGroup: convertSchemaToOpenApiSchema(packedUserGroupSchema), - App: convertSchemaToOpenApiSchema(packedAppSchema), - MessagingMessage: convertSchemaToOpenApiSchema(packedMessagingMessageSchema), - Note: convertSchemaToOpenApiSchema(packedNoteSchema), - NoteReaction: convertSchemaToOpenApiSchema(packedNoteReactionSchema), - NoteFavorite: convertSchemaToOpenApiSchema(packedNoteFavoriteSchema), - Notification: convertSchemaToOpenApiSchema(packedNotificationSchema), - DriveFile: convertSchemaToOpenApiSchema(packedDriveFileSchema), - DriveFolder: convertSchemaToOpenApiSchema(packedDriveFolderSchema), - Following: convertSchemaToOpenApiSchema(packedFollowingSchema), - Muting: convertSchemaToOpenApiSchema(packedMutingSchema), - Blocking: convertSchemaToOpenApiSchema(packedBlockingSchema), - Hashtag: convertSchemaToOpenApiSchema(packedHashtagSchema), - Page: convertSchemaToOpenApiSchema(packedPageSchema), - Channel: convertSchemaToOpenApiSchema(packedChannelSchema), - QueueCount: convertSchemaToOpenApiSchema(packedQueueCountSchema), - Antenna: convertSchemaToOpenApiSchema(packedAntennaSchema), - Clip: convertSchemaToOpenApiSchema(packedClipSchema), - FederationInstance: convertSchemaToOpenApiSchema(packedFederationInstanceSchema), - GalleryPost: convertSchemaToOpenApiSchema(packedGalleryPostSchema), + ...Object.fromEntries( + Object.entries(refs).map(([key, schema]) => [key, convertSchemaToOpenApiSchema(schema)]) + ), }; diff --git a/src/server/api/stream/channels/global-timeline.ts b/src/server/api/stream/channels/global-timeline.ts index 2cb138966f..384ed61409 100644 --- a/src/server/api/stream/channels/global-timeline.ts +++ b/src/server/api/stream/channels/global-timeline.ts @@ -43,7 +43,7 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { - const reply = note.reply as PackedNote; + const reply = note.reply; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } diff --git a/src/server/api/stream/channels/home-timeline.ts b/src/server/api/stream/channels/home-timeline.ts index c7a9728741..0e21ab552e 100644 --- a/src/server/api/stream/channels/home-timeline.ts +++ b/src/server/api/stream/channels/home-timeline.ts @@ -51,7 +51,7 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { - const reply = note.reply as PackedNote; + const reply = note.reply; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts index 5c454764ec..0b28ff616b 100644 --- a/src/server/api/stream/channels/hybrid-timeline.ts +++ b/src/server/api/stream/channels/hybrid-timeline.ts @@ -4,7 +4,6 @@ import Channel from '../channel'; import { fetchMeta } from '@/misc/fetch-meta'; import { Notes } from '@/models/index'; import { PackedNote } from '@/models/repositories/note'; -import { PackedUser } from '@/models/repositories/user'; import { checkWordMute } from '@/misc/check-word-mute'; import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; @@ -31,7 +30,7 @@ export default class extends Channel { if (!( (note.channelId == null && this.user!.id === note.userId) || (note.channelId == null && this.following.has(note.userId)) || - (note.channelId == null && ((note.user as PackedUser).host == null && note.visibility === 'public')) || + (note.channelId == null && (note.user.host == null && note.visibility === 'public')) || (note.channelId != null && this.followingChannels.has(note.channelId)) )) return; @@ -60,7 +59,7 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { - const reply = note.reply as PackedNote; + const reply = note.reply; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts index 4bf0d02ed3..20061410c4 100644 --- a/src/server/api/stream/channels/local-timeline.ts +++ b/src/server/api/stream/channels/local-timeline.ts @@ -4,7 +4,6 @@ import Channel from '../channel'; import { fetchMeta } from '@/misc/fetch-meta'; import { Notes } from '@/models/index'; import { PackedNote } from '@/models/repositories/note'; -import { PackedUser } from '@/models/repositories/user'; import { checkWordMute } from '@/misc/check-word-mute'; import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; @@ -26,7 +25,7 @@ export default class extends Channel { @autobind private async onNote(note: PackedNote) { - if ((note.user as PackedUser).host !== null) return; + if (note.user.host !== null) return; if (note.visibility !== 'public') return; if (note.channelId != null && !this.followingChannels.has(note.channelId)) return; @@ -45,7 +44,7 @@ export default class extends Channel { // 関係ない返信は除外 if (note.reply) { - const reply = note.reply as PackedNote; + const reply = note.reply; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; } diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index 469f28f11c..f83bc9331e 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -165,8 +165,8 @@ export default class Connection { }; add(note); - if (note.reply) add(note.reply as PackedNote); - if (note.renote) add(note.renote as PackedNote); + if (note.reply) add(note.reply); + if (note.renote) add(note.renote); } @autobind diff --git a/src/services/chart/core.ts b/src/services/chart/core.ts index eee7d20efb..c0d3280c2b 100644 --- a/src/services/chart/core.ts +++ b/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 { Schema } from '@/misc/schema'; +import { SimpleSchema } from '@/misc/simple-schema'; import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm'; import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '@/prelude/time'; import { getChartInsertLock } from '@/misc/app-lock'; @@ -56,7 +56,7 @@ export default abstract class Chart> { diff: DeepPartial; group: string | null; }[] = []; - public schema: Schema; + public schema: SimpleSchema; protected repository: Repository; protected abstract genNewLog(latest: T): DeepPartial; @@ -69,7 +69,7 @@ export default abstract class Chart> { protected abstract fetchActual(group: string | null): Promise>; @autobind - private static convertSchemaToFlatColumnDefinitions(schema: Schema) { + private static convertSchemaToFlatColumnDefinitions(schema: SimpleSchema) { const columns = {} as any; const flatColumns = (x: Obj, path?: string) => { for (const [k, v] of Object.entries(x)) { @@ -181,7 +181,7 @@ export default abstract class Chart> { } @autobind - public static schemaToEntity(name: string, schema: Schema): EntitySchema { + public static schemaToEntity(name: string, schema: SimpleSchema): EntitySchema { return new EntitySchema({ name: `__chart__${camelToSnake(name)}`, columns: { @@ -211,7 +211,7 @@ export default abstract class Chart> { }); } - constructor(name: string, schema: Schema, grouped = false) { + constructor(name: string, schema: SimpleSchema, grouped = false) { this.name = name; this.schema = schema; const entity = Chart.schemaToEntity(name, schema); @@ -546,8 +546,8 @@ export default abstract class Chart> { } } -export function convertLog(logSchema: Schema): Schema { - const v: Schema = JSON.parse(JSON.stringify(logSchema)); // copy +export function convertLog(logSchema: SimpleSchema): SimpleSchema { + const v: SimpleSchema = JSON.parse(JSON.stringify(logSchema)); // copy if (v.type === 'number') { v.type = 'array'; v.items = { From 4beea63d3feb984706e4867bdfb2d0202d44ef8b Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 12 Sep 2021 22:43:54 +0900 Subject: [PATCH 08/51] =?UTF-8?q?GitHub=20Actions=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=97=E3=81=A6Docker=20Hub=E3=81=B8push=E3=81=99?= =?UTF-8?q?=E3=82=8B=E6=96=B9=E6=B3=95=20=E3=81=AE=E8=AA=AC=E6=98=8E=20(#7?= =?UTF-8?q?790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create push-docker-hub.ja.md * remove space --- docs/push-docker-hub.ja.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docs/push-docker-hub.ja.md diff --git a/docs/push-docker-hub.ja.md b/docs/push-docker-hub.ja.md new file mode 100644 index 0000000000..923e4c16e0 --- /dev/null +++ b/docs/push-docker-hub.ja.md @@ -0,0 +1,28 @@ +GitHub Actionsを使用してDocker Hubへpushする方法 +================================================================ + +[/.github/workflows/docker.yml](/.github/workflows/docker.yml) に +GitHub ActionによりDocker Hubへpushするワークフローが記述されています。 + +オリジナルリポジトリでは、リリースされたタイミングで `latest`, `<リリース名>` それぞれのタグでDocker Hubにpushされます。 +※ Docker Hub に`<ブランチ名>`のようなタグがあるかもしれませんが、こちらは自動push対象ではありません。 + +Fork先でこのワークフローを実行すると失敗します。 + +以下では、Fork先で自分のDocker Hubリポジトリにpushするようにする方法を記述します。 + +## 自分のDocker Hubリポジトリにpushするように設定する方法 + +1. Docker Hubでリポジトリを作成します。 +2. ワークフローファイルの [images](https://github.com/misskey-dev/misskey/blob/53f3b779bf16abcda4f6e026c51384f3b8fbcc62/.github/workflows/docker.yml#L20) を作成したリポジトリに置き換えます。 +3. GitHubにて [暗号化されたシークレット](https://docs.github.com/ja/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) を作成します。 + 作成が必要なのは `DOCKER_USERNAME` と `DOCKER_PASSWORD` で、それぞれDocker Hubのユーザーとパスワードになります。 + +## pushする方法 + +上記設定によりリリース時に自動的にDocker Hubにpushされるようになります。 +具体的には、GitHubのリリース機能でリリースしたタイミングで `latest`, `<リリース名>` それぞれのタグでDocker Hubにpushされます。 + +また、GitHub上から手動でpushすることも出来ます。 +それを行うには、Actions => Publish Docker image => Run workflow からbranchを選択してワークフローを実行します。 +ただし、この場合作成されるタグは`<ブランチ名>`になります。 From 987474726cce9485e0df552c2aea0cda8a1169ce Mon Sep 17 00:00:00 2001 From: sousuke0422 Date: Mon, 13 Sep 2021 20:07:39 +0900 Subject: [PATCH 09/51] =?UTF-8?q?chore:=20.config=E3=82=92docker=E3=82=A4?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=B8=E3=81=AB=E5=85=A5=E3=82=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=20(#7625)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * .configをdockerイメージに入れないように * Update docker-compose.yml Co-authored-by: tamaina Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: tamaina --- .dockerignore | 1 + docker-compose.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.dockerignore b/.dockerignore index 7cef84d940..9ed558a258 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,7 @@ .github .travis .vscode +.config Dockerfile build/ built/ diff --git a/docker-compose.yml b/docker-compose.yml index df648d291d..717b756c7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ services: - external_network volumes: - ./files:/misskey/files + - ./.config:/misskey/.config:ro redis: restart: always From 31d1edc0fb4b5c2d9009a6c954097617e73fa285 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 16 Sep 2021 22:04:47 +0900 Subject: [PATCH 10/51] update deps --- package.json | 30 +++--- yarn.lock | 289 ++++++++++++++++++++++++++++----------------------- 2 files changed, 175 insertions(+), 144 deletions(-) diff --git a/package.json b/package.json index 90914c76a9..514da0c7cc 100644 --- a/package.json +++ b/package.json @@ -104,9 +104,9 @@ "@types/websocket": "1.0.4", "@types/ws": "7.4.7", "@typescript-eslint/parser": "4.29.2", - "@vue/compiler-sfc": "3.2.4", + "@vue/compiler-sfc": "3.2.11", "abort-controller": "3.0.0", - "apexcharts": "3.27.3", + "apexcharts": "3.28.1", "autobind-decorator": "2.4.0", "autosize": "4.0.4", "autwh": "0.1.0", @@ -114,8 +114,8 @@ "bcryptjs": "2.4.3", "blurhash": "1.1.4", "broadcast-channel": "4.2.0", - "bull": "3.28.1", - "cacheable-lookup": "6.0.0", + "bull": "3.29.2", + "cacheable-lookup": "6.0.1", "cafy": "15.2.1", "cbor": "8.0.0", "chalk": "4.1.2", @@ -131,7 +131,7 @@ "dateformat": "4.5.1", "escape-regexp": "0.0.1", "eslint": "7.32.0", - "eslint-plugin-vue": "7.16.0", + "eslint-plugin-vue": "7.17.0", "eventemitter3": "4.0.7", "feed": "4.2.2", "file-type": "16.5.3", @@ -156,7 +156,7 @@ "json5-loader": "4.0.1", "jsonld": "5.2.0", "jsrsasign": "8.0.20", - "katex": "0.13.13", + "katex": "0.13.18", "koa": "2.13.1", "koa-bodyparser": "4.3.0", "koa-favicon": "2.1.0", @@ -190,7 +190,7 @@ "promise-limit": "2.7.0", "pug": "3.0.2", "punycode": "2.1.1", - "pureimage": "0.3.2", + "pureimage": "0.3.5", "qrcode": "1.4.4", "random-seed": "0.3.0", "ratelimiter": "3.4.1", @@ -204,16 +204,16 @@ "rimraf": "3.0.2", "rndstr": "1.0.0", "s-age": "1.1.2", - "sass": "1.38.0", + "sass": "1.41.0", "sass-loader": "12.1.0", "seedrandom": "3.0.5", - "sharp": "0.29.0", + "sharp": "0.29.1", "speakeasy": "2.0.0", "stringz": "2.1.0", "style-loader": "3.2.1", "summaly": "2.4.1", "syslog-pro": "1.0.0", - "systeminformation": "5.8.0", + "systeminformation": "5.9.2", "syuilo-password-strength": "0.0.1", "textarea-caret": "3.1.0", "three": "0.117.1", @@ -223,16 +223,16 @@ "ts-loader": "9.2.5", "ts-node": "10.2.1", "tsc-alias": "1.3.9", - "tsconfig-paths": "3.10.1", + "tsconfig-paths": "3.11.0", "tslint": "6.1.3", "tslint-sonarts": "1.9.0", "twemoji-parser": "13.1.0", "typeorm": "0.2.37", - "typescript": "4.3.5", + "typescript": "4.4.3", "ulid": "2.3.0", "uuid": "8.3.2", "v-debounce": "0.1.2", - "vue": "3.2.4", + "vue": "3.2.11", "vue-loader": "16.5.0", "vue-prism-editor": "2.0.0-alpha.2", "vue-router": "4.0.5", @@ -240,10 +240,10 @@ "vue-svg-loader": "0.17.0-beta.2", "vuedraggable": "4.0.1", "web-push": "3.4.5", - "webpack": "5.51.0", + "webpack": "5.52.1", "webpack-cli": "4.8.0", "websocket": "1.0.34", - "ws": "8.2.0", + "ws": "8.2.2", "xev": "2.0.1" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 8151dfe089..08563ec3c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,6 +21,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== +"@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== + "@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c" @@ -30,16 +35,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.0", "@babel/parser@^7.6.0", "@babel/parser@^7.9.6": +"@babel/parser@^7.15.0": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" + integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== + +"@babel/parser@^7.6.0", "@babel/parser@^7.9.6": version "7.13.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz#ca34cb95e1c2dd126863a84465ae8ef66114be99" integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw== -"@babel/parser@^7.13.9": - version "7.13.13" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df" - integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw== - "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.13.tgz#0a21452352b02542db0ffb928ac2d3ca7cb6d66d" @@ -47,7 +52,15 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/types@^7.12.0", "@babel/types@^7.13.0", "@babel/types@^7.6.1", "@babel/types@^7.9.6": +"@babel/types@^7.15.0": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" + integrity sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig== + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@babel/types@^7.6.1", "@babel/types@^7.9.6": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== @@ -690,6 +703,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.8.tgz#edf1bf1dbf4e04413ca8e5b17b3b7d7d54b59818" integrity sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/jsonld@1.5.6": version "1.5.6" resolved "https://registry.yarnpkg.com/@types/jsonld/-/jsonld-1.5.6.tgz#4396c0b17128abf5773bb68b5453b88fc565b0d4" @@ -1240,39 +1258,40 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== -"@vue/compiler-core@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.4.tgz#a98d295771998c1e8dccc4ee3d52feb14b02aea9" - integrity sha512-c8NuQq7mUXXxA4iqD5VUKpyVeklK53+DMbojYMyZ0VPPrb0BUWrZWFiqSDT+MFDv0f6Hv3QuLiHWb1BWMXBbrw== +"@vue/compiler-core@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.11.tgz#10af3777dba303ee7aae668029f131cb90391bee" + integrity sha512-bcbsLx5XyQg8WDDEGwmpX0BfEfv82wIs9fWFelpyVhNRGMaABvUTalYINyfhVT+jOqNaD4JBhJiVKd/8TmsHWg== dependencies: - "@babel/parser" "^7.12.0" - "@babel/types" "^7.12.0" - "@vue/shared" "3.2.4" - estree-walker "^2.0.1" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" + "@vue/shared" "3.2.11" + estree-walker "^2.0.2" source-map "^0.6.1" -"@vue/compiler-dom@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.4.tgz#3a43de243eba127abbe57e796a0b969d2df78c08" - integrity sha512-uj1nwO4794fw2YsYas5QT+FU/YGrXbS0Qk+1c7Kp1kV7idhZIghWLTjyvYibpGoseFbYLPd+sW2/noJG5H04EQ== +"@vue/compiler-dom@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.11.tgz#d066f8e1f1812b4e881593819ade0fe6d654c776" + integrity sha512-DNvhUHI/1Hn0/+ZYDYGAuDGasUm+XHKC3FE4GqkNCTO/fcLaJMRg/7eT1m1lkc7jPffUwwfh1rZru5mwzOjrNw== dependencies: - "@vue/compiler-core" "3.2.4" - "@vue/shared" "3.2.4" + "@vue/compiler-core" "3.2.11" + "@vue/shared" "3.2.11" -"@vue/compiler-sfc@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.4.tgz#9807868cc950291f163c3930a81bb16e870df097" - integrity sha512-GM+ouDdDzhqgkLmBH4bgq4kiZxJQArSppJiZHWHIx9XRaefHLmc1LBNPmN8ivm4SVfi2i7M2t9k8ZnjsScgzPQ== +"@vue/compiler-sfc@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.11.tgz#628fa12238760d9b9b339ac2e125a759224fadbf" + integrity sha512-cUIaS8mgJrQ6yucj2AupWAwBRITK3W/a8wCOn9g5fJGtOl8h4APY8vN3lzP8HIJDyEeRF3I8SfRhL+oX97kSnw== dependencies: - "@babel/parser" "^7.13.9" - "@babel/types" "^7.13.0" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" "@types/estree" "^0.0.48" - "@vue/compiler-core" "3.2.4" - "@vue/compiler-dom" "3.2.4" - "@vue/compiler-ssr" "3.2.4" - "@vue/shared" "3.2.4" + "@vue/compiler-core" "3.2.11" + "@vue/compiler-dom" "3.2.11" + "@vue/compiler-ssr" "3.2.11" + "@vue/ref-transform" "3.2.11" + "@vue/shared" "3.2.11" consolidate "^0.16.0" - estree-walker "^2.0.1" + estree-walker "^2.0.2" hash-sum "^2.0.0" lru-cache "^5.1.1" magic-string "^0.25.7" @@ -1282,42 +1301,53 @@ postcss-selector-parser "^6.0.4" source-map "^0.6.1" -"@vue/compiler-ssr@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.4.tgz#be51f219c2042b3e530373e60bc126ada6bb1cc0" - integrity sha512-bKZuXu9/4XwsFHFWIKQK+5kN7mxIIWmMmT2L4VVek7cvY/vm3p4WTsXYDGZJy0htOTXvM2ifr6sflg012T0hsw== +"@vue/compiler-ssr@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.11.tgz#702cef3429651645bdbe09fe5962803b5a621abb" + integrity sha512-+ptAdUlFDij+Z0VGCbRRkxQlNev5LkbZAntvkxrFjc08CTMhZmiV4Js48n2hAmuSXaKNEpmGkDGU26c/vf1+xw== dependencies: - "@vue/compiler-dom" "3.2.4" - "@vue/shared" "3.2.4" + "@vue/compiler-dom" "3.2.11" + "@vue/shared" "3.2.11" -"@vue/reactivity@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.4.tgz#a020ad7e50f674219a07764b105b5922e61597ea" - integrity sha512-ljWTR0hr8Tn09hM2tlmWxZzCBPlgGLnq/k8K8X6EcJhtV+C8OzFySnbWqMWataojbrQOocThwsC8awKthSl2uQ== +"@vue/reactivity@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.11.tgz#ec04d33acaf2b92cca2960535bec81b26cc5772b" + integrity sha512-hEQstxPQbgGZq5qApzrvbDmRdK1KP96O/j4XrwT8fVkT1ytkFs4fH2xNEh9QKwXfybbQkLs77W7OfXCv5o6qbA== dependencies: - "@vue/shared" "3.2.4" + "@vue/shared" "3.2.11" -"@vue/runtime-core@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.4.tgz#da5dde3dc1e48df99dd31ea9a972f5c02acdc3f5" - integrity sha512-W6PtEOs8P8jKYPo3JwaMAozZQivxInUleGfNwI2pK1t8ZLZIxn4kAf7p4VF4jJdQB8SZBzpfWdLUc06j7IOmpQ== +"@vue/ref-transform@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/ref-transform/-/ref-transform-3.2.11.tgz#4d282b9570d1485a73e7bf5d57cce27b4a7aa690" + integrity sha512-7rX0YsfYb7+1PeKPME1tQyUQcQgt0sIXRRnPD1Vw8Zs2KIo90YLy9CrvwalcRCxGw0ScsjBEhVjJtWIT79TElg== dependencies: - "@vue/reactivity" "3.2.4" - "@vue/shared" "3.2.4" + "@babel/parser" "^7.15.0" + "@vue/compiler-core" "3.2.11" + "@vue/shared" "3.2.11" + estree-walker "^2.0.2" + magic-string "^0.25.7" -"@vue/runtime-dom@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.4.tgz#1025595f2ae99a12fe0e1e6bce8df6761efec24b" - integrity sha512-HcVtLyn2SGwsf6BFPwkvDPDOhOqkOKcfHDpBp5R1coX+qMsOFrY8lJnGXIY+JnxqFjND00E9+u+lq5cs/W7ooA== +"@vue/runtime-core@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.11.tgz#0dbe801be4bd0bfde253226797e7d304c8fdda30" + integrity sha512-horlxjWwSvModC87WdsWswzzHE5IexmKkQA65S5vFgP5hLUBW+HRyScDeuB/RRcFmqnf+ozacNCfap0kqcpODw== dependencies: - "@vue/runtime-core" "3.2.4" - "@vue/shared" "3.2.4" + "@vue/reactivity" "3.2.11" + "@vue/shared" "3.2.11" + +"@vue/runtime-dom@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.11.tgz#04f9054a9e64bdf156c2fc22cad67cfaa8b84616" + integrity sha512-cOK1g0INdiCbds2xrrJKrrN+pDHuLz6esUs/crdEiupDuX7IeiMbdqrAQCkYHp5P1KLWcbGlkmwfVD7HQGii0Q== + dependencies: + "@vue/runtime-core" "3.2.11" + "@vue/shared" "3.2.11" csstype "^2.6.8" -"@vue/shared@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.4.tgz#ba2a09527afff27b28d08f921b4a597e9504ca7a" - integrity sha512-j2j1MRmjalVKr3YBTxl/BClSIc8UQ8NnPpLYclxerK65JIowI4O7n8O8lElveEtEoHxy1d7BelPUDI0Q4bumqg== +"@vue/shared@3.2.11": + version "3.2.11" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.11.tgz#01899f54949caf1ac241de397bd17069632574de" + integrity sha512-ovfXAsSsCvV9JVceWjkqC/7OF5HbgLOtCWjCIosmPGG8lxbPuavhIxRH1dTx4Dg9xLgRTNLvI3pVxG4ItQZekg== "@webassemblyjs/ast@1.11.0": version "1.11.0" @@ -1812,10 +1842,10 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" -apexcharts@3.27.3: - version "3.27.3" - resolved "https://registry.yarnpkg.com/apexcharts/-/apexcharts-3.27.3.tgz#1b921ac64dea2f28a2b1aad4b396b38464223849" - integrity sha512-1ZrqiQT0VahkqW0kVjf5QVURYGaHMlGN08BoIZG2c2U/gY2AtnEoFN4r9q4d/pYYYKvI9AyLBHq0otzcVGrHAw== +apexcharts@3.28.1: + version "3.28.1" + resolved "https://registry.yarnpkg.com/apexcharts/-/apexcharts-3.28.1.tgz#35a17ea9ef9a1a93fb01ce79d245af8aedb59a7b" + integrity sha512-5M1KitI/XmY2Sx6ih9vQOXyQUTmotDG/cML2N6bkBlVseF10RPSzM7dkrf7Y68apSZF6e7J581gXXu1+qkLhCA== dependencies: svg.draggable.js "^2.2.2" svg.easing.js "^2.0.0" @@ -2413,10 +2443,10 @@ builtin-modules@^1.1.1: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -bull@3.28.1: - version "3.28.1" - resolved "https://registry.yarnpkg.com/bull/-/bull-3.28.1.tgz#33bc7bbe640e71258a2a800935a692a24a2d7236" - integrity sha512-TasVWD1410Q8druRG6SIAN5hwAT3F4QICcGszReD859qAerq+VwbW3vPg6lV60reJkWyWBK11FHa2FsQ8iDBmQ== +bull@3.29.2: + version "3.29.2" + resolved "https://registry.yarnpkg.com/bull/-/bull-3.29.2.tgz#30051fd14c7214b1e90c212585674f77fd982650" + integrity sha512-zWHyza/ElwVvJUqIEDJdUhGKd1V9EHjituUL7sJAmJoxS9Z7QMhYcMOWcgbUlWPgtiKN1g9ZlOtFAoq7C4/SQw== dependencies: cron-parser "^2.13.0" debuglog "^1.0.0" @@ -2488,10 +2518,10 @@ cache-content-type@^1.0.0: mime-types "^2.1.18" ylru "^1.2.0" -cacheable-lookup@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.0.0.tgz#6fd7e364a0929ee50af00843aaf6e31b9b9f200e" - integrity sha512-5qeyMn8/BERrUPdIfcOLkdMrwltVbxIpgnYM61OLWOg3BuSSh9HrkUtTTRxYthQpBrocvYqD0tJ7vU0y6T7OWw== +cacheable-lookup@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.0.1.tgz#f32ab50c3212302d9f49aa094c8a7593c162af7c" + integrity sha512-vaccXt7hUfa5UzrtbdzHTWnL6V6ir39QtLuvGZys32j4HboAeiWVhrcdAm8ecTz1rLubxPhec2n22BBb5/dgVA== cacheable-lookup@^5.0.3: version "5.0.3" @@ -4245,10 +4275,10 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-plugin-vue@7.16.0: - version "7.16.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.16.0.tgz#7fe9fea039a190b108319c1380adf543ef57707d" - integrity sha512-0E2dVvVC7I2Xm1HXyx+ZwPj9CNX4NJjs4K4r+GVsHWyt5Pew3JLD4fI7A91b2jeL0TXE7LlszrwLSTJU9eqehw== +eslint-plugin-vue@7.17.0: + version "7.17.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.17.0.tgz#41e0bdb5effca5ee26f087f924be987eb41ef573" + integrity sha512-Rq5R2QetDCgC+kBFQw1+aJ5B93tQ4xqZvoCUxuIzwTonngNArsdP8ChM8PowIzsJvRtWl4ltGh/bZcN3xhFWSw== dependencies: eslint-utils "^2.1.0" natural-compare "^1.4.0" @@ -4388,10 +4418,10 @@ estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== -estree-walker@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.1.tgz#f8e030fb21cefa183b44b7ad516b747434e7a3e0" - integrity sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg== +estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== esutils@^2.0.2: version "2.0.3" @@ -6356,7 +6386,7 @@ json5-loader@4.0.1: loader-utils "^2.0.0" schema-utils "^3.0.0" -json5@2.2.0, json5@^2.2.0: +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== @@ -6441,10 +6471,10 @@ jws@^4.0.0: jwa "^2.0.0" safe-buffer "^5.0.1" -katex@0.13.13: - version "0.13.13" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.13.13.tgz#15a796e95516869bc6d483443b58b2df872ee40f" - integrity sha512-cCMcil4jwMm7behpXGiQfXJA29sko/Gd/26iCsr53Dv5Jn2iHbHyEb14dm9uVrIijUXx6Zz1WhlFhHE6DckvkQ== +katex@0.13.18: + version "0.13.18" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.13.18.tgz#ba89e8e4b70cc2325e25e019a62b9fe71e5c2931" + integrity sha512-a3dC4NSVSDU3O1WZbTnOiA8rVNJ2lSiomOl0kmckCIGObccIHXof7gAseIY0o1gjEspe+34ZeSEX2D1ChFKIvA== dependencies: commander "^6.0.0" @@ -7488,10 +7518,10 @@ node-abi@^2.21.0: dependencies: semver "^5.4.1" -node-addon-api@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.0.0.tgz#ac128f43eff7fac4b5f5ef2f39d6d7c2709efead" - integrity sha512-ALmRVBFzfwldBfk3SbKfl6+PVMXiCPKZBEfsJqB/EjXAMAI+MfFrEHR+GMRBuI162DihZ1QjEZ8ieYKuRCJ8Hg== +node-addon-api@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.1.0.tgz#f1722f1f60793584632ffffb79e12ca042c48bd0" + integrity sha512-Zz1o1BDX2VtduiAt6kgiUl8jX1Vm3NMboljFYKQJ6ee8AGfiTvM2mlZFI3xPbqjs80rCQgiVJI/DjQ/1QJ0HwA== node-fetch@2.6.1, node-fetch@^2.6.1: version "2.6.1" @@ -9113,10 +9143,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.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/pureimage/-/pureimage-0.3.2.tgz#3cae06abaf2735e806c089bcbd188e3c7926bf2e" - integrity sha512-9gcx43yMuqG3Oe5uhRKk29HHZS0eE6pnDv+VJnWGScU99Cd4aDvHSUkqmbppNAXRrGjWjRiTutXW/iGLPpA3tQ== +pureimage@0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/pureimage/-/pureimage-0.3.5.tgz#cd5e91f7b6409fcf4880297aaa3e7fc0afc24d5e" + integrity sha512-+CFUEpoX6GemlKlHihI7Ii4IqKqF5KZjd682sAxwzbc4t4zU4Gwhxd4W3UMZW94nJzf0n4nA9zJrwTR4jZB4TA== dependencies: jpeg-js "^0.4.1" opentype.js "^0.4.3" @@ -9733,10 +9763,10 @@ sass-loader@12.1.0: klona "^2.0.4" neo-async "^2.6.2" -sass@1.38.0: - version "1.38.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.38.0.tgz#2f3e60a1efdcdc910586fa79dc89d3399a145b4f" - integrity sha512-WBccZeMigAGKoI+NgD7Adh0ab1HUq+6BmyBUEaGxtErbUtWUevEbdgo5EZiJQofLUGcKtlNaO2IdN73AHEua5g== +sass@1.41.0: + version "1.41.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.41.0.tgz#f7b41dc00336a4c03429c37b9680b86758af61d4" + integrity sha512-wb8nT60cjo9ZZMcHzG7TzdbFtCAmHEKWrH+zAdScPb4ZxL64WQBnGdbp5nwlenW5wJPcHva1JWmVa0h6iqA5eg== dependencies: chokidar ">=3.0.0 <4.0.0" @@ -9880,14 +9910,14 @@ shallow-clone@^3.0.0: dependencies: kind-of "^6.0.2" -sharp@0.29.0: - version "0.29.0" - resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.29.0.tgz#1fa302bd5f60292138c823aa0905609f64d710ba" - integrity sha512-mdN1Up0eN+SwyForPls59dWO0nx64J1XRQYy5ZiKSADAccGYCB10UAGJHSVG9VObzJdhHqrVJzQcq6gx8USyoA== +sharp@0.29.1: + version "0.29.1" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.29.1.tgz#f60b50f24f399464a24187c86bd2da41aae50b85" + integrity sha512-DpgdAny9TuS+oWCQ7MRS8XyY9x6q1+yW3a5wNx0J3HrGuB/Jot/8WcT+lElHY9iJu2pwtegSGxqMaqFiMhs4rQ== dependencies: color "^4.0.1" detect-libc "^1.0.3" - node-addon-api "^4.0.0" + node-addon-api "^4.1.0" prebuild-install "^6.1.4" semver "^7.3.5" simple-get "^3.1.0" @@ -10598,10 +10628,10 @@ syslog-pro@1.0.0: dependencies: moment "^2.22.2" -systeminformation@5.8.0: - version "5.8.0" - resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.8.0.tgz#43e6d0918d7d42c65e53e36059f0849354ab2873" - integrity sha512-l4drbK2PtNynGKblaShY9hDLW/gg1zxUq2+Yk4gTyd6a2JUvFyTGP8PhHV9iOh+MzS25PQa8W1t0kvcIvr9n7Q== +systeminformation@5.9.2: + version "5.9.2" + resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.9.2.tgz#c8483afa2f957fa4bbb54b1c148be71d1b2df256" + integrity sha512-KfW+dwGx4NX2J08IKeeptKnA8NioKB6YVDeqkvIVL+5GQfHSVenoA6Y9h8EnYall52OrOOggGTap0xbZH7pyUQ== syuilo-password-strength@0.0.1: version "0.0.1" @@ -10981,12 +11011,13 @@ tsc-alias@1.3.9: globby "^11.0.2" normalize-path "^3.0.0" -tsconfig-paths@3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz#79ae67a68c15289fdf5c51cb74f397522d795ed7" - integrity sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q== +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== dependencies: - json5 "^2.2.0" + "@types/json5" "^0.0.29" + json5 "^1.0.1" minimist "^1.2.0" strip-bom "^3.0.0" @@ -11169,10 +11200,10 @@ typeorm@0.2.37: yargs "^17.0.1" zen-observable-ts "^1.0.0" -typescript@4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" - integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== +typescript@4.4.3: + version "4.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324" + integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -11535,14 +11566,14 @@ vue-svg-loader@0.17.0-beta.2: semver "^7.3.2" svgo "^1.3.2" -vue@3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.4.tgz#d94d88675e41c050d3a722d0848a7063b5e87a60" - integrity sha512-rNCFmoewm8IwmTK0nj3ysKq53iRpNEFKoBJ4inar6tIh7Oj7juubS39RI8UI+VE7x+Cs2z6PBsadtZu7z2qppg== +vue@3.2.11: + version "3.2.11" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.11.tgz#6b92295048df705ddac558fd3e3ed553e55e57c8" + integrity sha512-JkI3/eIgfk4E0f/p319TD3EZgOwBQfftgnkRsXlT7OrRyyiyoyUXn6embPGZXSBxD3LoZ9SWhJoxLhFh5AleeA== dependencies: - "@vue/compiler-dom" "3.2.4" - "@vue/runtime-dom" "3.2.4" - "@vue/shared" "3.2.4" + "@vue/compiler-dom" "3.2.11" + "@vue/runtime-dom" "3.2.11" + "@vue/shared" "3.2.11" vuedraggable@4.0.1: version "4.0.1" @@ -11654,10 +11685,10 @@ webpack-sources@^3.2.0: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.0.tgz#b16973bcf844ebcdb3afde32eda1c04d0b90f89d" integrity sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw== -webpack@5.51.0: - version "5.51.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.51.0.tgz#b6683d92e4bd84db588bacb6ade6441d9c5fd2f3" - integrity sha512-oySQoKUuf5r0JaPIYi8q90c/GmU9fGdSbZ0cAjFq3OWx57wniRTWvta1T9t+e5WZ6H6mHrxksNatkqfIEuTWGg== +webpack@5.52.1: + version "5.52.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.52.1.tgz#2dc1d9029ecb7acfb80da7bf67baab67baa517a7" + integrity sha512-wkGb0hLfrS7ML3n2xIKfUIwHbjB6gxwQHyLmVHoAqEQBw+nWo+G6LoHL098FEXqahqximsntjBLuewStrnJk0g== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" @@ -11856,10 +11887,10 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -ws@8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.0.tgz#0b738cd484bfc9303421914b11bb4011e07615bb" - integrity sha512-uYhVJ/m9oXwEI04iIVmgLmugh2qrZihkywG9y5FfZV2ATeLIzHf93qs+tUNqlttbQK957/VX3mtwAS+UfIwA4g== +ws@8.2.2: + version "8.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.2.tgz#ca684330c6dd6076a737250ed81ac1606cb0a63e" + integrity sha512-Q6B6H2oc8QY3llc3cB8kVmQ6pnJWVQbP7Q5algTcIxx7YEpc0oU4NBVHlztA7Ekzfhw2r0rPducMUiCGWKQRzw== ws@^7.4.6: version "7.5.3" From d252514a3992c5257f24d6d82c7cc7d9d2c889a1 Mon Sep 17 00:00:00 2001 From: NoriDev <11006910+noridev@users.noreply.github.com> Date: Fri, 17 Sep 2021 20:00:31 +0900 Subject: [PATCH 11/51] =?UTF-8?q?popup=E3=81=A7=E8=A8=AD=E5=AE=9A=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=81=A8=E3=80=81=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=AE=E5=89=8A=E9=99=A4=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB?= =?UTF-8?q?=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9=E3=81=99=E3=82=8B=E3=81=93?= =?UTF-8?q?=E3=81=A8=E3=81=8C=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20(#7797)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/client/pages/settings/other.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff0a0e6b60..f1caad4304 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - リモートユーザーのDeleteアクティビティに対応 ### Bugfixes +- popupで設定ページを表示すると、アカウントの削除ページにアクセスすることができない問題を修正 ## 12.90.1 (2021/09/05) diff --git a/src/client/pages/settings/other.vue b/src/client/pages/settings/other.vue index 6857950350..21b5439041 100644 --- a/src/client/pages/settings/other.vue +++ b/src/client/pages/settings/other.vue @@ -26,7 +26,7 @@ BIOS CLI - {{ $ts.closeAccount }} + {{ $ts.closeAccount }} From 361069314ffaa61a81b2189c2eec000a3d1d9c35 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 17 Sep 2021 22:39:15 +0900 Subject: [PATCH 12/51] Refine UI (#7806) * wip * wip * wip * wip * wip * wip * wip * wip * Update default.vue * wip --- src/client/components/global/avatar.vue | 26 ++++ src/client/components/ui/folder.vue | 3 +- src/client/components/ui/input.vue | 2 +- src/client/components/ui/textarea.vue | 2 +- src/client/init.ts | 4 +- src/client/pages/emojis.category.vue | 134 +++++++++++++++++++++ src/client/pages/emojis.emoji.vue | 92 +++++++++++++++ src/client/pages/emojis.vue | 139 ++-------------------- src/client/pages/favorites.vue | 3 +- src/client/pages/note.vue | 150 ++++++++++++------------ src/client/pages/notifications.vue | 1 + src/client/pages/settings/index.vue | 3 +- src/client/pages/timeline.vue | 128 ++++++-------------- src/client/pages/user/index.vue | 93 ++++----------- src/client/style.scss | 1 - src/client/themes/_dark.json5 | 2 +- src/client/themes/_light.json5 | 2 +- src/client/ui/_common_/header.vue | 99 ++++++++++++++-- src/client/ui/default.vue | 11 +- src/client/ui/universal.vue | 8 +- 20 files changed, 517 insertions(+), 386 deletions(-) create mode 100644 src/client/pages/emojis.category.vue create mode 100644 src/client/pages/emojis.emoji.vue diff --git a/src/client/components/global/avatar.vue b/src/client/components/global/avatar.vue index eea970ec9a..395ed5d8ce 100644 --- a/src/client/components/global/avatar.vue +++ b/src/client/components/global/avatar.vue @@ -73,6 +73,22 @@ export default defineComponent({ diff --git a/src/client/components/ui/folder.vue b/src/client/components/ui/folder.vue index 1f3593a74a..eecf1d8be1 100644 --- a/src/client/components/ui/folder.vue +++ b/src/client/components/ui/folder.vue @@ -99,7 +99,8 @@ export default defineComponent({ z-index: 10; position: sticky; top: var(--stickyTop, 0px); - background: var(--panel); + padding: var(--x-padding); + background: var(--x-header, var(--panel)); /* TODO panelの半透明バージョンをプログラマティックに作りたい background: var(--X17); -webkit-backdrop-filter: var(--blur, blur(8px)); diff --git a/src/client/components/ui/input.vue b/src/client/components/ui/input.vue index 05ce5d3e15..a916a0b035 100644 --- a/src/client/components/ui/input.vue +++ b/src/client/components/ui/input.vue @@ -245,7 +245,7 @@ export default defineComponent({ font-size: 1em; color: var(--fg); background: var(--panel); - border: solid 1px var(--inputBorder); + border: solid 0.5px var(--inputBorder); border-radius: 6px; outline: none; box-shadow: none; diff --git a/src/client/components/ui/textarea.vue b/src/client/components/ui/textarea.vue index 53a141f011..08ac3182a9 100644 --- a/src/client/components/ui/textarea.vue +++ b/src/client/components/ui/textarea.vue @@ -212,7 +212,7 @@ export default defineComponent({ font-size: 1em; color: var(--fg); background: var(--panel); - border: solid 1px var(--inputBorder); + border: solid 0.5px var(--inputBorder); border-radius: 6px; outline: none; box-shadow: none; diff --git a/src/client/init.ts b/src/client/init.ts index 4d2170e03f..aa9cd817c4 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -15,7 +15,7 @@ if (localStorage.getItem('accounts') != null) { import * as Sentry from '@sentry/browser'; import { Integrations } from '@sentry/tracing'; -import { computed, createApp, watch, markRaw } from 'vue'; +import { computed, createApp, watch, markRaw, version as vueVersion } from 'vue'; import compareVersions from 'compare-versions'; import widgets from '@client/widgets'; @@ -47,6 +47,8 @@ window.onunhandledrejection = null; if (_DEV_) { console.warn('Development mode!!!'); + console.info(`vue ${vueVersion}`); + (window as any).$i = $i; (window as any).$store = defaultStore; diff --git a/src/client/pages/emojis.category.vue b/src/client/pages/emojis.category.vue new file mode 100644 index 0000000000..0c24b06d16 --- /dev/null +++ b/src/client/pages/emojis.category.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/src/client/pages/emojis.emoji.vue b/src/client/pages/emojis.emoji.vue new file mode 100644 index 0000000000..3c9bb4debe --- /dev/null +++ b/src/client/pages/emojis.emoji.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/client/pages/emojis.vue b/src/client/pages/emojis.vue index 391aff8297..c1f87047d3 100644 --- a/src/client/pages/emojis.vue +++ b/src/client/pages/emojis.vue @@ -1,151 +1,30 @@ diff --git a/src/client/pages/favorites.vue b/src/client/pages/favorites.vue index a2d61b98d9..f13723c2d1 100644 --- a/src/client/pages/favorites.vue +++ b/src/client/pages/favorites.vue @@ -22,7 +22,8 @@ export default defineComponent({ return { [symbols.PAGE_INFO]: { title: this.$ts.favorites, - icon: 'fas fa-star' + icon: 'fas fa-star', + bg: 'var(--bg)', }, pagination: { endpoint: 'i/favorites', diff --git a/src/client/pages/note.vue b/src/client/pages/note.vue index 7725ca14b4..fe85d7364e 100644 --- a/src/client/pages/note.vue +++ b/src/client/pages/note.vue @@ -1,37 +1,39 @@ @@ -63,12 +65,14 @@ export default defineComponent({ return { [symbols.PAGE_INFO]: computed(() => this.note ? { title: this.$ts.note, + subtitle: new Date(this.note.createdAt).toLocaleString(), avatar: this.note.user, path: `/notes/${this.note.id}`, share: { title: this.$t('noteOf', { user: this.note.user.name }), text: this.note.text, }, + bg: 'var(--bg)', } : null), note: null, clips: null, @@ -149,52 +153,54 @@ export default defineComponent({ .fcuexfpr { background: var(--bg); - > .note { - > .main { - > .load { - min-width: 0; - margin: 0 auto; - border-radius: 999px; + > ._root { + > .note { + > .main { + > .load { + min-width: 0; + margin: 0 auto; + border-radius: 999px; - &.next { - margin-bottom: var(--margin); - } - - &.prev { - margin-top: var(--margin); - } - } - - > .note { - > .note { - border-radius: var(--radius); - background: var(--panel); - } - } - - > .clips { - > .title { - font-weight: bold; - padding: 12px; - } - - > .item { - display: block; - padding: 16px; - - > .description { - padding: 8px 0; + &.next { + margin-bottom: var(--margin); } - > .user { - $height: 32px; - padding-top: 16px; - border-top: solid 0.5px var(--divider); - line-height: $height; + &.prev { + margin-top: var(--margin); + } + } - > .avatar { - width: $height; - height: $height; + > .note { + > .note { + border-radius: var(--radius); + background: var(--panel); + } + } + + > .clips { + > .title { + font-weight: bold; + padding: 12px; + } + + > .item { + display: block; + padding: 16px; + + > .description { + padding: 8px 0; + } + + > .user { + $height: 32px; + padding-top: 16px; + border-top: solid 0.5px var(--divider); + line-height: $height; + + > .avatar { + width: $height; + height: $height; + } } } } diff --git a/src/client/pages/notifications.vue b/src/client/pages/notifications.vue index 633718a90b..06f8ad3cba 100644 --- a/src/client/pages/notifications.vue +++ b/src/client/pages/notifications.vue @@ -21,6 +21,7 @@ export default defineComponent({ [symbols.PAGE_INFO]: { title: this.$ts.notifications, icon: 'fas fa-bell', + bg: 'var(--bg)', actions: [{ text: this.$ts.markAllAsRead, icon: 'fas fa-check', diff --git a/src/client/pages/settings/index.vue b/src/client/pages/settings/index.vue index e7e2506020..3fb5f5f1e6 100644 --- a/src/client/pages/settings/index.vue +++ b/src/client/pages/settings/index.vue @@ -86,7 +86,8 @@ export default defineComponent({ setup(props, context) { const indexInfo = { title: i18n.locale.settings, - icon: 'fas fa-cog' + icon: 'fas fa-cog', + bg: 'var(--bg)', }; const INFO = ref(indexInfo); const page = ref(props.initialPage); diff --git a/src/client/pages/timeline.vue b/src/client/pages/timeline.vue index f54549b982..125191223c 100644 --- a/src/client/pages/timeline.vue +++ b/src/client/pages/timeline.vue @@ -1,25 +1,10 @@