From cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 29 Mar 2018 20:32:18 +0900 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.ts | 31 +- src/{server/web => client}/app/animation.styl | 0 src/{server/web => client}/app/app.styl | 0 src/{server/web => client}/app/app.vue | 0 .../web => client}/app/auth/assets/logo.svg | 0 src/{server/web => client}/app/auth/script.ts | 0 .../web => client}/app/auth/style.styl | 0 .../web => client}/app/auth/views/form.vue | 0 .../web => client}/app/auth/views/index.vue | 0 src/{server/web => client}/app/base.pug | 6 +- src/{server/web => client}/app/boot.js | 0 src/{server/web => client}/app/ch/script.ts | 0 src/{server/web => client}/app/ch/style.styl | 0 .../web => client}/app/ch/tags/channel.tag | 0 .../web => client}/app/ch/tags/header.tag | 0 .../web => client}/app/ch/tags/index.tag | 0 .../web => client}/app/ch/tags/index.ts | 0 .../app/common/define-widget.ts | 0 src/{server/web => client}/app/common/mios.ts | 0 .../app/common/scripts/check-for-update.ts | 0 .../common/scripts/compose-notification.ts | 0 .../app/common/scripts/contains.ts | 0 .../app/common/scripts/copy-to-clipboard.ts | 0 .../app/common/scripts/date-stringify.ts | 0 .../app/common/scripts/fuck-ad-block.ts | 0 .../web => client}/app/common/scripts/gcd.ts | 0 .../app/common/scripts/get-kao.ts | 0 .../app/common/scripts/get-median.ts | 0 .../app/common/scripts/loading.ts | 0 .../app/common/scripts/parse-search-query.ts | 0 .../app/common/scripts/streaming/channel.ts | 0 .../app/common/scripts/streaming/drive.ts | 0 .../app/common/scripts/streaming/home.ts | 0 .../scripts/streaming/messaging-index.ts | 0 .../app/common/scripts/streaming/messaging.ts | 0 .../common/scripts/streaming/othello-game.ts | 0 .../app/common/scripts/streaming/othello.ts | 0 .../app/common/scripts/streaming/requests.ts | 0 .../app/common/scripts/streaming/server.ts | 0 .../scripts/streaming/stream-manager.ts | 0 .../app/common/scripts/streaming/stream.ts | 0 .../common/views/components/autocomplete.vue | 0 .../connect-failed.troubleshooter.vue | 0 .../views/components/connect-failed.vue | 0 .../app/common/views/components/ellipsis.vue | 0 .../views/components/file-type-icon.vue | 0 .../app/common/views/components/forkit.vue | 0 .../app/common/views/components/index.ts | 0 .../common/views/components/media-list.vue | 0 .../views/components/messaging-room.form.vue | 0 .../components/messaging-room.message.vue | 0 .../views/components/messaging-room.vue | 0 .../app/common/views/components/messaging.vue | 0 .../app/common/views/components/nav.vue | 0 .../common/views/components/othello.game.vue | 0 .../views/components/othello.gameroom.vue | 0 .../common/views/components/othello.room.vue | 0 .../app/common/views/components/othello.vue | 0 .../common/views/components/poll-editor.vue | 0 .../app/common/views/components/poll.vue | 0 .../app/common/views/components/post-html.ts | 0 .../app/common/views/components/post-menu.vue | 0 .../common/views/components/reaction-icon.vue | 0 .../views/components/reaction-picker.vue | 0 .../views/components/reactions-viewer.vue | 0 .../app/common/views/components/signin.vue | 0 .../app/common/views/components/signup.vue | 0 .../views/components/special-message.vue | 0 .../views/components/stream-indicator.vue | 0 .../app/common/views/components/switch.vue | 0 .../app/common/views/components/time.vue | 0 .../app/common/views/components/timer.vue | 0 .../views/components/twitter-setting.vue | 0 .../app/common/views/components/uploader.vue | 0 .../common/views/components/url-preview.vue | 0 .../app/common/views/components/url.vue | 0 .../views/components/welcome-timeline.vue | 0 .../common/views/directives/autocomplete.ts | 0 .../app/common/views/directives/index.ts | 0 .../app/common/views/filters/bytes.ts | 0 .../app/common/views/filters/index.ts | 0 .../app/common/views/filters/number.ts | 0 .../app/common/views/widgets/access-log.vue | 0 .../app/common/views/widgets/broadcast.vue | 0 .../app/common/views/widgets/calendar.vue | 0 .../app/common/views/widgets/donation.vue | 0 .../app/common/views/widgets/index.ts | 0 .../app/common/views/widgets/nav.vue | 0 .../app/common/views/widgets/photo-stream.vue | 0 .../app/common/views/widgets/rss.vue | 0 .../views/widgets/server.cpu-memory.vue | 0 .../app/common/views/widgets/server.cpu.vue | 0 .../app/common/views/widgets/server.disk.vue | 0 .../app/common/views/widgets/server.info.vue | 0 .../common/views/widgets/server.memory.vue | 0 .../app/common/views/widgets/server.pie.vue | 0 .../common/views/widgets/server.uptimes.vue | 0 .../app/common/views/widgets/server.vue | 0 .../app/common/views/widgets/slideshow.vue | 0 .../app/common/views/widgets/tips.vue | 0 .../app/common/views/widgets/version.vue | 0 src/{server/web => client}/app/config.ts | 0 .../app/desktop/api/choose-drive-file.ts | 0 .../app/desktop/api/choose-drive-folder.ts | 0 .../app/desktop/api/contextmenu.ts | 0 .../web => client}/app/desktop/api/dialog.ts | 0 .../web => client}/app/desktop/api/input.ts | 0 .../web => client}/app/desktop/api/notify.ts | 0 .../web => client}/app/desktop/api/post.ts | 0 .../app/desktop/api/update-avatar.ts | 0 .../app/desktop/api/update-banner.ts | 0 .../app/desktop/assets/grid.svg | 0 .../app/desktop/assets/header-logo-white.svg | 0 .../app/desktop/assets/header-logo.svg | 0 .../app/desktop/assets/index.jpg | Bin .../app/desktop/assets/remove.png | Bin .../web => client}/app/desktop/script.ts | 0 .../web => client}/app/desktop/style.styl | 0 .../web => client}/app/desktop/ui.styl | 0 .../views/components/activity.calendar.vue | 0 .../views/components/activity.chart.vue | 0 .../app/desktop/views/components/activity.vue | 0 .../desktop/views/components/analog-clock.vue | 0 .../app/desktop/views/components/calendar.vue | 0 .../choose-file-from-drive-window.vue | 0 .../choose-folder-from-drive-window.vue | 0 .../views/components/context-menu.menu.vue | 0 .../desktop/views/components/context-menu.vue | 0 .../desktop/views/components/crop-window.vue | 0 .../app/desktop/views/components/dialog.vue | 0 .../desktop/views/components/drive-window.vue | 0 .../desktop/views/components/drive.file.vue | 0 .../desktop/views/components/drive.folder.vue | 0 .../views/components/drive.nav-folder.vue | 0 .../app/desktop/views/components/drive.vue | 0 .../views/components/ellipsis-icon.vue | 0 .../views/components/follow-button.vue | 0 .../views/components/followers-window.vue | 0 .../desktop/views/components/followers.vue | 0 .../views/components/following-window.vue | 0 .../desktop/views/components/following.vue | 0 .../views/components/friends-maker.vue | 0 .../desktop/views/components/game-window.vue | 0 .../app/desktop/views/components/home.vue | 0 .../app/desktop/views/components/index.ts | 0 .../desktop/views/components/input-dialog.vue | 0 .../views/components/media-image-dialog.vue | 0 .../desktop/views/components/media-image.vue | 0 .../views/components/media-video-dialog.vue | 0 .../desktop/views/components/media-video.vue | 0 .../app/desktop/views/components/mentions.vue | 0 .../components/messaging-room-window.vue | 0 .../views/components/messaging-window.vue | 0 .../views/components/notifications.vue | 0 .../views/components/post-detail.sub.vue | 0 .../desktop/views/components/post-detail.vue | 0 .../views/components/post-form-window.vue | 0 .../desktop/views/components/post-form.vue | 0 .../desktop/views/components/post-preview.vue | 0 .../views/components/posts.post.sub.vue | 0 .../desktop/views/components/posts.post.vue | 0 .../app/desktop/views/components/posts.vue | 0 .../views/components/progress-dialog.vue | 0 .../views/components/repost-form-window.vue | 0 .../desktop/views/components/repost-form.vue | 0 .../views/components/settings-window.vue | 0 .../desktop/views/components/settings.2fa.vue | 0 .../desktop/views/components/settings.api.vue | 0 .../views/components/settings.apps.vue | 0 .../views/components/settings.drive.vue | 0 .../views/components/settings.mute.vue | 0 .../views/components/settings.password.vue | 0 .../views/components/settings.profile.vue | 0 .../views/components/settings.signins.vue | 0 .../app/desktop/views/components/settings.vue | 0 .../views/components/sub-post-content.vue | 0 .../desktop/views/components/taskmanager.vue | 0 .../app/desktop/views/components/timeline.vue | 0 .../views/components/ui-notification.vue | 0 .../views/components/ui.header.account.vue | 0 .../views/components/ui.header.clock.vue | 0 .../views/components/ui.header.nav.vue | 0 .../components/ui.header.notifications.vue | 0 .../views/components/ui.header.post.vue | 0 .../views/components/ui.header.search.vue | 0 .../desktop/views/components/ui.header.vue | 0 .../app/desktop/views/components/ui.vue | 0 .../desktop/views/components/user-preview.vue | 0 .../views/components/users-list.item.vue | 0 .../desktop/views/components/users-list.vue | 0 .../views/components/widget-container.vue | 0 .../app/desktop/views/components/window.vue | 0 .../app/desktop/views/directives/index.ts | 0 .../desktop/views/directives/user-preview.ts | 0 .../app/desktop/views/pages/drive.vue | 0 .../desktop/views/pages/home-customize.vue | 0 .../app/desktop/views/pages/home.vue | 0 .../app/desktop/views/pages/index.vue | 0 .../desktop/views/pages/messaging-room.vue | 0 .../app/desktop/views/pages/othello.vue | 0 .../app/desktop/views/pages/post.vue | 0 .../app/desktop/views/pages/search.vue | 0 .../app/desktop/views/pages/selectdrive.vue | 0 .../pages/user/user.followers-you-know.vue | 0 .../desktop/views/pages/user/user.friends.vue | 0 .../desktop/views/pages/user/user.header.vue | 0 .../desktop/views/pages/user/user.home.vue | 0 .../desktop/views/pages/user/user.photos.vue | 0 .../desktop/views/pages/user/user.profile.vue | 0 .../views/pages/user/user.timeline.vue | 0 .../app/desktop/views/pages/user/user.vue | 0 .../app/desktop/views/pages/welcome.vue | 0 .../app/desktop/views/widgets/activity.vue | 0 .../views/widgets/channel.channel.form.vue | 0 .../views/widgets/channel.channel.post.vue | 0 .../desktop/views/widgets/channel.channel.vue | 0 .../app/desktop/views/widgets/channel.vue | 0 .../app/desktop/views/widgets/index.ts | 0 .../app/desktop/views/widgets/messaging.vue | 0 .../desktop/views/widgets/notifications.vue | 0 .../app/desktop/views/widgets/polls.vue | 0 .../app/desktop/views/widgets/post-form.vue | 0 .../app/desktop/views/widgets/profile.vue | 0 .../app/desktop/views/widgets/timemachine.vue | 0 .../app/desktop/views/widgets/trends.vue | 0 .../app/desktop/views/widgets/users.vue | 0 src/{server/web => client}/app/dev/script.ts | 0 src/{server/web => client}/app/dev/style.styl | 0 .../web => client}/app/dev/views/app.vue | 0 .../web => client}/app/dev/views/apps.vue | 0 .../web => client}/app/dev/views/index.vue | 0 .../web => client}/app/dev/views/new-app.vue | 0 .../web => client}/app/dev/views/ui.vue | 0 src/{server/web => client}/app/init.css | 0 src/{server/web => client}/app/init.ts | 0 .../app/mobile/api/choose-drive-file.ts | 0 .../app/mobile/api/choose-drive-folder.ts | 0 .../web => client}/app/mobile/api/dialog.ts | 0 .../web => client}/app/mobile/api/input.ts | 0 .../web => client}/app/mobile/api/notify.ts | 0 .../web => client}/app/mobile/api/post.ts | 0 .../web => client}/app/mobile/script.ts | 0 .../web => client}/app/mobile/style.styl | 0 .../app/mobile/views/components/activity.vue | 0 .../views/components/drive-file-chooser.vue | 0 .../views/components/drive-folder-chooser.vue | 0 .../views/components/drive.file-detail.vue | 0 .../mobile/views/components/drive.file.vue | 0 .../mobile/views/components/drive.folder.vue | 0 .../app/mobile/views/components/drive.vue | 0 .../mobile/views/components/follow-button.vue | 0 .../mobile/views/components/friends-maker.vue | 0 .../app/mobile/views/components/index.ts | 0 .../mobile/views/components/media-image.vue | 0 .../mobile/views/components/media-video.vue | 0 .../views/components/notification-preview.vue | 0 .../mobile/views/components/notification.vue | 0 .../mobile/views/components/notifications.vue | 0 .../app/mobile/views/components/notify.vue | 0 .../app/mobile/views/components/post-card.vue | 0 .../views/components/post-detail.sub.vue | 0 .../mobile/views/components/post-detail.vue | 0 .../app/mobile/views/components/post-form.vue | 0 .../mobile/views/components/post-preview.vue | 0 .../app/mobile/views/components/post.sub.vue | 0 .../app/mobile/views/components/post.vue | 0 .../app/mobile/views/components/posts.vue | 0 .../views/components/sub-post-content.vue | 0 .../app/mobile/views/components/timeline.vue | 0 .../app/mobile/views/components/ui.header.vue | 0 .../app/mobile/views/components/ui.nav.vue | 0 .../app/mobile/views/components/ui.vue | 0 .../app/mobile/views/components/user-card.vue | 0 .../mobile/views/components/user-preview.vue | 0 .../mobile/views/components/user-timeline.vue | 0 .../mobile/views/components/users-list.vue | 0 .../views/components/widget-container.vue | 0 .../app/mobile/views/directives/index.ts | 0 .../mobile/views/directives/user-preview.ts | 0 .../app/mobile/views/pages/drive.vue | 0 .../app/mobile/views/pages/followers.vue | 0 .../app/mobile/views/pages/following.vue | 0 .../app/mobile/views/pages/home.vue | 0 .../app/mobile/views/pages/index.vue | 0 .../app/mobile/views/pages/messaging-room.vue | 0 .../app/mobile/views/pages/messaging.vue | 0 .../app/mobile/views/pages/notifications.vue | 0 .../app/mobile/views/pages/othello.vue | 0 .../app/mobile/views/pages/post.vue | 0 .../mobile/views/pages/profile-setting.vue | 0 .../app/mobile/views/pages/search.vue | 0 .../app/mobile/views/pages/selectdrive.vue | 0 .../app/mobile/views/pages/settings.vue | 0 .../app/mobile/views/pages/signup.vue | 0 .../app/mobile/views/pages/user.vue | 0 .../pages/user/home.followers-you-know.vue | 0 .../mobile/views/pages/user/home.friends.vue | 0 .../mobile/views/pages/user/home.photos.vue | 0 .../mobile/views/pages/user/home.posts.vue | 0 .../app/mobile/views/pages/user/home.vue | 0 .../app/mobile/views/pages/welcome.vue | 0 .../app/mobile/views/widgets/activity.vue | 0 .../app/mobile/views/widgets/index.ts | 0 .../app/mobile/views/widgets/profile.vue | 0 src/{server/web => client}/app/reset.styl | 0 src/{server/web => client}/app/safe.js | 0 .../web => client}/app/stats/style.styl | 0 .../web => client}/app/stats/tags/index.tag | 0 .../web => client}/app/stats/tags/index.ts | 0 .../web => client}/app/status/style.styl | 0 .../web => client}/app/status/tags/index.tag | 0 .../web => client}/app/status/tags/index.ts | 0 src/{server/web => client}/app/sw.js | 0 src/{server/web => client}/app/tsconfig.json | 0 src/{server/web => client}/app/v.d.ts | 0 src/{server/web => client}/assets/404.js | 0 .../web => client}/assets/code-highlight.css | 0 src/{server/web => client}/assets/error.jpg | Bin src/{server/web => client}/assets/favicon.ico | Bin src/{server/web => client}/assets/label.svg | 0 .../web => client}/assets/manifest.json | 0 src/{server/web => client}/assets/message.mp3 | Bin .../web => client}/assets/othello-put-me.mp3 | Bin .../web => client}/assets/othello-put-you.mp3 | Bin src/{server/web => client}/assets/post.mp3 | Bin .../web => client}/assets/reactions/angry.png | Bin .../assets/reactions/confused.png | Bin .../assets/reactions/congrats.png | Bin .../web => client}/assets/reactions/hmm.png | Bin .../web => client}/assets/reactions/laugh.png | Bin .../web => client}/assets/reactions/like.png | Bin .../web => client}/assets/reactions/love.png | Bin .../assets/reactions/pudding.png | Bin .../assets/reactions/surprise.png | Bin .../web => client}/assets/recover.html | 0 src/{server/web => client}/assets/title.svg | 0 src/{server/web => client}/assets/unread.svg | 0 .../web => client}/assets/welcome-bg.svg | 0 .../web => client}/assets/welcome-fg.svg | 0 src/{server/web => client}/const.styl | 2 +- src/{server/web => client}/docs/about.en.pug | 0 src/{server/web => client}/docs/about.ja.pug | 0 src/{server/web => client}/docs/api.ja.pug | 0 .../docs/api/endpoints/posts/create.yaml | 0 .../docs/api/endpoints/posts/timeline.yaml | 0 .../docs/api/endpoints/style.styl | 0 .../docs/api/endpoints/view.pug | 0 .../docs/api/entities/drive-file.yaml | 0 .../docs/api/entities/post.yaml | 0 .../docs/api/entities/style.styl | 0 .../docs/api/entities/user.yaml | 0 .../web => client}/docs/api/entities/view.pug | 0 .../web => client}/docs/api/gulpfile.ts | 24 +- .../web => client}/docs/api/mixins.pug | 0 .../web => client}/docs/api/style.styl | 0 src/{server/web => client}/docs/gulpfile.ts | 16 +- src/{server/web => client}/docs/index.en.pug | 0 src/{server/web => client}/docs/index.ja.pug | 0 src/{server/web => client}/docs/layout.pug | 0 .../web => client}/docs/license.en.pug | 0 .../web => client}/docs/license.ja.pug | 0 src/{server/web => client}/docs/mute.ja.pug | 0 src/{server/web => client}/docs/search.ja.pug | 0 src/{server/web => client}/docs/server.ts | 0 src/{server/web => client}/docs/style.styl | 0 src/{server/web => client}/docs/tou.ja.pug | 0 src/{server/web => client}/docs/ui.styl | 0 src/{server/web => client}/docs/vars.ts | 16 +- src/{server/web => client}/element.scss | 2 +- src/{server/web => client}/style.styl | 0 .../common/get-notification-summary.ts | 0 src/{server => }/common/get-post-summary.ts | 0 src/{server => }/common/get-reaction-emoji.ts | 0 src/{server => }/common/othello/ai/back.ts | 2 +- src/{server => }/common/othello/ai/front.ts | 2 +- src/{server => }/common/othello/ai/index.ts | 0 src/{server => }/common/othello/core.ts | 0 src/{server => }/common/othello/maps.ts | 0 .../common/text/core/syntax-highlighter.ts | 0 .../api => }/common/text/elements/bold.ts | 0 .../api => }/common/text/elements/code.ts | 0 .../api => }/common/text/elements/emoji.ts | 0 .../api => }/common/text/elements/hashtag.ts | 0 .../common/text/elements/inline-code.ts | 0 .../api => }/common/text/elements/link.ts | 0 .../api => }/common/text/elements/mention.ts | 2 +- .../api => }/common/text/elements/quote.ts | 0 .../api => }/common/text/elements/url.ts | 0 src/{server/api => }/common/text/index.ts | 0 src/{server => }/common/user/get-acct.ts | 0 src/{server => }/common/user/get-summary.ts | 2 +- src/{server => }/common/user/parse-acct.ts | 0 src/{server/api => }/models/access-token.ts | 2 +- src/{server/api => }/models/app.ts | 4 +- src/{server/api => }/models/auth-session.ts | 2 +- .../api => }/models/channel-watching.ts | 2 +- src/{server/api => }/models/channel.ts | 2 +- src/{server/api => }/models/drive-file.ts | 4 +- src/{server/api => }/models/drive-folder.ts | 2 +- src/{server/api => }/models/favorite.ts | 2 +- src/{server/api => }/models/following.ts | 2 +- .../api => }/models/messaging-history.ts | 2 +- .../api => }/models/messaging-message.ts | 2 +- src/{server/api => }/models/meta.ts | 2 +- src/{server/api => }/models/mute.ts | 2 +- src/{server/api => }/models/notification.ts | 2 +- src/{server/api => }/models/othello-game.ts | 2 +- .../api => }/models/othello-matching.ts | 2 +- src/{server/api => }/models/poll-vote.ts | 6 +- src/{server/api => }/models/post-reaction.ts | 2 +- src/{server/api => }/models/post-watching.ts | 2 +- src/{server/api => }/models/post.ts | 2 +- src/{server/api => }/models/signin.ts | 2 +- .../api => }/models/sw-subscription.ts | 2 +- src/{server/api => }/models/user.ts | 6 +- src/processor/report-github-failure.ts | 2 +- src/server/api/authenticate.ts | 6 +- src/server/api/bot/core.ts | 10 +- src/server/api/bot/interfaces/line.ts | 8 +- src/server/api/common/drive/add-file.ts | 8 +- .../api/common/drive/upload_from_url.ts | 2 +- src/server/api/common/get-friends.ts | 2 +- src/server/api/common/notify.ts | 6 +- src/server/api/common/push-sw.ts | 2 +- .../api/common/read-messaging-message.ts | 4 +- src/server/api/common/read-notification.ts | 2 +- src/server/api/common/watch-post.ts | 2 +- src/server/api/endpoints/aggregation/posts.ts | 2 +- .../endpoints/aggregation/posts/reaction.ts | 4 +- .../endpoints/aggregation/posts/reactions.ts | 4 +- .../api/endpoints/aggregation/posts/reply.ts | 2 +- .../api/endpoints/aggregation/posts/repost.ts | 2 +- src/server/api/endpoints/aggregation/users.ts | 2 +- .../endpoints/aggregation/users/activity.ts | 4 +- .../endpoints/aggregation/users/followers.ts | 15 +- .../endpoints/aggregation/users/following.ts | 15 +- .../api/endpoints/aggregation/users/post.ts | 4 +- .../endpoints/aggregation/users/reaction.ts | 4 +- src/server/api/endpoints/app/create.ts | 2 +- .../api/endpoints/app/name_id/available.ts | 4 +- src/server/api/endpoints/app/show.ts | 2 +- src/server/api/endpoints/auth/accept.ts | 6 +- .../api/endpoints/auth/session/generate.ts | 4 +- src/server/api/endpoints/auth/session/show.ts | 2 +- .../api/endpoints/auth/session/userkey.ts | 8 +- src/server/api/endpoints/channels.ts | 2 +- src/server/api/endpoints/channels/create.ts | 6 +- src/server/api/endpoints/channels/posts.ts | 4 +- src/server/api/endpoints/channels/show.ts | 2 +- src/server/api/endpoints/channels/unwatch.ts | 4 +- src/server/api/endpoints/channels/watch.ts | 4 +- src/server/api/endpoints/drive.ts | 2 +- src/server/api/endpoints/drive/files.ts | 2 +- .../api/endpoints/drive/files/create.ts | 2 +- src/server/api/endpoints/drive/files/find.ts | 2 +- src/server/api/endpoints/drive/files/show.ts | 2 +- .../api/endpoints/drive/files/update.ts | 4 +- .../endpoints/drive/files/upload_from_url.ts | 2 +- src/server/api/endpoints/drive/folders.ts | 2 +- .../api/endpoints/drive/folders/create.ts | 2 +- .../api/endpoints/drive/folders/find.ts | 2 +- .../api/endpoints/drive/folders/show.ts | 2 +- .../api/endpoints/drive/folders/update.ts | 2 +- src/server/api/endpoints/drive/stream.ts | 2 +- src/server/api/endpoints/following/create.ts | 4 +- src/server/api/endpoints/following/delete.ts | 4 +- src/server/api/endpoints/i.ts | 2 +- src/server/api/endpoints/i/2fa/done.ts | 2 +- src/server/api/endpoints/i/2fa/register.ts | 2 +- src/server/api/endpoints/i/2fa/unregister.ts | 2 +- src/server/api/endpoints/i/appdata/get.ts | 39 --- src/server/api/endpoints/i/appdata/set.ts | 58 ---- src/server/api/endpoints/i/authorized_apps.ts | 4 +- src/server/api/endpoints/i/change_password.ts | 2 +- src/server/api/endpoints/i/favorites.ts | 4 +- src/server/api/endpoints/i/notifications.ts | 6 +- src/server/api/endpoints/i/pin.ts | 6 +- .../api/endpoints/i/regenerate_token.ts | 2 +- src/server/api/endpoints/i/signin_history.ts | 2 +- src/server/api/endpoints/i/update.ts | 2 +- .../api/endpoints/i/update_client_setting.ts | 2 +- src/server/api/endpoints/i/update_home.ts | 2 +- .../api/endpoints/i/update_mobile_home.ts | 2 +- src/server/api/endpoints/messaging/history.ts | 6 +- .../api/endpoints/messaging/messages.ts | 6 +- .../endpoints/messaging/messages/create.ts | 14 +- src/server/api/endpoints/messaging/unread.ts | 4 +- src/server/api/endpoints/meta.ts | 4 +- src/server/api/endpoints/mute/create.ts | 4 +- src/server/api/endpoints/mute/delete.ts | 4 +- src/server/api/endpoints/mute/list.ts | 4 +- src/server/api/endpoints/my/apps.ts | 2 +- .../notifications/get_unread_count.ts | 4 +- .../notifications/mark_as_read_all.ts | 2 +- src/server/api/endpoints/othello/games.ts | 2 +- .../api/endpoints/othello/games/show.ts | 4 +- .../api/endpoints/othello/invitations.ts | 2 +- src/server/api/endpoints/othello/match.ts | 8 +- .../api/endpoints/othello/match/cancel.ts | 2 +- src/server/api/endpoints/posts.ts | 2 +- src/server/api/endpoints/posts/categorize.ts | 52 --- src/server/api/endpoints/posts/context.ts | 2 +- src/server/api/endpoints/posts/create.ts | 24 +- .../api/endpoints/posts/favorites/create.ts | 4 +- .../api/endpoints/posts/favorites/delete.ts | 4 +- src/server/api/endpoints/posts/mentions.ts | 4 +- .../endpoints/posts/polls/recommendation.ts | 4 +- src/server/api/endpoints/posts/polls/vote.ts | 6 +- src/server/api/endpoints/posts/reactions.ts | 4 +- .../api/endpoints/posts/reactions/create.ts | 8 +- .../api/endpoints/posts/reactions/delete.ts | 4 +- src/server/api/endpoints/posts/replies.ts | 2 +- src/server/api/endpoints/posts/reposts.ts | 2 +- src/server/api/endpoints/posts/search.ts | 8 +- src/server/api/endpoints/posts/show.ts | 2 +- src/server/api/endpoints/posts/timeline.ts | 8 +- src/server/api/endpoints/posts/trend.ts | 2 +- src/server/api/endpoints/stats.ts | 4 +- src/server/api/endpoints/sw/register.ts | 2 +- .../api/endpoints/username/available.ts | 4 +- src/server/api/endpoints/users.ts | 2 +- src/server/api/endpoints/users/followers.ts | 6 +- src/server/api/endpoints/users/following.ts | 6 +- .../users/get_frequently_replied_users.ts | 4 +- src/server/api/endpoints/users/posts.ts | 4 +- .../api/endpoints/users/recommendation.ts | 2 +- src/server/api/endpoints/users/search.ts | 2 +- .../api/endpoints/users/search_by_username.ts | 2 +- src/server/api/endpoints/users/show.ts | 2 +- src/server/api/limitter.ts | 2 +- src/server/api/private/signin.ts | 4 +- src/server/api/private/signup.ts | 2 +- src/server/api/service/github.ts | 4 +- src/server/api/service/twitter.ts | 2 +- src/server/api/stream/channel.ts | 4 +- src/server/api/stream/home.ts | 6 +- src/server/api/stream/messaging.ts | 4 +- src/server/api/stream/othello-game.ts | 10 +- src/server/api/stream/othello.ts | 2 +- src/server/api/streaming.ts | 8 +- src/server/file/server.ts | 2 +- src/server/web/server.ts | 51 ++- src/server/web/{service => }/url-preview.ts | 0 src/tools/analysis/core.ts | 49 --- src/tools/analysis/extract-user-domains.ts | 120 ------- src/tools/analysis/extract-user-keywords.ts | 154 --------- src/tools/analysis/mecab.js | 85 ----- src/tools/analysis/naive-bayes.js | 302 ------------------ .../analysis/predict-all-post-category.ts | 35 -- src/tools/analysis/predict-user-interst.ts | 45 --- tsconfig.json | 2 +- webpack.config.ts | 24 +- 552 files changed, 360 insertions(+), 1311 deletions(-) rename src/{server/web => client}/app/animation.styl (100%) rename src/{server/web => client}/app/app.styl (100%) rename src/{server/web => client}/app/app.vue (100%) rename src/{server/web => client}/app/auth/assets/logo.svg (100%) rename src/{server/web => client}/app/auth/script.ts (100%) rename src/{server/web => client}/app/auth/style.styl (100%) rename src/{server/web => client}/app/auth/views/form.vue (100%) rename src/{server/web => client}/app/auth/views/index.vue (100%) rename src/{server/web => client}/app/base.pug (76%) rename src/{server/web => client}/app/boot.js (100%) rename src/{server/web => client}/app/ch/script.ts (100%) rename src/{server/web => client}/app/ch/style.styl (100%) rename src/{server/web => client}/app/ch/tags/channel.tag (100%) rename src/{server/web => client}/app/ch/tags/header.tag (100%) rename src/{server/web => client}/app/ch/tags/index.tag (100%) rename src/{server/web => client}/app/ch/tags/index.ts (100%) rename src/{server/web => client}/app/common/define-widget.ts (100%) rename src/{server/web => client}/app/common/mios.ts (100%) rename src/{server/web => client}/app/common/scripts/check-for-update.ts (100%) rename src/{server/web => client}/app/common/scripts/compose-notification.ts (100%) rename src/{server/web => client}/app/common/scripts/contains.ts (100%) rename src/{server/web => client}/app/common/scripts/copy-to-clipboard.ts (100%) rename src/{server/web => client}/app/common/scripts/date-stringify.ts (100%) rename src/{server/web => client}/app/common/scripts/fuck-ad-block.ts (100%) rename src/{server/web => client}/app/common/scripts/gcd.ts (100%) rename src/{server/web => client}/app/common/scripts/get-kao.ts (100%) rename src/{server/web => client}/app/common/scripts/get-median.ts (100%) rename src/{server/web => client}/app/common/scripts/loading.ts (100%) rename src/{server/web => client}/app/common/scripts/parse-search-query.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/channel.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/drive.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/home.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/messaging-index.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/messaging.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/othello-game.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/othello.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/requests.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/server.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/stream-manager.ts (100%) rename src/{server/web => client}/app/common/scripts/streaming/stream.ts (100%) rename src/{server/web => client}/app/common/views/components/autocomplete.vue (100%) rename src/{server/web => client}/app/common/views/components/connect-failed.troubleshooter.vue (100%) rename src/{server/web => client}/app/common/views/components/connect-failed.vue (100%) rename src/{server/web => client}/app/common/views/components/ellipsis.vue (100%) rename src/{server/web => client}/app/common/views/components/file-type-icon.vue (100%) rename src/{server/web => client}/app/common/views/components/forkit.vue (100%) rename src/{server/web => client}/app/common/views/components/index.ts (100%) rename src/{server/web => client}/app/common/views/components/media-list.vue (100%) rename src/{server/web => client}/app/common/views/components/messaging-room.form.vue (100%) rename src/{server/web => client}/app/common/views/components/messaging-room.message.vue (100%) rename src/{server/web => client}/app/common/views/components/messaging-room.vue (100%) rename src/{server/web => client}/app/common/views/components/messaging.vue (100%) rename src/{server/web => client}/app/common/views/components/nav.vue (100%) rename src/{server/web => client}/app/common/views/components/othello.game.vue (100%) rename src/{server/web => client}/app/common/views/components/othello.gameroom.vue (100%) rename src/{server/web => client}/app/common/views/components/othello.room.vue (100%) rename src/{server/web => client}/app/common/views/components/othello.vue (100%) rename src/{server/web => client}/app/common/views/components/poll-editor.vue (100%) rename src/{server/web => client}/app/common/views/components/poll.vue (100%) rename src/{server/web => client}/app/common/views/components/post-html.ts (100%) rename src/{server/web => client}/app/common/views/components/post-menu.vue (100%) rename src/{server/web => client}/app/common/views/components/reaction-icon.vue (100%) rename src/{server/web => client}/app/common/views/components/reaction-picker.vue (100%) rename src/{server/web => client}/app/common/views/components/reactions-viewer.vue (100%) rename src/{server/web => client}/app/common/views/components/signin.vue (100%) rename src/{server/web => client}/app/common/views/components/signup.vue (100%) rename src/{server/web => client}/app/common/views/components/special-message.vue (100%) rename src/{server/web => client}/app/common/views/components/stream-indicator.vue (100%) rename src/{server/web => client}/app/common/views/components/switch.vue (100%) rename src/{server/web => client}/app/common/views/components/time.vue (100%) rename src/{server/web => client}/app/common/views/components/timer.vue (100%) rename src/{server/web => client}/app/common/views/components/twitter-setting.vue (100%) rename src/{server/web => client}/app/common/views/components/uploader.vue (100%) rename src/{server/web => client}/app/common/views/components/url-preview.vue (100%) rename src/{server/web => client}/app/common/views/components/url.vue (100%) rename src/{server/web => client}/app/common/views/components/welcome-timeline.vue (100%) rename src/{server/web => client}/app/common/views/directives/autocomplete.ts (100%) rename src/{server/web => client}/app/common/views/directives/index.ts (100%) rename src/{server/web => client}/app/common/views/filters/bytes.ts (100%) rename src/{server/web => client}/app/common/views/filters/index.ts (100%) rename src/{server/web => client}/app/common/views/filters/number.ts (100%) rename src/{server/web => client}/app/common/views/widgets/access-log.vue (100%) rename src/{server/web => client}/app/common/views/widgets/broadcast.vue (100%) rename src/{server/web => client}/app/common/views/widgets/calendar.vue (100%) rename src/{server/web => client}/app/common/views/widgets/donation.vue (100%) rename src/{server/web => client}/app/common/views/widgets/index.ts (100%) rename src/{server/web => client}/app/common/views/widgets/nav.vue (100%) rename src/{server/web => client}/app/common/views/widgets/photo-stream.vue (100%) rename src/{server/web => client}/app/common/views/widgets/rss.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.cpu-memory.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.cpu.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.disk.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.info.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.memory.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.pie.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.uptimes.vue (100%) rename src/{server/web => client}/app/common/views/widgets/server.vue (100%) rename src/{server/web => client}/app/common/views/widgets/slideshow.vue (100%) rename src/{server/web => client}/app/common/views/widgets/tips.vue (100%) rename src/{server/web => client}/app/common/views/widgets/version.vue (100%) rename src/{server/web => client}/app/config.ts (100%) rename src/{server/web => client}/app/desktop/api/choose-drive-file.ts (100%) rename src/{server/web => client}/app/desktop/api/choose-drive-folder.ts (100%) rename src/{server/web => client}/app/desktop/api/contextmenu.ts (100%) rename src/{server/web => client}/app/desktop/api/dialog.ts (100%) rename src/{server/web => client}/app/desktop/api/input.ts (100%) rename src/{server/web => client}/app/desktop/api/notify.ts (100%) rename src/{server/web => client}/app/desktop/api/post.ts (100%) rename src/{server/web => client}/app/desktop/api/update-avatar.ts (100%) rename src/{server/web => client}/app/desktop/api/update-banner.ts (100%) rename src/{server/web => client}/app/desktop/assets/grid.svg (100%) rename src/{server/web => client}/app/desktop/assets/header-logo-white.svg (100%) rename src/{server/web => client}/app/desktop/assets/header-logo.svg (100%) rename src/{server/web => client}/app/desktop/assets/index.jpg (100%) rename src/{server/web => client}/app/desktop/assets/remove.png (100%) rename src/{server/web => client}/app/desktop/script.ts (100%) rename src/{server/web => client}/app/desktop/style.styl (100%) rename src/{server/web => client}/app/desktop/ui.styl (100%) rename src/{server/web => client}/app/desktop/views/components/activity.calendar.vue (100%) rename src/{server/web => client}/app/desktop/views/components/activity.chart.vue (100%) rename src/{server/web => client}/app/desktop/views/components/activity.vue (100%) rename src/{server/web => client}/app/desktop/views/components/analog-clock.vue (100%) rename src/{server/web => client}/app/desktop/views/components/calendar.vue (100%) rename src/{server/web => client}/app/desktop/views/components/choose-file-from-drive-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/choose-folder-from-drive-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/context-menu.menu.vue (100%) rename src/{server/web => client}/app/desktop/views/components/context-menu.vue (100%) rename src/{server/web => client}/app/desktop/views/components/crop-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/dialog.vue (100%) rename src/{server/web => client}/app/desktop/views/components/drive-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/drive.file.vue (100%) rename src/{server/web => client}/app/desktop/views/components/drive.folder.vue (100%) rename src/{server/web => client}/app/desktop/views/components/drive.nav-folder.vue (100%) rename src/{server/web => client}/app/desktop/views/components/drive.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ellipsis-icon.vue (100%) rename src/{server/web => client}/app/desktop/views/components/follow-button.vue (100%) rename src/{server/web => client}/app/desktop/views/components/followers-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/followers.vue (100%) rename src/{server/web => client}/app/desktop/views/components/following-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/following.vue (100%) rename src/{server/web => client}/app/desktop/views/components/friends-maker.vue (100%) rename src/{server/web => client}/app/desktop/views/components/game-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/home.vue (100%) rename src/{server/web => client}/app/desktop/views/components/index.ts (100%) rename src/{server/web => client}/app/desktop/views/components/input-dialog.vue (100%) rename src/{server/web => client}/app/desktop/views/components/media-image-dialog.vue (100%) rename src/{server/web => client}/app/desktop/views/components/media-image.vue (100%) rename src/{server/web => client}/app/desktop/views/components/media-video-dialog.vue (100%) rename src/{server/web => client}/app/desktop/views/components/media-video.vue (100%) rename src/{server/web => client}/app/desktop/views/components/mentions.vue (100%) rename src/{server/web => client}/app/desktop/views/components/messaging-room-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/messaging-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/notifications.vue (100%) rename src/{server/web => client}/app/desktop/views/components/post-detail.sub.vue (100%) rename src/{server/web => client}/app/desktop/views/components/post-detail.vue (100%) rename src/{server/web => client}/app/desktop/views/components/post-form-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/post-form.vue (100%) rename src/{server/web => client}/app/desktop/views/components/post-preview.vue (100%) rename src/{server/web => client}/app/desktop/views/components/posts.post.sub.vue (100%) rename src/{server/web => client}/app/desktop/views/components/posts.post.vue (100%) rename src/{server/web => client}/app/desktop/views/components/posts.vue (100%) rename src/{server/web => client}/app/desktop/views/components/progress-dialog.vue (100%) rename src/{server/web => client}/app/desktop/views/components/repost-form-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/repost-form.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings-window.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.2fa.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.api.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.apps.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.drive.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.mute.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.password.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.profile.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.signins.vue (100%) rename src/{server/web => client}/app/desktop/views/components/settings.vue (100%) rename src/{server/web => client}/app/desktop/views/components/sub-post-content.vue (100%) rename src/{server/web => client}/app/desktop/views/components/taskmanager.vue (100%) rename src/{server/web => client}/app/desktop/views/components/timeline.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui-notification.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.header.account.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.header.clock.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.header.nav.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.header.notifications.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.header.post.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.header.search.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.header.vue (100%) rename src/{server/web => client}/app/desktop/views/components/ui.vue (100%) rename src/{server/web => client}/app/desktop/views/components/user-preview.vue (100%) rename src/{server/web => client}/app/desktop/views/components/users-list.item.vue (100%) rename src/{server/web => client}/app/desktop/views/components/users-list.vue (100%) rename src/{server/web => client}/app/desktop/views/components/widget-container.vue (100%) rename src/{server/web => client}/app/desktop/views/components/window.vue (100%) rename src/{server/web => client}/app/desktop/views/directives/index.ts (100%) rename src/{server/web => client}/app/desktop/views/directives/user-preview.ts (100%) rename src/{server/web => client}/app/desktop/views/pages/drive.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/home-customize.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/home.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/index.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/messaging-room.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/othello.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/post.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/search.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/selectdrive.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.followers-you-know.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.friends.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.header.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.home.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.photos.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.profile.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.timeline.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/user/user.vue (100%) rename src/{server/web => client}/app/desktop/views/pages/welcome.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/activity.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/channel.channel.form.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/channel.channel.post.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/channel.channel.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/channel.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/index.ts (100%) rename src/{server/web => client}/app/desktop/views/widgets/messaging.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/notifications.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/polls.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/post-form.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/profile.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/timemachine.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/trends.vue (100%) rename src/{server/web => client}/app/desktop/views/widgets/users.vue (100%) rename src/{server/web => client}/app/dev/script.ts (100%) rename src/{server/web => client}/app/dev/style.styl (100%) rename src/{server/web => client}/app/dev/views/app.vue (100%) rename src/{server/web => client}/app/dev/views/apps.vue (100%) rename src/{server/web => client}/app/dev/views/index.vue (100%) rename src/{server/web => client}/app/dev/views/new-app.vue (100%) rename src/{server/web => client}/app/dev/views/ui.vue (100%) rename src/{server/web => client}/app/init.css (100%) rename src/{server/web => client}/app/init.ts (100%) rename src/{server/web => client}/app/mobile/api/choose-drive-file.ts (100%) rename src/{server/web => client}/app/mobile/api/choose-drive-folder.ts (100%) rename src/{server/web => client}/app/mobile/api/dialog.ts (100%) rename src/{server/web => client}/app/mobile/api/input.ts (100%) rename src/{server/web => client}/app/mobile/api/notify.ts (100%) rename src/{server/web => client}/app/mobile/api/post.ts (100%) rename src/{server/web => client}/app/mobile/script.ts (100%) rename src/{server/web => client}/app/mobile/style.styl (100%) rename src/{server/web => client}/app/mobile/views/components/activity.vue (100%) rename src/{server/web => client}/app/mobile/views/components/drive-file-chooser.vue (100%) rename src/{server/web => client}/app/mobile/views/components/drive-folder-chooser.vue (100%) rename src/{server/web => client}/app/mobile/views/components/drive.file-detail.vue (100%) rename src/{server/web => client}/app/mobile/views/components/drive.file.vue (100%) rename src/{server/web => client}/app/mobile/views/components/drive.folder.vue (100%) rename src/{server/web => client}/app/mobile/views/components/drive.vue (100%) rename src/{server/web => client}/app/mobile/views/components/follow-button.vue (100%) rename src/{server/web => client}/app/mobile/views/components/friends-maker.vue (100%) rename src/{server/web => client}/app/mobile/views/components/index.ts (100%) rename src/{server/web => client}/app/mobile/views/components/media-image.vue (100%) rename src/{server/web => client}/app/mobile/views/components/media-video.vue (100%) rename src/{server/web => client}/app/mobile/views/components/notification-preview.vue (100%) rename src/{server/web => client}/app/mobile/views/components/notification.vue (100%) rename src/{server/web => client}/app/mobile/views/components/notifications.vue (100%) rename src/{server/web => client}/app/mobile/views/components/notify.vue (100%) rename src/{server/web => client}/app/mobile/views/components/post-card.vue (100%) rename src/{server/web => client}/app/mobile/views/components/post-detail.sub.vue (100%) rename src/{server/web => client}/app/mobile/views/components/post-detail.vue (100%) rename src/{server/web => client}/app/mobile/views/components/post-form.vue (100%) rename src/{server/web => client}/app/mobile/views/components/post-preview.vue (100%) rename src/{server/web => client}/app/mobile/views/components/post.sub.vue (100%) rename src/{server/web => client}/app/mobile/views/components/post.vue (100%) rename src/{server/web => client}/app/mobile/views/components/posts.vue (100%) rename src/{server/web => client}/app/mobile/views/components/sub-post-content.vue (100%) rename src/{server/web => client}/app/mobile/views/components/timeline.vue (100%) rename src/{server/web => client}/app/mobile/views/components/ui.header.vue (100%) rename src/{server/web => client}/app/mobile/views/components/ui.nav.vue (100%) rename src/{server/web => client}/app/mobile/views/components/ui.vue (100%) rename src/{server/web => client}/app/mobile/views/components/user-card.vue (100%) rename src/{server/web => client}/app/mobile/views/components/user-preview.vue (100%) rename src/{server/web => client}/app/mobile/views/components/user-timeline.vue (100%) rename src/{server/web => client}/app/mobile/views/components/users-list.vue (100%) rename src/{server/web => client}/app/mobile/views/components/widget-container.vue (100%) rename src/{server/web => client}/app/mobile/views/directives/index.ts (100%) rename src/{server/web => client}/app/mobile/views/directives/user-preview.ts (100%) rename src/{server/web => client}/app/mobile/views/pages/drive.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/followers.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/following.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/home.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/index.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/messaging-room.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/messaging.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/notifications.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/othello.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/post.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/profile-setting.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/search.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/selectdrive.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/settings.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/signup.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/user.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/user/home.followers-you-know.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/user/home.friends.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/user/home.photos.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/user/home.posts.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/user/home.vue (100%) rename src/{server/web => client}/app/mobile/views/pages/welcome.vue (100%) rename src/{server/web => client}/app/mobile/views/widgets/activity.vue (100%) rename src/{server/web => client}/app/mobile/views/widgets/index.ts (100%) rename src/{server/web => client}/app/mobile/views/widgets/profile.vue (100%) rename src/{server/web => client}/app/reset.styl (100%) rename src/{server/web => client}/app/safe.js (100%) rename src/{server/web => client}/app/stats/style.styl (100%) rename src/{server/web => client}/app/stats/tags/index.tag (100%) rename src/{server/web => client}/app/stats/tags/index.ts (100%) rename src/{server/web => client}/app/status/style.styl (100%) rename src/{server/web => client}/app/status/tags/index.tag (100%) rename src/{server/web => client}/app/status/tags/index.ts (100%) rename src/{server/web => client}/app/sw.js (100%) rename src/{server/web => client}/app/tsconfig.json (100%) rename src/{server/web => client}/app/v.d.ts (100%) rename src/{server/web => client}/assets/404.js (100%) rename src/{server/web => client}/assets/code-highlight.css (100%) rename src/{server/web => client}/assets/error.jpg (100%) rename src/{server/web => client}/assets/favicon.ico (100%) rename src/{server/web => client}/assets/label.svg (100%) rename src/{server/web => client}/assets/manifest.json (100%) rename src/{server/web => client}/assets/message.mp3 (100%) rename src/{server/web => client}/assets/othello-put-me.mp3 (100%) rename src/{server/web => client}/assets/othello-put-you.mp3 (100%) rename src/{server/web => client}/assets/post.mp3 (100%) rename src/{server/web => client}/assets/reactions/angry.png (100%) rename src/{server/web => client}/assets/reactions/confused.png (100%) rename src/{server/web => client}/assets/reactions/congrats.png (100%) rename src/{server/web => client}/assets/reactions/hmm.png (100%) rename src/{server/web => client}/assets/reactions/laugh.png (100%) rename src/{server/web => client}/assets/reactions/like.png (100%) rename src/{server/web => client}/assets/reactions/love.png (100%) rename src/{server/web => client}/assets/reactions/pudding.png (100%) rename src/{server/web => client}/assets/reactions/surprise.png (100%) rename src/{server/web => client}/assets/recover.html (100%) rename src/{server/web => client}/assets/title.svg (100%) rename src/{server/web => client}/assets/unread.svg (100%) rename src/{server/web => client}/assets/welcome-bg.svg (100%) rename src/{server/web => client}/assets/welcome-fg.svg (100%) rename src/{server/web => client}/const.styl (74%) rename src/{server/web => client}/docs/about.en.pug (100%) rename src/{server/web => client}/docs/about.ja.pug (100%) rename src/{server/web => client}/docs/api.ja.pug (100%) rename src/{server/web => client}/docs/api/endpoints/posts/create.yaml (100%) rename src/{server/web => client}/docs/api/endpoints/posts/timeline.yaml (100%) rename src/{server/web => client}/docs/api/endpoints/style.styl (100%) rename src/{server/web => client}/docs/api/endpoints/view.pug (100%) rename src/{server/web => client}/docs/api/entities/drive-file.yaml (100%) rename src/{server/web => client}/docs/api/entities/post.yaml (100%) rename src/{server/web => client}/docs/api/entities/style.styl (100%) rename src/{server/web => client}/docs/api/entities/user.yaml (100%) rename src/{server/web => client}/docs/api/entities/view.pug (100%) rename src/{server/web => client}/docs/api/gulpfile.ts (80%) rename src/{server/web => client}/docs/api/mixins.pug (100%) rename src/{server/web => client}/docs/api/style.styl (100%) rename src/{server/web => client}/docs/gulpfile.ts (74%) rename src/{server/web => client}/docs/index.en.pug (100%) rename src/{server/web => client}/docs/index.ja.pug (100%) rename src/{server/web => client}/docs/layout.pug (100%) rename src/{server/web => client}/docs/license.en.pug (100%) rename src/{server/web => client}/docs/license.ja.pug (100%) rename src/{server/web => client}/docs/mute.ja.pug (100%) rename src/{server/web => client}/docs/search.ja.pug (100%) rename src/{server/web => client}/docs/server.ts (100%) rename src/{server/web => client}/docs/style.styl (100%) rename src/{server/web => client}/docs/tou.ja.pug (100%) rename src/{server/web => client}/docs/ui.styl (100%) rename src/{server/web => client}/docs/vars.ts (76%) rename src/{server/web => client}/element.scss (91%) rename src/{server/web => client}/style.styl (100%) rename src/{server => }/common/get-notification-summary.ts (100%) rename src/{server => }/common/get-post-summary.ts (100%) rename src/{server => }/common/get-reaction-emoji.ts (100%) rename src/{server => }/common/othello/ai/back.ts (99%) rename src/{server => }/common/othello/ai/front.ts (99%) rename src/{server => }/common/othello/ai/index.ts (100%) rename src/{server => }/common/othello/core.ts (100%) rename src/{server => }/common/othello/maps.ts (100%) rename src/{server/api => }/common/text/core/syntax-highlighter.ts (100%) rename src/{server/api => }/common/text/elements/bold.ts (100%) rename src/{server/api => }/common/text/elements/code.ts (100%) rename src/{server/api => }/common/text/elements/emoji.ts (100%) rename src/{server/api => }/common/text/elements/hashtag.ts (100%) rename src/{server/api => }/common/text/elements/inline-code.ts (100%) rename src/{server/api => }/common/text/elements/link.ts (100%) rename src/{server/api => }/common/text/elements/mention.ts (82%) rename src/{server/api => }/common/text/elements/quote.ts (100%) rename src/{server/api => }/common/text/elements/url.ts (100%) rename src/{server/api => }/common/text/index.ts (100%) rename src/{server => }/common/user/get-acct.ts (100%) rename src/{server => }/common/user/get-summary.ts (90%) rename src/{server => }/common/user/parse-acct.ts (100%) rename src/{server/api => }/models/access-token.ts (90%) rename src/{server/api => }/models/app.ts (96%) rename src/{server/api => }/models/auth-session.ts (96%) rename src/{server/api => }/models/channel-watching.ts (88%) rename src/{server/api => }/models/channel.ts (97%) rename src/{server/api => }/models/drive-file.ts (96%) rename src/{server/api => }/models/drive-folder.ts (97%) rename src/{server/api => }/models/favorite.ts (85%) rename src/{server/api => }/models/following.ts (87%) rename src/{server/api => }/models/messaging-history.ts (88%) rename src/{server/api => }/models/messaging-message.ts (97%) rename src/{server/api => }/models/meta.ts (73%) rename src/{server/api => }/models/mute.ts (85%) rename src/{server/api => }/models/notification.ts (98%) rename src/{server/api => }/models/othello-game.ts (98%) rename src/{server/api => }/models/othello-matching.ts (96%) rename src/{server/api => }/models/poll-vote.ts (56%) rename src/{server/api => }/models/post-reaction.ts (96%) rename src/{server/api => }/models/post-watching.ts (86%) rename src/{server/api => }/models/post.ts (99%) rename src/{server/api => }/models/signin.ts (94%) rename src/{server/api => }/models/sw-subscription.ts (87%) rename src/{server/api => }/models/user.ts (98%) delete mode 100644 src/server/api/endpoints/i/appdata/get.ts delete mode 100644 src/server/api/endpoints/i/appdata/set.ts delete mode 100644 src/server/api/endpoints/posts/categorize.ts rename src/server/web/{service => }/url-preview.ts (100%) delete mode 100644 src/tools/analysis/core.ts delete mode 100644 src/tools/analysis/extract-user-domains.ts delete mode 100644 src/tools/analysis/extract-user-keywords.ts delete mode 100644 src/tools/analysis/mecab.js delete mode 100644 src/tools/analysis/naive-bayes.js delete mode 100644 src/tools/analysis/predict-all-post-category.ts delete mode 100644 src/tools/analysis/predict-user-interst.ts diff --git a/gulpfile.ts b/gulpfile.ts index 46727126c..a6e9e53df 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -39,10 +39,9 @@ if (isDebug) { const constants = require('./src/const.json'); -require('./src/server/web/docs/gulpfile.ts'); +require('./src/client/docs/gulpfile.ts'); gulp.task('build', [ - 'build:js', 'build:ts', 'build:copy', 'build:client', @@ -51,11 +50,6 @@ gulp.task('build', [ gulp.task('rebuild', ['clean', 'build']); -gulp.task('build:js', () => - gulp.src(['./src/**/*.js', '!./src/server/web/**/*.js']) - .pipe(gulp.dest('./built/')) -); - gulp.task('build:ts', () => { const tsProject = ts.createProject('./tsconfig.json'); @@ -71,7 +65,7 @@ gulp.task('build:copy', () => gulp.src([ './build/Release/crypto_key.node', './src/**/assets/**/*', - '!./src/server/web/app/**/assets/**/*' + '!./src/client/app/**/assets/**/*' ]).pipe(gulp.dest('./built/')) ); @@ -114,29 +108,28 @@ gulp.task('default', ['build']); gulp.task('build:client', [ 'build:ts', - 'build:js', 'build:client:script', 'build:client:pug', 'copy:client' ]); gulp.task('build:client:script', () => - gulp.src(['./src/server/web/app/boot.js', './src/server/web/app/safe.js']) + gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js']) .pipe(replace('VERSION', JSON.stringify(version))) .pipe(replace('API', JSON.stringify(config.api_url))) .pipe(replace('ENV', JSON.stringify(env))) .pipe(isProduction ? uglify({ toplevel: true } as any) : gutil.noop()) - .pipe(gulp.dest('./built/server/web/assets/')) as any + .pipe(gulp.dest('./built/client/assets/')) as any ); gulp.task('build:client:styles', () => - gulp.src('./src/server/web/app/init.css') + gulp.src('./src/client/app/init.css') .pipe(isProduction ? (cssnano as any)() : gutil.noop()) - .pipe(gulp.dest('./built/server/web/assets/')) + .pipe(gulp.dest('./built/client/assets/')) ); gulp.task('copy:client', [ @@ -144,14 +137,14 @@ gulp.task('copy:client', [ ], () => gulp.src([ './assets/**/*', - './src/server/web/assets/**/*', - './src/server/web/app/*/assets/**/*' + './src/client/assets/**/*', + './src/client/app/*/assets/**/*' ]) .pipe(isProduction ? (imagemin as any)() : gutil.noop()) .pipe(rename(path => { path.dirname = path.dirname.replace('assets', '.'); })) - .pipe(gulp.dest('./built/server/web/assets/')) + .pipe(gulp.dest('./built/client/assets/')) ); gulp.task('build:client:pug', [ @@ -159,13 +152,13 @@ gulp.task('build:client:pug', [ 'build:client:script', 'build:client:styles' ], () => - gulp.src('./src/server/web/app/base.pug') + gulp.src('./src/client/app/base.pug') .pipe(pug({ locals: { themeColor: constants.themeColor, facss: fa.dom.css(), //hljscss: fs.readFileSync('./node_modules/highlight.js/styles/default.css', 'utf8') - hljscss: fs.readFileSync('./src/server/web/assets/code-highlight.css', 'utf8') + hljscss: fs.readFileSync('./src/client/assets/code-highlight.css', 'utf8') } })) .pipe(htmlmin({ @@ -200,5 +193,5 @@ gulp.task('build:client:pug', [ // CSSも圧縮する minifyCSS: true })) - .pipe(gulp.dest('./built/server/web/app/')) + .pipe(gulp.dest('./built/client/app/')) ); diff --git a/src/server/web/app/animation.styl b/src/client/app/animation.styl similarity index 100% rename from src/server/web/app/animation.styl rename to src/client/app/animation.styl diff --git a/src/server/web/app/app.styl b/src/client/app/app.styl similarity index 100% rename from src/server/web/app/app.styl rename to src/client/app/app.styl diff --git a/src/server/web/app/app.vue b/src/client/app/app.vue similarity index 100% rename from src/server/web/app/app.vue rename to src/client/app/app.vue diff --git a/src/server/web/app/auth/assets/logo.svg b/src/client/app/auth/assets/logo.svg similarity index 100% rename from src/server/web/app/auth/assets/logo.svg rename to src/client/app/auth/assets/logo.svg diff --git a/src/server/web/app/auth/script.ts b/src/client/app/auth/script.ts similarity index 100% rename from src/server/web/app/auth/script.ts rename to src/client/app/auth/script.ts diff --git a/src/server/web/app/auth/style.styl b/src/client/app/auth/style.styl similarity index 100% rename from src/server/web/app/auth/style.styl rename to src/client/app/auth/style.styl diff --git a/src/server/web/app/auth/views/form.vue b/src/client/app/auth/views/form.vue similarity index 100% rename from src/server/web/app/auth/views/form.vue rename to src/client/app/auth/views/form.vue diff --git a/src/server/web/app/auth/views/index.vue b/src/client/app/auth/views/index.vue similarity index 100% rename from src/server/web/app/auth/views/index.vue rename to src/client/app/auth/views/index.vue diff --git a/src/server/web/app/base.pug b/src/client/app/base.pug similarity index 76% rename from src/server/web/app/base.pug rename to src/client/app/base.pug index 60eb1539e..32a95a6c9 100644 --- a/src/server/web/app/base.pug +++ b/src/client/app/base.pug @@ -14,12 +14,12 @@ html title Misskey style - include ./../../../../built/server/web/assets/init.css + include ./../../../built/client/assets/init.css script - include ./../../../../built/server/web/assets/boot.js + include ./../../../built/client/assets/boot.js script - include ./../../../../built/server/web/assets/safe.js + include ./../../../built/client/assets/safe.js //- FontAwesome style style #{facss} diff --git a/src/server/web/app/boot.js b/src/client/app/boot.js similarity index 100% rename from src/server/web/app/boot.js rename to src/client/app/boot.js diff --git a/src/server/web/app/ch/script.ts b/src/client/app/ch/script.ts similarity index 100% rename from src/server/web/app/ch/script.ts rename to src/client/app/ch/script.ts diff --git a/src/server/web/app/ch/style.styl b/src/client/app/ch/style.styl similarity index 100% rename from src/server/web/app/ch/style.styl rename to src/client/app/ch/style.styl diff --git a/src/server/web/app/ch/tags/channel.tag b/src/client/app/ch/tags/channel.tag similarity index 100% rename from src/server/web/app/ch/tags/channel.tag rename to src/client/app/ch/tags/channel.tag diff --git a/src/server/web/app/ch/tags/header.tag b/src/client/app/ch/tags/header.tag similarity index 100% rename from src/server/web/app/ch/tags/header.tag rename to src/client/app/ch/tags/header.tag diff --git a/src/server/web/app/ch/tags/index.tag b/src/client/app/ch/tags/index.tag similarity index 100% rename from src/server/web/app/ch/tags/index.tag rename to src/client/app/ch/tags/index.tag diff --git a/src/server/web/app/ch/tags/index.ts b/src/client/app/ch/tags/index.ts similarity index 100% rename from src/server/web/app/ch/tags/index.ts rename to src/client/app/ch/tags/index.ts diff --git a/src/server/web/app/common/define-widget.ts b/src/client/app/common/define-widget.ts similarity index 100% rename from src/server/web/app/common/define-widget.ts rename to src/client/app/common/define-widget.ts diff --git a/src/server/web/app/common/mios.ts b/src/client/app/common/mios.ts similarity index 100% rename from src/server/web/app/common/mios.ts rename to src/client/app/common/mios.ts diff --git a/src/server/web/app/common/scripts/check-for-update.ts b/src/client/app/common/scripts/check-for-update.ts similarity index 100% rename from src/server/web/app/common/scripts/check-for-update.ts rename to src/client/app/common/scripts/check-for-update.ts diff --git a/src/server/web/app/common/scripts/compose-notification.ts b/src/client/app/common/scripts/compose-notification.ts similarity index 100% rename from src/server/web/app/common/scripts/compose-notification.ts rename to src/client/app/common/scripts/compose-notification.ts diff --git a/src/server/web/app/common/scripts/contains.ts b/src/client/app/common/scripts/contains.ts similarity index 100% rename from src/server/web/app/common/scripts/contains.ts rename to src/client/app/common/scripts/contains.ts diff --git a/src/server/web/app/common/scripts/copy-to-clipboard.ts b/src/client/app/common/scripts/copy-to-clipboard.ts similarity index 100% rename from src/server/web/app/common/scripts/copy-to-clipboard.ts rename to src/client/app/common/scripts/copy-to-clipboard.ts diff --git a/src/server/web/app/common/scripts/date-stringify.ts b/src/client/app/common/scripts/date-stringify.ts similarity index 100% rename from src/server/web/app/common/scripts/date-stringify.ts rename to src/client/app/common/scripts/date-stringify.ts diff --git a/src/server/web/app/common/scripts/fuck-ad-block.ts b/src/client/app/common/scripts/fuck-ad-block.ts similarity index 100% rename from src/server/web/app/common/scripts/fuck-ad-block.ts rename to src/client/app/common/scripts/fuck-ad-block.ts diff --git a/src/server/web/app/common/scripts/gcd.ts b/src/client/app/common/scripts/gcd.ts similarity index 100% rename from src/server/web/app/common/scripts/gcd.ts rename to src/client/app/common/scripts/gcd.ts diff --git a/src/server/web/app/common/scripts/get-kao.ts b/src/client/app/common/scripts/get-kao.ts similarity index 100% rename from src/server/web/app/common/scripts/get-kao.ts rename to src/client/app/common/scripts/get-kao.ts diff --git a/src/server/web/app/common/scripts/get-median.ts b/src/client/app/common/scripts/get-median.ts similarity index 100% rename from src/server/web/app/common/scripts/get-median.ts rename to src/client/app/common/scripts/get-median.ts diff --git a/src/server/web/app/common/scripts/loading.ts b/src/client/app/common/scripts/loading.ts similarity index 100% rename from src/server/web/app/common/scripts/loading.ts rename to src/client/app/common/scripts/loading.ts diff --git a/src/server/web/app/common/scripts/parse-search-query.ts b/src/client/app/common/scripts/parse-search-query.ts similarity index 100% rename from src/server/web/app/common/scripts/parse-search-query.ts rename to src/client/app/common/scripts/parse-search-query.ts diff --git a/src/server/web/app/common/scripts/streaming/channel.ts b/src/client/app/common/scripts/streaming/channel.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/channel.ts rename to src/client/app/common/scripts/streaming/channel.ts diff --git a/src/server/web/app/common/scripts/streaming/drive.ts b/src/client/app/common/scripts/streaming/drive.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/drive.ts rename to src/client/app/common/scripts/streaming/drive.ts diff --git a/src/server/web/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/home.ts rename to src/client/app/common/scripts/streaming/home.ts diff --git a/src/server/web/app/common/scripts/streaming/messaging-index.ts b/src/client/app/common/scripts/streaming/messaging-index.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/messaging-index.ts rename to src/client/app/common/scripts/streaming/messaging-index.ts diff --git a/src/server/web/app/common/scripts/streaming/messaging.ts b/src/client/app/common/scripts/streaming/messaging.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/messaging.ts rename to src/client/app/common/scripts/streaming/messaging.ts diff --git a/src/server/web/app/common/scripts/streaming/othello-game.ts b/src/client/app/common/scripts/streaming/othello-game.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/othello-game.ts rename to src/client/app/common/scripts/streaming/othello-game.ts diff --git a/src/server/web/app/common/scripts/streaming/othello.ts b/src/client/app/common/scripts/streaming/othello.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/othello.ts rename to src/client/app/common/scripts/streaming/othello.ts diff --git a/src/server/web/app/common/scripts/streaming/requests.ts b/src/client/app/common/scripts/streaming/requests.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/requests.ts rename to src/client/app/common/scripts/streaming/requests.ts diff --git a/src/server/web/app/common/scripts/streaming/server.ts b/src/client/app/common/scripts/streaming/server.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/server.ts rename to src/client/app/common/scripts/streaming/server.ts diff --git a/src/server/web/app/common/scripts/streaming/stream-manager.ts b/src/client/app/common/scripts/streaming/stream-manager.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/stream-manager.ts rename to src/client/app/common/scripts/streaming/stream-manager.ts diff --git a/src/server/web/app/common/scripts/streaming/stream.ts b/src/client/app/common/scripts/streaming/stream.ts similarity index 100% rename from src/server/web/app/common/scripts/streaming/stream.ts rename to src/client/app/common/scripts/streaming/stream.ts diff --git a/src/server/web/app/common/views/components/autocomplete.vue b/src/client/app/common/views/components/autocomplete.vue similarity index 100% rename from src/server/web/app/common/views/components/autocomplete.vue rename to src/client/app/common/views/components/autocomplete.vue diff --git a/src/server/web/app/common/views/components/connect-failed.troubleshooter.vue b/src/client/app/common/views/components/connect-failed.troubleshooter.vue similarity index 100% rename from src/server/web/app/common/views/components/connect-failed.troubleshooter.vue rename to src/client/app/common/views/components/connect-failed.troubleshooter.vue diff --git a/src/server/web/app/common/views/components/connect-failed.vue b/src/client/app/common/views/components/connect-failed.vue similarity index 100% rename from src/server/web/app/common/views/components/connect-failed.vue rename to src/client/app/common/views/components/connect-failed.vue diff --git a/src/server/web/app/common/views/components/ellipsis.vue b/src/client/app/common/views/components/ellipsis.vue similarity index 100% rename from src/server/web/app/common/views/components/ellipsis.vue rename to src/client/app/common/views/components/ellipsis.vue diff --git a/src/server/web/app/common/views/components/file-type-icon.vue b/src/client/app/common/views/components/file-type-icon.vue similarity index 100% rename from src/server/web/app/common/views/components/file-type-icon.vue rename to src/client/app/common/views/components/file-type-icon.vue diff --git a/src/server/web/app/common/views/components/forkit.vue b/src/client/app/common/views/components/forkit.vue similarity index 100% rename from src/server/web/app/common/views/components/forkit.vue rename to src/client/app/common/views/components/forkit.vue diff --git a/src/server/web/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts similarity index 100% rename from src/server/web/app/common/views/components/index.ts rename to src/client/app/common/views/components/index.ts diff --git a/src/server/web/app/common/views/components/media-list.vue b/src/client/app/common/views/components/media-list.vue similarity index 100% rename from src/server/web/app/common/views/components/media-list.vue rename to src/client/app/common/views/components/media-list.vue diff --git a/src/server/web/app/common/views/components/messaging-room.form.vue b/src/client/app/common/views/components/messaging-room.form.vue similarity index 100% rename from src/server/web/app/common/views/components/messaging-room.form.vue rename to src/client/app/common/views/components/messaging-room.form.vue diff --git a/src/server/web/app/common/views/components/messaging-room.message.vue b/src/client/app/common/views/components/messaging-room.message.vue similarity index 100% rename from src/server/web/app/common/views/components/messaging-room.message.vue rename to src/client/app/common/views/components/messaging-room.message.vue diff --git a/src/server/web/app/common/views/components/messaging-room.vue b/src/client/app/common/views/components/messaging-room.vue similarity index 100% rename from src/server/web/app/common/views/components/messaging-room.vue rename to src/client/app/common/views/components/messaging-room.vue diff --git a/src/server/web/app/common/views/components/messaging.vue b/src/client/app/common/views/components/messaging.vue similarity index 100% rename from src/server/web/app/common/views/components/messaging.vue rename to src/client/app/common/views/components/messaging.vue diff --git a/src/server/web/app/common/views/components/nav.vue b/src/client/app/common/views/components/nav.vue similarity index 100% rename from src/server/web/app/common/views/components/nav.vue rename to src/client/app/common/views/components/nav.vue diff --git a/src/server/web/app/common/views/components/othello.game.vue b/src/client/app/common/views/components/othello.game.vue similarity index 100% rename from src/server/web/app/common/views/components/othello.game.vue rename to src/client/app/common/views/components/othello.game.vue diff --git a/src/server/web/app/common/views/components/othello.gameroom.vue b/src/client/app/common/views/components/othello.gameroom.vue similarity index 100% rename from src/server/web/app/common/views/components/othello.gameroom.vue rename to src/client/app/common/views/components/othello.gameroom.vue diff --git a/src/server/web/app/common/views/components/othello.room.vue b/src/client/app/common/views/components/othello.room.vue similarity index 100% rename from src/server/web/app/common/views/components/othello.room.vue rename to src/client/app/common/views/components/othello.room.vue diff --git a/src/server/web/app/common/views/components/othello.vue b/src/client/app/common/views/components/othello.vue similarity index 100% rename from src/server/web/app/common/views/components/othello.vue rename to src/client/app/common/views/components/othello.vue diff --git a/src/server/web/app/common/views/components/poll-editor.vue b/src/client/app/common/views/components/poll-editor.vue similarity index 100% rename from src/server/web/app/common/views/components/poll-editor.vue rename to src/client/app/common/views/components/poll-editor.vue diff --git a/src/server/web/app/common/views/components/poll.vue b/src/client/app/common/views/components/poll.vue similarity index 100% rename from src/server/web/app/common/views/components/poll.vue rename to src/client/app/common/views/components/poll.vue diff --git a/src/server/web/app/common/views/components/post-html.ts b/src/client/app/common/views/components/post-html.ts similarity index 100% rename from src/server/web/app/common/views/components/post-html.ts rename to src/client/app/common/views/components/post-html.ts diff --git a/src/server/web/app/common/views/components/post-menu.vue b/src/client/app/common/views/components/post-menu.vue similarity index 100% rename from src/server/web/app/common/views/components/post-menu.vue rename to src/client/app/common/views/components/post-menu.vue diff --git a/src/server/web/app/common/views/components/reaction-icon.vue b/src/client/app/common/views/components/reaction-icon.vue similarity index 100% rename from src/server/web/app/common/views/components/reaction-icon.vue rename to src/client/app/common/views/components/reaction-icon.vue diff --git a/src/server/web/app/common/views/components/reaction-picker.vue b/src/client/app/common/views/components/reaction-picker.vue similarity index 100% rename from src/server/web/app/common/views/components/reaction-picker.vue rename to src/client/app/common/views/components/reaction-picker.vue diff --git a/src/server/web/app/common/views/components/reactions-viewer.vue b/src/client/app/common/views/components/reactions-viewer.vue similarity index 100% rename from src/server/web/app/common/views/components/reactions-viewer.vue rename to src/client/app/common/views/components/reactions-viewer.vue diff --git a/src/server/web/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue similarity index 100% rename from src/server/web/app/common/views/components/signin.vue rename to src/client/app/common/views/components/signin.vue diff --git a/src/server/web/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue similarity index 100% rename from src/server/web/app/common/views/components/signup.vue rename to src/client/app/common/views/components/signup.vue diff --git a/src/server/web/app/common/views/components/special-message.vue b/src/client/app/common/views/components/special-message.vue similarity index 100% rename from src/server/web/app/common/views/components/special-message.vue rename to src/client/app/common/views/components/special-message.vue diff --git a/src/server/web/app/common/views/components/stream-indicator.vue b/src/client/app/common/views/components/stream-indicator.vue similarity index 100% rename from src/server/web/app/common/views/components/stream-indicator.vue rename to src/client/app/common/views/components/stream-indicator.vue diff --git a/src/server/web/app/common/views/components/switch.vue b/src/client/app/common/views/components/switch.vue similarity index 100% rename from src/server/web/app/common/views/components/switch.vue rename to src/client/app/common/views/components/switch.vue diff --git a/src/server/web/app/common/views/components/time.vue b/src/client/app/common/views/components/time.vue similarity index 100% rename from src/server/web/app/common/views/components/time.vue rename to src/client/app/common/views/components/time.vue diff --git a/src/server/web/app/common/views/components/timer.vue b/src/client/app/common/views/components/timer.vue similarity index 100% rename from src/server/web/app/common/views/components/timer.vue rename to src/client/app/common/views/components/timer.vue diff --git a/src/server/web/app/common/views/components/twitter-setting.vue b/src/client/app/common/views/components/twitter-setting.vue similarity index 100% rename from src/server/web/app/common/views/components/twitter-setting.vue rename to src/client/app/common/views/components/twitter-setting.vue diff --git a/src/server/web/app/common/views/components/uploader.vue b/src/client/app/common/views/components/uploader.vue similarity index 100% rename from src/server/web/app/common/views/components/uploader.vue rename to src/client/app/common/views/components/uploader.vue diff --git a/src/server/web/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue similarity index 100% rename from src/server/web/app/common/views/components/url-preview.vue rename to src/client/app/common/views/components/url-preview.vue diff --git a/src/server/web/app/common/views/components/url.vue b/src/client/app/common/views/components/url.vue similarity index 100% rename from src/server/web/app/common/views/components/url.vue rename to src/client/app/common/views/components/url.vue diff --git a/src/server/web/app/common/views/components/welcome-timeline.vue b/src/client/app/common/views/components/welcome-timeline.vue similarity index 100% rename from src/server/web/app/common/views/components/welcome-timeline.vue rename to src/client/app/common/views/components/welcome-timeline.vue diff --git a/src/server/web/app/common/views/directives/autocomplete.ts b/src/client/app/common/views/directives/autocomplete.ts similarity index 100% rename from src/server/web/app/common/views/directives/autocomplete.ts rename to src/client/app/common/views/directives/autocomplete.ts diff --git a/src/server/web/app/common/views/directives/index.ts b/src/client/app/common/views/directives/index.ts similarity index 100% rename from src/server/web/app/common/views/directives/index.ts rename to src/client/app/common/views/directives/index.ts diff --git a/src/server/web/app/common/views/filters/bytes.ts b/src/client/app/common/views/filters/bytes.ts similarity index 100% rename from src/server/web/app/common/views/filters/bytes.ts rename to src/client/app/common/views/filters/bytes.ts diff --git a/src/server/web/app/common/views/filters/index.ts b/src/client/app/common/views/filters/index.ts similarity index 100% rename from src/server/web/app/common/views/filters/index.ts rename to src/client/app/common/views/filters/index.ts diff --git a/src/server/web/app/common/views/filters/number.ts b/src/client/app/common/views/filters/number.ts similarity index 100% rename from src/server/web/app/common/views/filters/number.ts rename to src/client/app/common/views/filters/number.ts diff --git a/src/server/web/app/common/views/widgets/access-log.vue b/src/client/app/common/views/widgets/access-log.vue similarity index 100% rename from src/server/web/app/common/views/widgets/access-log.vue rename to src/client/app/common/views/widgets/access-log.vue diff --git a/src/server/web/app/common/views/widgets/broadcast.vue b/src/client/app/common/views/widgets/broadcast.vue similarity index 100% rename from src/server/web/app/common/views/widgets/broadcast.vue rename to src/client/app/common/views/widgets/broadcast.vue diff --git a/src/server/web/app/common/views/widgets/calendar.vue b/src/client/app/common/views/widgets/calendar.vue similarity index 100% rename from src/server/web/app/common/views/widgets/calendar.vue rename to src/client/app/common/views/widgets/calendar.vue diff --git a/src/server/web/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue similarity index 100% rename from src/server/web/app/common/views/widgets/donation.vue rename to src/client/app/common/views/widgets/donation.vue diff --git a/src/server/web/app/common/views/widgets/index.ts b/src/client/app/common/views/widgets/index.ts similarity index 100% rename from src/server/web/app/common/views/widgets/index.ts rename to src/client/app/common/views/widgets/index.ts diff --git a/src/server/web/app/common/views/widgets/nav.vue b/src/client/app/common/views/widgets/nav.vue similarity index 100% rename from src/server/web/app/common/views/widgets/nav.vue rename to src/client/app/common/views/widgets/nav.vue diff --git a/src/server/web/app/common/views/widgets/photo-stream.vue b/src/client/app/common/views/widgets/photo-stream.vue similarity index 100% rename from src/server/web/app/common/views/widgets/photo-stream.vue rename to src/client/app/common/views/widgets/photo-stream.vue diff --git a/src/server/web/app/common/views/widgets/rss.vue b/src/client/app/common/views/widgets/rss.vue similarity index 100% rename from src/server/web/app/common/views/widgets/rss.vue rename to src/client/app/common/views/widgets/rss.vue diff --git a/src/server/web/app/common/views/widgets/server.cpu-memory.vue b/src/client/app/common/views/widgets/server.cpu-memory.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.cpu-memory.vue rename to src/client/app/common/views/widgets/server.cpu-memory.vue diff --git a/src/server/web/app/common/views/widgets/server.cpu.vue b/src/client/app/common/views/widgets/server.cpu.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.cpu.vue rename to src/client/app/common/views/widgets/server.cpu.vue diff --git a/src/server/web/app/common/views/widgets/server.disk.vue b/src/client/app/common/views/widgets/server.disk.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.disk.vue rename to src/client/app/common/views/widgets/server.disk.vue diff --git a/src/server/web/app/common/views/widgets/server.info.vue b/src/client/app/common/views/widgets/server.info.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.info.vue rename to src/client/app/common/views/widgets/server.info.vue diff --git a/src/server/web/app/common/views/widgets/server.memory.vue b/src/client/app/common/views/widgets/server.memory.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.memory.vue rename to src/client/app/common/views/widgets/server.memory.vue diff --git a/src/server/web/app/common/views/widgets/server.pie.vue b/src/client/app/common/views/widgets/server.pie.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.pie.vue rename to src/client/app/common/views/widgets/server.pie.vue diff --git a/src/server/web/app/common/views/widgets/server.uptimes.vue b/src/client/app/common/views/widgets/server.uptimes.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.uptimes.vue rename to src/client/app/common/views/widgets/server.uptimes.vue diff --git a/src/server/web/app/common/views/widgets/server.vue b/src/client/app/common/views/widgets/server.vue similarity index 100% rename from src/server/web/app/common/views/widgets/server.vue rename to src/client/app/common/views/widgets/server.vue diff --git a/src/server/web/app/common/views/widgets/slideshow.vue b/src/client/app/common/views/widgets/slideshow.vue similarity index 100% rename from src/server/web/app/common/views/widgets/slideshow.vue rename to src/client/app/common/views/widgets/slideshow.vue diff --git a/src/server/web/app/common/views/widgets/tips.vue b/src/client/app/common/views/widgets/tips.vue similarity index 100% rename from src/server/web/app/common/views/widgets/tips.vue rename to src/client/app/common/views/widgets/tips.vue diff --git a/src/server/web/app/common/views/widgets/version.vue b/src/client/app/common/views/widgets/version.vue similarity index 100% rename from src/server/web/app/common/views/widgets/version.vue rename to src/client/app/common/views/widgets/version.vue diff --git a/src/server/web/app/config.ts b/src/client/app/config.ts similarity index 100% rename from src/server/web/app/config.ts rename to src/client/app/config.ts diff --git a/src/server/web/app/desktop/api/choose-drive-file.ts b/src/client/app/desktop/api/choose-drive-file.ts similarity index 100% rename from src/server/web/app/desktop/api/choose-drive-file.ts rename to src/client/app/desktop/api/choose-drive-file.ts diff --git a/src/server/web/app/desktop/api/choose-drive-folder.ts b/src/client/app/desktop/api/choose-drive-folder.ts similarity index 100% rename from src/server/web/app/desktop/api/choose-drive-folder.ts rename to src/client/app/desktop/api/choose-drive-folder.ts diff --git a/src/server/web/app/desktop/api/contextmenu.ts b/src/client/app/desktop/api/contextmenu.ts similarity index 100% rename from src/server/web/app/desktop/api/contextmenu.ts rename to src/client/app/desktop/api/contextmenu.ts diff --git a/src/server/web/app/desktop/api/dialog.ts b/src/client/app/desktop/api/dialog.ts similarity index 100% rename from src/server/web/app/desktop/api/dialog.ts rename to src/client/app/desktop/api/dialog.ts diff --git a/src/server/web/app/desktop/api/input.ts b/src/client/app/desktop/api/input.ts similarity index 100% rename from src/server/web/app/desktop/api/input.ts rename to src/client/app/desktop/api/input.ts diff --git a/src/server/web/app/desktop/api/notify.ts b/src/client/app/desktop/api/notify.ts similarity index 100% rename from src/server/web/app/desktop/api/notify.ts rename to src/client/app/desktop/api/notify.ts diff --git a/src/server/web/app/desktop/api/post.ts b/src/client/app/desktop/api/post.ts similarity index 100% rename from src/server/web/app/desktop/api/post.ts rename to src/client/app/desktop/api/post.ts diff --git a/src/server/web/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts similarity index 100% rename from src/server/web/app/desktop/api/update-avatar.ts rename to src/client/app/desktop/api/update-avatar.ts diff --git a/src/server/web/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts similarity index 100% rename from src/server/web/app/desktop/api/update-banner.ts rename to src/client/app/desktop/api/update-banner.ts diff --git a/src/server/web/app/desktop/assets/grid.svg b/src/client/app/desktop/assets/grid.svg similarity index 100% rename from src/server/web/app/desktop/assets/grid.svg rename to src/client/app/desktop/assets/grid.svg diff --git a/src/server/web/app/desktop/assets/header-logo-white.svg b/src/client/app/desktop/assets/header-logo-white.svg similarity index 100% rename from src/server/web/app/desktop/assets/header-logo-white.svg rename to src/client/app/desktop/assets/header-logo-white.svg diff --git a/src/server/web/app/desktop/assets/header-logo.svg b/src/client/app/desktop/assets/header-logo.svg similarity index 100% rename from src/server/web/app/desktop/assets/header-logo.svg rename to src/client/app/desktop/assets/header-logo.svg diff --git a/src/server/web/app/desktop/assets/index.jpg b/src/client/app/desktop/assets/index.jpg similarity index 100% rename from src/server/web/app/desktop/assets/index.jpg rename to src/client/app/desktop/assets/index.jpg diff --git a/src/server/web/app/desktop/assets/remove.png b/src/client/app/desktop/assets/remove.png similarity index 100% rename from src/server/web/app/desktop/assets/remove.png rename to src/client/app/desktop/assets/remove.png diff --git a/src/server/web/app/desktop/script.ts b/src/client/app/desktop/script.ts similarity index 100% rename from src/server/web/app/desktop/script.ts rename to src/client/app/desktop/script.ts diff --git a/src/server/web/app/desktop/style.styl b/src/client/app/desktop/style.styl similarity index 100% rename from src/server/web/app/desktop/style.styl rename to src/client/app/desktop/style.styl diff --git a/src/server/web/app/desktop/ui.styl b/src/client/app/desktop/ui.styl similarity index 100% rename from src/server/web/app/desktop/ui.styl rename to src/client/app/desktop/ui.styl diff --git a/src/server/web/app/desktop/views/components/activity.calendar.vue b/src/client/app/desktop/views/components/activity.calendar.vue similarity index 100% rename from src/server/web/app/desktop/views/components/activity.calendar.vue rename to src/client/app/desktop/views/components/activity.calendar.vue diff --git a/src/server/web/app/desktop/views/components/activity.chart.vue b/src/client/app/desktop/views/components/activity.chart.vue similarity index 100% rename from src/server/web/app/desktop/views/components/activity.chart.vue rename to src/client/app/desktop/views/components/activity.chart.vue diff --git a/src/server/web/app/desktop/views/components/activity.vue b/src/client/app/desktop/views/components/activity.vue similarity index 100% rename from src/server/web/app/desktop/views/components/activity.vue rename to src/client/app/desktop/views/components/activity.vue diff --git a/src/server/web/app/desktop/views/components/analog-clock.vue b/src/client/app/desktop/views/components/analog-clock.vue similarity index 100% rename from src/server/web/app/desktop/views/components/analog-clock.vue rename to src/client/app/desktop/views/components/analog-clock.vue diff --git a/src/server/web/app/desktop/views/components/calendar.vue b/src/client/app/desktop/views/components/calendar.vue similarity index 100% rename from src/server/web/app/desktop/views/components/calendar.vue rename to src/client/app/desktop/views/components/calendar.vue diff --git a/src/server/web/app/desktop/views/components/choose-file-from-drive-window.vue b/src/client/app/desktop/views/components/choose-file-from-drive-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/choose-file-from-drive-window.vue rename to src/client/app/desktop/views/components/choose-file-from-drive-window.vue diff --git a/src/server/web/app/desktop/views/components/choose-folder-from-drive-window.vue b/src/client/app/desktop/views/components/choose-folder-from-drive-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/choose-folder-from-drive-window.vue rename to src/client/app/desktop/views/components/choose-folder-from-drive-window.vue diff --git a/src/server/web/app/desktop/views/components/context-menu.menu.vue b/src/client/app/desktop/views/components/context-menu.menu.vue similarity index 100% rename from src/server/web/app/desktop/views/components/context-menu.menu.vue rename to src/client/app/desktop/views/components/context-menu.menu.vue diff --git a/src/server/web/app/desktop/views/components/context-menu.vue b/src/client/app/desktop/views/components/context-menu.vue similarity index 100% rename from src/server/web/app/desktop/views/components/context-menu.vue rename to src/client/app/desktop/views/components/context-menu.vue diff --git a/src/server/web/app/desktop/views/components/crop-window.vue b/src/client/app/desktop/views/components/crop-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/crop-window.vue rename to src/client/app/desktop/views/components/crop-window.vue diff --git a/src/server/web/app/desktop/views/components/dialog.vue b/src/client/app/desktop/views/components/dialog.vue similarity index 100% rename from src/server/web/app/desktop/views/components/dialog.vue rename to src/client/app/desktop/views/components/dialog.vue diff --git a/src/server/web/app/desktop/views/components/drive-window.vue b/src/client/app/desktop/views/components/drive-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/drive-window.vue rename to src/client/app/desktop/views/components/drive-window.vue diff --git a/src/server/web/app/desktop/views/components/drive.file.vue b/src/client/app/desktop/views/components/drive.file.vue similarity index 100% rename from src/server/web/app/desktop/views/components/drive.file.vue rename to src/client/app/desktop/views/components/drive.file.vue diff --git a/src/server/web/app/desktop/views/components/drive.folder.vue b/src/client/app/desktop/views/components/drive.folder.vue similarity index 100% rename from src/server/web/app/desktop/views/components/drive.folder.vue rename to src/client/app/desktop/views/components/drive.folder.vue diff --git a/src/server/web/app/desktop/views/components/drive.nav-folder.vue b/src/client/app/desktop/views/components/drive.nav-folder.vue similarity index 100% rename from src/server/web/app/desktop/views/components/drive.nav-folder.vue rename to src/client/app/desktop/views/components/drive.nav-folder.vue diff --git a/src/server/web/app/desktop/views/components/drive.vue b/src/client/app/desktop/views/components/drive.vue similarity index 100% rename from src/server/web/app/desktop/views/components/drive.vue rename to src/client/app/desktop/views/components/drive.vue diff --git a/src/server/web/app/desktop/views/components/ellipsis-icon.vue b/src/client/app/desktop/views/components/ellipsis-icon.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ellipsis-icon.vue rename to src/client/app/desktop/views/components/ellipsis-icon.vue diff --git a/src/server/web/app/desktop/views/components/follow-button.vue b/src/client/app/desktop/views/components/follow-button.vue similarity index 100% rename from src/server/web/app/desktop/views/components/follow-button.vue rename to src/client/app/desktop/views/components/follow-button.vue diff --git a/src/server/web/app/desktop/views/components/followers-window.vue b/src/client/app/desktop/views/components/followers-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/followers-window.vue rename to src/client/app/desktop/views/components/followers-window.vue diff --git a/src/server/web/app/desktop/views/components/followers.vue b/src/client/app/desktop/views/components/followers.vue similarity index 100% rename from src/server/web/app/desktop/views/components/followers.vue rename to src/client/app/desktop/views/components/followers.vue diff --git a/src/server/web/app/desktop/views/components/following-window.vue b/src/client/app/desktop/views/components/following-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/following-window.vue rename to src/client/app/desktop/views/components/following-window.vue diff --git a/src/server/web/app/desktop/views/components/following.vue b/src/client/app/desktop/views/components/following.vue similarity index 100% rename from src/server/web/app/desktop/views/components/following.vue rename to src/client/app/desktop/views/components/following.vue diff --git a/src/server/web/app/desktop/views/components/friends-maker.vue b/src/client/app/desktop/views/components/friends-maker.vue similarity index 100% rename from src/server/web/app/desktop/views/components/friends-maker.vue rename to src/client/app/desktop/views/components/friends-maker.vue diff --git a/src/server/web/app/desktop/views/components/game-window.vue b/src/client/app/desktop/views/components/game-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/game-window.vue rename to src/client/app/desktop/views/components/game-window.vue diff --git a/src/server/web/app/desktop/views/components/home.vue b/src/client/app/desktop/views/components/home.vue similarity index 100% rename from src/server/web/app/desktop/views/components/home.vue rename to src/client/app/desktop/views/components/home.vue diff --git a/src/server/web/app/desktop/views/components/index.ts b/src/client/app/desktop/views/components/index.ts similarity index 100% rename from src/server/web/app/desktop/views/components/index.ts rename to src/client/app/desktop/views/components/index.ts diff --git a/src/server/web/app/desktop/views/components/input-dialog.vue b/src/client/app/desktop/views/components/input-dialog.vue similarity index 100% rename from src/server/web/app/desktop/views/components/input-dialog.vue rename to src/client/app/desktop/views/components/input-dialog.vue diff --git a/src/server/web/app/desktop/views/components/media-image-dialog.vue b/src/client/app/desktop/views/components/media-image-dialog.vue similarity index 100% rename from src/server/web/app/desktop/views/components/media-image-dialog.vue rename to src/client/app/desktop/views/components/media-image-dialog.vue diff --git a/src/server/web/app/desktop/views/components/media-image.vue b/src/client/app/desktop/views/components/media-image.vue similarity index 100% rename from src/server/web/app/desktop/views/components/media-image.vue rename to src/client/app/desktop/views/components/media-image.vue diff --git a/src/server/web/app/desktop/views/components/media-video-dialog.vue b/src/client/app/desktop/views/components/media-video-dialog.vue similarity index 100% rename from src/server/web/app/desktop/views/components/media-video-dialog.vue rename to src/client/app/desktop/views/components/media-video-dialog.vue diff --git a/src/server/web/app/desktop/views/components/media-video.vue b/src/client/app/desktop/views/components/media-video.vue similarity index 100% rename from src/server/web/app/desktop/views/components/media-video.vue rename to src/client/app/desktop/views/components/media-video.vue diff --git a/src/server/web/app/desktop/views/components/mentions.vue b/src/client/app/desktop/views/components/mentions.vue similarity index 100% rename from src/server/web/app/desktop/views/components/mentions.vue rename to src/client/app/desktop/views/components/mentions.vue diff --git a/src/server/web/app/desktop/views/components/messaging-room-window.vue b/src/client/app/desktop/views/components/messaging-room-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/messaging-room-window.vue rename to src/client/app/desktop/views/components/messaging-room-window.vue diff --git a/src/server/web/app/desktop/views/components/messaging-window.vue b/src/client/app/desktop/views/components/messaging-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/messaging-window.vue rename to src/client/app/desktop/views/components/messaging-window.vue diff --git a/src/server/web/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue similarity index 100% rename from src/server/web/app/desktop/views/components/notifications.vue rename to src/client/app/desktop/views/components/notifications.vue diff --git a/src/server/web/app/desktop/views/components/post-detail.sub.vue b/src/client/app/desktop/views/components/post-detail.sub.vue similarity index 100% rename from src/server/web/app/desktop/views/components/post-detail.sub.vue rename to src/client/app/desktop/views/components/post-detail.sub.vue diff --git a/src/server/web/app/desktop/views/components/post-detail.vue b/src/client/app/desktop/views/components/post-detail.vue similarity index 100% rename from src/server/web/app/desktop/views/components/post-detail.vue rename to src/client/app/desktop/views/components/post-detail.vue diff --git a/src/server/web/app/desktop/views/components/post-form-window.vue b/src/client/app/desktop/views/components/post-form-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/post-form-window.vue rename to src/client/app/desktop/views/components/post-form-window.vue diff --git a/src/server/web/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue similarity index 100% rename from src/server/web/app/desktop/views/components/post-form.vue rename to src/client/app/desktop/views/components/post-form.vue diff --git a/src/server/web/app/desktop/views/components/post-preview.vue b/src/client/app/desktop/views/components/post-preview.vue similarity index 100% rename from src/server/web/app/desktop/views/components/post-preview.vue rename to src/client/app/desktop/views/components/post-preview.vue diff --git a/src/server/web/app/desktop/views/components/posts.post.sub.vue b/src/client/app/desktop/views/components/posts.post.sub.vue similarity index 100% rename from src/server/web/app/desktop/views/components/posts.post.sub.vue rename to src/client/app/desktop/views/components/posts.post.sub.vue diff --git a/src/server/web/app/desktop/views/components/posts.post.vue b/src/client/app/desktop/views/components/posts.post.vue similarity index 100% rename from src/server/web/app/desktop/views/components/posts.post.vue rename to src/client/app/desktop/views/components/posts.post.vue diff --git a/src/server/web/app/desktop/views/components/posts.vue b/src/client/app/desktop/views/components/posts.vue similarity index 100% rename from src/server/web/app/desktop/views/components/posts.vue rename to src/client/app/desktop/views/components/posts.vue diff --git a/src/server/web/app/desktop/views/components/progress-dialog.vue b/src/client/app/desktop/views/components/progress-dialog.vue similarity index 100% rename from src/server/web/app/desktop/views/components/progress-dialog.vue rename to src/client/app/desktop/views/components/progress-dialog.vue diff --git a/src/server/web/app/desktop/views/components/repost-form-window.vue b/src/client/app/desktop/views/components/repost-form-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/repost-form-window.vue rename to src/client/app/desktop/views/components/repost-form-window.vue diff --git a/src/server/web/app/desktop/views/components/repost-form.vue b/src/client/app/desktop/views/components/repost-form.vue similarity index 100% rename from src/server/web/app/desktop/views/components/repost-form.vue rename to src/client/app/desktop/views/components/repost-form.vue diff --git a/src/server/web/app/desktop/views/components/settings-window.vue b/src/client/app/desktop/views/components/settings-window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings-window.vue rename to src/client/app/desktop/views/components/settings-window.vue diff --git a/src/server/web/app/desktop/views/components/settings.2fa.vue b/src/client/app/desktop/views/components/settings.2fa.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.2fa.vue rename to src/client/app/desktop/views/components/settings.2fa.vue diff --git a/src/server/web/app/desktop/views/components/settings.api.vue b/src/client/app/desktop/views/components/settings.api.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.api.vue rename to src/client/app/desktop/views/components/settings.api.vue diff --git a/src/server/web/app/desktop/views/components/settings.apps.vue b/src/client/app/desktop/views/components/settings.apps.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.apps.vue rename to src/client/app/desktop/views/components/settings.apps.vue diff --git a/src/server/web/app/desktop/views/components/settings.drive.vue b/src/client/app/desktop/views/components/settings.drive.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.drive.vue rename to src/client/app/desktop/views/components/settings.drive.vue diff --git a/src/server/web/app/desktop/views/components/settings.mute.vue b/src/client/app/desktop/views/components/settings.mute.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.mute.vue rename to src/client/app/desktop/views/components/settings.mute.vue diff --git a/src/server/web/app/desktop/views/components/settings.password.vue b/src/client/app/desktop/views/components/settings.password.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.password.vue rename to src/client/app/desktop/views/components/settings.password.vue diff --git a/src/server/web/app/desktop/views/components/settings.profile.vue b/src/client/app/desktop/views/components/settings.profile.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.profile.vue rename to src/client/app/desktop/views/components/settings.profile.vue diff --git a/src/server/web/app/desktop/views/components/settings.signins.vue b/src/client/app/desktop/views/components/settings.signins.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.signins.vue rename to src/client/app/desktop/views/components/settings.signins.vue diff --git a/src/server/web/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue similarity index 100% rename from src/server/web/app/desktop/views/components/settings.vue rename to src/client/app/desktop/views/components/settings.vue diff --git a/src/server/web/app/desktop/views/components/sub-post-content.vue b/src/client/app/desktop/views/components/sub-post-content.vue similarity index 100% rename from src/server/web/app/desktop/views/components/sub-post-content.vue rename to src/client/app/desktop/views/components/sub-post-content.vue diff --git a/src/server/web/app/desktop/views/components/taskmanager.vue b/src/client/app/desktop/views/components/taskmanager.vue similarity index 100% rename from src/server/web/app/desktop/views/components/taskmanager.vue rename to src/client/app/desktop/views/components/taskmanager.vue diff --git a/src/server/web/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue similarity index 100% rename from src/server/web/app/desktop/views/components/timeline.vue rename to src/client/app/desktop/views/components/timeline.vue diff --git a/src/server/web/app/desktop/views/components/ui-notification.vue b/src/client/app/desktop/views/components/ui-notification.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui-notification.vue rename to src/client/app/desktop/views/components/ui-notification.vue diff --git a/src/server/web/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.header.account.vue rename to src/client/app/desktop/views/components/ui.header.account.vue diff --git a/src/server/web/app/desktop/views/components/ui.header.clock.vue b/src/client/app/desktop/views/components/ui.header.clock.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.header.clock.vue rename to src/client/app/desktop/views/components/ui.header.clock.vue diff --git a/src/server/web/app/desktop/views/components/ui.header.nav.vue b/src/client/app/desktop/views/components/ui.header.nav.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.header.nav.vue rename to src/client/app/desktop/views/components/ui.header.nav.vue diff --git a/src/server/web/app/desktop/views/components/ui.header.notifications.vue b/src/client/app/desktop/views/components/ui.header.notifications.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.header.notifications.vue rename to src/client/app/desktop/views/components/ui.header.notifications.vue diff --git a/src/server/web/app/desktop/views/components/ui.header.post.vue b/src/client/app/desktop/views/components/ui.header.post.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.header.post.vue rename to src/client/app/desktop/views/components/ui.header.post.vue diff --git a/src/server/web/app/desktop/views/components/ui.header.search.vue b/src/client/app/desktop/views/components/ui.header.search.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.header.search.vue rename to src/client/app/desktop/views/components/ui.header.search.vue diff --git a/src/server/web/app/desktop/views/components/ui.header.vue b/src/client/app/desktop/views/components/ui.header.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.header.vue rename to src/client/app/desktop/views/components/ui.header.vue diff --git a/src/server/web/app/desktop/views/components/ui.vue b/src/client/app/desktop/views/components/ui.vue similarity index 100% rename from src/server/web/app/desktop/views/components/ui.vue rename to src/client/app/desktop/views/components/ui.vue diff --git a/src/server/web/app/desktop/views/components/user-preview.vue b/src/client/app/desktop/views/components/user-preview.vue similarity index 100% rename from src/server/web/app/desktop/views/components/user-preview.vue rename to src/client/app/desktop/views/components/user-preview.vue diff --git a/src/server/web/app/desktop/views/components/users-list.item.vue b/src/client/app/desktop/views/components/users-list.item.vue similarity index 100% rename from src/server/web/app/desktop/views/components/users-list.item.vue rename to src/client/app/desktop/views/components/users-list.item.vue diff --git a/src/server/web/app/desktop/views/components/users-list.vue b/src/client/app/desktop/views/components/users-list.vue similarity index 100% rename from src/server/web/app/desktop/views/components/users-list.vue rename to src/client/app/desktop/views/components/users-list.vue diff --git a/src/server/web/app/desktop/views/components/widget-container.vue b/src/client/app/desktop/views/components/widget-container.vue similarity index 100% rename from src/server/web/app/desktop/views/components/widget-container.vue rename to src/client/app/desktop/views/components/widget-container.vue diff --git a/src/server/web/app/desktop/views/components/window.vue b/src/client/app/desktop/views/components/window.vue similarity index 100% rename from src/server/web/app/desktop/views/components/window.vue rename to src/client/app/desktop/views/components/window.vue diff --git a/src/server/web/app/desktop/views/directives/index.ts b/src/client/app/desktop/views/directives/index.ts similarity index 100% rename from src/server/web/app/desktop/views/directives/index.ts rename to src/client/app/desktop/views/directives/index.ts diff --git a/src/server/web/app/desktop/views/directives/user-preview.ts b/src/client/app/desktop/views/directives/user-preview.ts similarity index 100% rename from src/server/web/app/desktop/views/directives/user-preview.ts rename to src/client/app/desktop/views/directives/user-preview.ts diff --git a/src/server/web/app/desktop/views/pages/drive.vue b/src/client/app/desktop/views/pages/drive.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/drive.vue rename to src/client/app/desktop/views/pages/drive.vue diff --git a/src/server/web/app/desktop/views/pages/home-customize.vue b/src/client/app/desktop/views/pages/home-customize.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/home-customize.vue rename to src/client/app/desktop/views/pages/home-customize.vue diff --git a/src/server/web/app/desktop/views/pages/home.vue b/src/client/app/desktop/views/pages/home.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/home.vue rename to src/client/app/desktop/views/pages/home.vue diff --git a/src/server/web/app/desktop/views/pages/index.vue b/src/client/app/desktop/views/pages/index.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/index.vue rename to src/client/app/desktop/views/pages/index.vue diff --git a/src/server/web/app/desktop/views/pages/messaging-room.vue b/src/client/app/desktop/views/pages/messaging-room.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/messaging-room.vue rename to src/client/app/desktop/views/pages/messaging-room.vue diff --git a/src/server/web/app/desktop/views/pages/othello.vue b/src/client/app/desktop/views/pages/othello.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/othello.vue rename to src/client/app/desktop/views/pages/othello.vue diff --git a/src/server/web/app/desktop/views/pages/post.vue b/src/client/app/desktop/views/pages/post.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/post.vue rename to src/client/app/desktop/views/pages/post.vue diff --git a/src/server/web/app/desktop/views/pages/search.vue b/src/client/app/desktop/views/pages/search.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/search.vue rename to src/client/app/desktop/views/pages/search.vue diff --git a/src/server/web/app/desktop/views/pages/selectdrive.vue b/src/client/app/desktop/views/pages/selectdrive.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/selectdrive.vue rename to src/client/app/desktop/views/pages/selectdrive.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue b/src/client/app/desktop/views/pages/user/user.followers-you-know.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue rename to src/client/app/desktop/views/pages/user/user.followers-you-know.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.friends.vue b/src/client/app/desktop/views/pages/user/user.friends.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.friends.vue rename to src/client/app/desktop/views/pages/user/user.friends.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.header.vue b/src/client/app/desktop/views/pages/user/user.header.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.header.vue rename to src/client/app/desktop/views/pages/user/user.header.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.home.vue b/src/client/app/desktop/views/pages/user/user.home.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.home.vue rename to src/client/app/desktop/views/pages/user/user.home.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.photos.vue b/src/client/app/desktop/views/pages/user/user.photos.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.photos.vue rename to src/client/app/desktop/views/pages/user/user.photos.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.profile.vue b/src/client/app/desktop/views/pages/user/user.profile.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.profile.vue rename to src/client/app/desktop/views/pages/user/user.profile.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.timeline.vue b/src/client/app/desktop/views/pages/user/user.timeline.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.timeline.vue rename to src/client/app/desktop/views/pages/user/user.timeline.vue diff --git a/src/server/web/app/desktop/views/pages/user/user.vue b/src/client/app/desktop/views/pages/user/user.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/user/user.vue rename to src/client/app/desktop/views/pages/user/user.vue diff --git a/src/server/web/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue similarity index 100% rename from src/server/web/app/desktop/views/pages/welcome.vue rename to src/client/app/desktop/views/pages/welcome.vue diff --git a/src/server/web/app/desktop/views/widgets/activity.vue b/src/client/app/desktop/views/widgets/activity.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/activity.vue rename to src/client/app/desktop/views/widgets/activity.vue diff --git a/src/server/web/app/desktop/views/widgets/channel.channel.form.vue b/src/client/app/desktop/views/widgets/channel.channel.form.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/channel.channel.form.vue rename to src/client/app/desktop/views/widgets/channel.channel.form.vue diff --git a/src/server/web/app/desktop/views/widgets/channel.channel.post.vue b/src/client/app/desktop/views/widgets/channel.channel.post.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/channel.channel.post.vue rename to src/client/app/desktop/views/widgets/channel.channel.post.vue diff --git a/src/server/web/app/desktop/views/widgets/channel.channel.vue b/src/client/app/desktop/views/widgets/channel.channel.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/channel.channel.vue rename to src/client/app/desktop/views/widgets/channel.channel.vue diff --git a/src/server/web/app/desktop/views/widgets/channel.vue b/src/client/app/desktop/views/widgets/channel.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/channel.vue rename to src/client/app/desktop/views/widgets/channel.vue diff --git a/src/server/web/app/desktop/views/widgets/index.ts b/src/client/app/desktop/views/widgets/index.ts similarity index 100% rename from src/server/web/app/desktop/views/widgets/index.ts rename to src/client/app/desktop/views/widgets/index.ts diff --git a/src/server/web/app/desktop/views/widgets/messaging.vue b/src/client/app/desktop/views/widgets/messaging.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/messaging.vue rename to src/client/app/desktop/views/widgets/messaging.vue diff --git a/src/server/web/app/desktop/views/widgets/notifications.vue b/src/client/app/desktop/views/widgets/notifications.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/notifications.vue rename to src/client/app/desktop/views/widgets/notifications.vue diff --git a/src/server/web/app/desktop/views/widgets/polls.vue b/src/client/app/desktop/views/widgets/polls.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/polls.vue rename to src/client/app/desktop/views/widgets/polls.vue diff --git a/src/server/web/app/desktop/views/widgets/post-form.vue b/src/client/app/desktop/views/widgets/post-form.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/post-form.vue rename to src/client/app/desktop/views/widgets/post-form.vue diff --git a/src/server/web/app/desktop/views/widgets/profile.vue b/src/client/app/desktop/views/widgets/profile.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/profile.vue rename to src/client/app/desktop/views/widgets/profile.vue diff --git a/src/server/web/app/desktop/views/widgets/timemachine.vue b/src/client/app/desktop/views/widgets/timemachine.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/timemachine.vue rename to src/client/app/desktop/views/widgets/timemachine.vue diff --git a/src/server/web/app/desktop/views/widgets/trends.vue b/src/client/app/desktop/views/widgets/trends.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/trends.vue rename to src/client/app/desktop/views/widgets/trends.vue diff --git a/src/server/web/app/desktop/views/widgets/users.vue b/src/client/app/desktop/views/widgets/users.vue similarity index 100% rename from src/server/web/app/desktop/views/widgets/users.vue rename to src/client/app/desktop/views/widgets/users.vue diff --git a/src/server/web/app/dev/script.ts b/src/client/app/dev/script.ts similarity index 100% rename from src/server/web/app/dev/script.ts rename to src/client/app/dev/script.ts diff --git a/src/server/web/app/dev/style.styl b/src/client/app/dev/style.styl similarity index 100% rename from src/server/web/app/dev/style.styl rename to src/client/app/dev/style.styl diff --git a/src/server/web/app/dev/views/app.vue b/src/client/app/dev/views/app.vue similarity index 100% rename from src/server/web/app/dev/views/app.vue rename to src/client/app/dev/views/app.vue diff --git a/src/server/web/app/dev/views/apps.vue b/src/client/app/dev/views/apps.vue similarity index 100% rename from src/server/web/app/dev/views/apps.vue rename to src/client/app/dev/views/apps.vue diff --git a/src/server/web/app/dev/views/index.vue b/src/client/app/dev/views/index.vue similarity index 100% rename from src/server/web/app/dev/views/index.vue rename to src/client/app/dev/views/index.vue diff --git a/src/server/web/app/dev/views/new-app.vue b/src/client/app/dev/views/new-app.vue similarity index 100% rename from src/server/web/app/dev/views/new-app.vue rename to src/client/app/dev/views/new-app.vue diff --git a/src/server/web/app/dev/views/ui.vue b/src/client/app/dev/views/ui.vue similarity index 100% rename from src/server/web/app/dev/views/ui.vue rename to src/client/app/dev/views/ui.vue diff --git a/src/server/web/app/init.css b/src/client/app/init.css similarity index 100% rename from src/server/web/app/init.css rename to src/client/app/init.css diff --git a/src/server/web/app/init.ts b/src/client/app/init.ts similarity index 100% rename from src/server/web/app/init.ts rename to src/client/app/init.ts diff --git a/src/server/web/app/mobile/api/choose-drive-file.ts b/src/client/app/mobile/api/choose-drive-file.ts similarity index 100% rename from src/server/web/app/mobile/api/choose-drive-file.ts rename to src/client/app/mobile/api/choose-drive-file.ts diff --git a/src/server/web/app/mobile/api/choose-drive-folder.ts b/src/client/app/mobile/api/choose-drive-folder.ts similarity index 100% rename from src/server/web/app/mobile/api/choose-drive-folder.ts rename to src/client/app/mobile/api/choose-drive-folder.ts diff --git a/src/server/web/app/mobile/api/dialog.ts b/src/client/app/mobile/api/dialog.ts similarity index 100% rename from src/server/web/app/mobile/api/dialog.ts rename to src/client/app/mobile/api/dialog.ts diff --git a/src/server/web/app/mobile/api/input.ts b/src/client/app/mobile/api/input.ts similarity index 100% rename from src/server/web/app/mobile/api/input.ts rename to src/client/app/mobile/api/input.ts diff --git a/src/server/web/app/mobile/api/notify.ts b/src/client/app/mobile/api/notify.ts similarity index 100% rename from src/server/web/app/mobile/api/notify.ts rename to src/client/app/mobile/api/notify.ts diff --git a/src/server/web/app/mobile/api/post.ts b/src/client/app/mobile/api/post.ts similarity index 100% rename from src/server/web/app/mobile/api/post.ts rename to src/client/app/mobile/api/post.ts diff --git a/src/server/web/app/mobile/script.ts b/src/client/app/mobile/script.ts similarity index 100% rename from src/server/web/app/mobile/script.ts rename to src/client/app/mobile/script.ts diff --git a/src/server/web/app/mobile/style.styl b/src/client/app/mobile/style.styl similarity index 100% rename from src/server/web/app/mobile/style.styl rename to src/client/app/mobile/style.styl diff --git a/src/server/web/app/mobile/views/components/activity.vue b/src/client/app/mobile/views/components/activity.vue similarity index 100% rename from src/server/web/app/mobile/views/components/activity.vue rename to src/client/app/mobile/views/components/activity.vue diff --git a/src/server/web/app/mobile/views/components/drive-file-chooser.vue b/src/client/app/mobile/views/components/drive-file-chooser.vue similarity index 100% rename from src/server/web/app/mobile/views/components/drive-file-chooser.vue rename to src/client/app/mobile/views/components/drive-file-chooser.vue diff --git a/src/server/web/app/mobile/views/components/drive-folder-chooser.vue b/src/client/app/mobile/views/components/drive-folder-chooser.vue similarity index 100% rename from src/server/web/app/mobile/views/components/drive-folder-chooser.vue rename to src/client/app/mobile/views/components/drive-folder-chooser.vue diff --git a/src/server/web/app/mobile/views/components/drive.file-detail.vue b/src/client/app/mobile/views/components/drive.file-detail.vue similarity index 100% rename from src/server/web/app/mobile/views/components/drive.file-detail.vue rename to src/client/app/mobile/views/components/drive.file-detail.vue diff --git a/src/server/web/app/mobile/views/components/drive.file.vue b/src/client/app/mobile/views/components/drive.file.vue similarity index 100% rename from src/server/web/app/mobile/views/components/drive.file.vue rename to src/client/app/mobile/views/components/drive.file.vue diff --git a/src/server/web/app/mobile/views/components/drive.folder.vue b/src/client/app/mobile/views/components/drive.folder.vue similarity index 100% rename from src/server/web/app/mobile/views/components/drive.folder.vue rename to src/client/app/mobile/views/components/drive.folder.vue diff --git a/src/server/web/app/mobile/views/components/drive.vue b/src/client/app/mobile/views/components/drive.vue similarity index 100% rename from src/server/web/app/mobile/views/components/drive.vue rename to src/client/app/mobile/views/components/drive.vue diff --git a/src/server/web/app/mobile/views/components/follow-button.vue b/src/client/app/mobile/views/components/follow-button.vue similarity index 100% rename from src/server/web/app/mobile/views/components/follow-button.vue rename to src/client/app/mobile/views/components/follow-button.vue diff --git a/src/server/web/app/mobile/views/components/friends-maker.vue b/src/client/app/mobile/views/components/friends-maker.vue similarity index 100% rename from src/server/web/app/mobile/views/components/friends-maker.vue rename to src/client/app/mobile/views/components/friends-maker.vue diff --git a/src/server/web/app/mobile/views/components/index.ts b/src/client/app/mobile/views/components/index.ts similarity index 100% rename from src/server/web/app/mobile/views/components/index.ts rename to src/client/app/mobile/views/components/index.ts diff --git a/src/server/web/app/mobile/views/components/media-image.vue b/src/client/app/mobile/views/components/media-image.vue similarity index 100% rename from src/server/web/app/mobile/views/components/media-image.vue rename to src/client/app/mobile/views/components/media-image.vue diff --git a/src/server/web/app/mobile/views/components/media-video.vue b/src/client/app/mobile/views/components/media-video.vue similarity index 100% rename from src/server/web/app/mobile/views/components/media-video.vue rename to src/client/app/mobile/views/components/media-video.vue diff --git a/src/server/web/app/mobile/views/components/notification-preview.vue b/src/client/app/mobile/views/components/notification-preview.vue similarity index 100% rename from src/server/web/app/mobile/views/components/notification-preview.vue rename to src/client/app/mobile/views/components/notification-preview.vue diff --git a/src/server/web/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue similarity index 100% rename from src/server/web/app/mobile/views/components/notification.vue rename to src/client/app/mobile/views/components/notification.vue diff --git a/src/server/web/app/mobile/views/components/notifications.vue b/src/client/app/mobile/views/components/notifications.vue similarity index 100% rename from src/server/web/app/mobile/views/components/notifications.vue rename to src/client/app/mobile/views/components/notifications.vue diff --git a/src/server/web/app/mobile/views/components/notify.vue b/src/client/app/mobile/views/components/notify.vue similarity index 100% rename from src/server/web/app/mobile/views/components/notify.vue rename to src/client/app/mobile/views/components/notify.vue diff --git a/src/server/web/app/mobile/views/components/post-card.vue b/src/client/app/mobile/views/components/post-card.vue similarity index 100% rename from src/server/web/app/mobile/views/components/post-card.vue rename to src/client/app/mobile/views/components/post-card.vue diff --git a/src/server/web/app/mobile/views/components/post-detail.sub.vue b/src/client/app/mobile/views/components/post-detail.sub.vue similarity index 100% rename from src/server/web/app/mobile/views/components/post-detail.sub.vue rename to src/client/app/mobile/views/components/post-detail.sub.vue diff --git a/src/server/web/app/mobile/views/components/post-detail.vue b/src/client/app/mobile/views/components/post-detail.vue similarity index 100% rename from src/server/web/app/mobile/views/components/post-detail.vue rename to src/client/app/mobile/views/components/post-detail.vue diff --git a/src/server/web/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue similarity index 100% rename from src/server/web/app/mobile/views/components/post-form.vue rename to src/client/app/mobile/views/components/post-form.vue diff --git a/src/server/web/app/mobile/views/components/post-preview.vue b/src/client/app/mobile/views/components/post-preview.vue similarity index 100% rename from src/server/web/app/mobile/views/components/post-preview.vue rename to src/client/app/mobile/views/components/post-preview.vue diff --git a/src/server/web/app/mobile/views/components/post.sub.vue b/src/client/app/mobile/views/components/post.sub.vue similarity index 100% rename from src/server/web/app/mobile/views/components/post.sub.vue rename to src/client/app/mobile/views/components/post.sub.vue diff --git a/src/server/web/app/mobile/views/components/post.vue b/src/client/app/mobile/views/components/post.vue similarity index 100% rename from src/server/web/app/mobile/views/components/post.vue rename to src/client/app/mobile/views/components/post.vue diff --git a/src/server/web/app/mobile/views/components/posts.vue b/src/client/app/mobile/views/components/posts.vue similarity index 100% rename from src/server/web/app/mobile/views/components/posts.vue rename to src/client/app/mobile/views/components/posts.vue diff --git a/src/server/web/app/mobile/views/components/sub-post-content.vue b/src/client/app/mobile/views/components/sub-post-content.vue similarity index 100% rename from src/server/web/app/mobile/views/components/sub-post-content.vue rename to src/client/app/mobile/views/components/sub-post-content.vue diff --git a/src/server/web/app/mobile/views/components/timeline.vue b/src/client/app/mobile/views/components/timeline.vue similarity index 100% rename from src/server/web/app/mobile/views/components/timeline.vue rename to src/client/app/mobile/views/components/timeline.vue diff --git a/src/server/web/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue similarity index 100% rename from src/server/web/app/mobile/views/components/ui.header.vue rename to src/client/app/mobile/views/components/ui.header.vue diff --git a/src/server/web/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue similarity index 100% rename from src/server/web/app/mobile/views/components/ui.nav.vue rename to src/client/app/mobile/views/components/ui.nav.vue diff --git a/src/server/web/app/mobile/views/components/ui.vue b/src/client/app/mobile/views/components/ui.vue similarity index 100% rename from src/server/web/app/mobile/views/components/ui.vue rename to src/client/app/mobile/views/components/ui.vue diff --git a/src/server/web/app/mobile/views/components/user-card.vue b/src/client/app/mobile/views/components/user-card.vue similarity index 100% rename from src/server/web/app/mobile/views/components/user-card.vue rename to src/client/app/mobile/views/components/user-card.vue diff --git a/src/server/web/app/mobile/views/components/user-preview.vue b/src/client/app/mobile/views/components/user-preview.vue similarity index 100% rename from src/server/web/app/mobile/views/components/user-preview.vue rename to src/client/app/mobile/views/components/user-preview.vue diff --git a/src/server/web/app/mobile/views/components/user-timeline.vue b/src/client/app/mobile/views/components/user-timeline.vue similarity index 100% rename from src/server/web/app/mobile/views/components/user-timeline.vue rename to src/client/app/mobile/views/components/user-timeline.vue diff --git a/src/server/web/app/mobile/views/components/users-list.vue b/src/client/app/mobile/views/components/users-list.vue similarity index 100% rename from src/server/web/app/mobile/views/components/users-list.vue rename to src/client/app/mobile/views/components/users-list.vue diff --git a/src/server/web/app/mobile/views/components/widget-container.vue b/src/client/app/mobile/views/components/widget-container.vue similarity index 100% rename from src/server/web/app/mobile/views/components/widget-container.vue rename to src/client/app/mobile/views/components/widget-container.vue diff --git a/src/server/web/app/mobile/views/directives/index.ts b/src/client/app/mobile/views/directives/index.ts similarity index 100% rename from src/server/web/app/mobile/views/directives/index.ts rename to src/client/app/mobile/views/directives/index.ts diff --git a/src/server/web/app/mobile/views/directives/user-preview.ts b/src/client/app/mobile/views/directives/user-preview.ts similarity index 100% rename from src/server/web/app/mobile/views/directives/user-preview.ts rename to src/client/app/mobile/views/directives/user-preview.ts diff --git a/src/server/web/app/mobile/views/pages/drive.vue b/src/client/app/mobile/views/pages/drive.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/drive.vue rename to src/client/app/mobile/views/pages/drive.vue diff --git a/src/server/web/app/mobile/views/pages/followers.vue b/src/client/app/mobile/views/pages/followers.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/followers.vue rename to src/client/app/mobile/views/pages/followers.vue diff --git a/src/server/web/app/mobile/views/pages/following.vue b/src/client/app/mobile/views/pages/following.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/following.vue rename to src/client/app/mobile/views/pages/following.vue diff --git a/src/server/web/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/home.vue rename to src/client/app/mobile/views/pages/home.vue diff --git a/src/server/web/app/mobile/views/pages/index.vue b/src/client/app/mobile/views/pages/index.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/index.vue rename to src/client/app/mobile/views/pages/index.vue diff --git a/src/server/web/app/mobile/views/pages/messaging-room.vue b/src/client/app/mobile/views/pages/messaging-room.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/messaging-room.vue rename to src/client/app/mobile/views/pages/messaging-room.vue diff --git a/src/server/web/app/mobile/views/pages/messaging.vue b/src/client/app/mobile/views/pages/messaging.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/messaging.vue rename to src/client/app/mobile/views/pages/messaging.vue diff --git a/src/server/web/app/mobile/views/pages/notifications.vue b/src/client/app/mobile/views/pages/notifications.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/notifications.vue rename to src/client/app/mobile/views/pages/notifications.vue diff --git a/src/server/web/app/mobile/views/pages/othello.vue b/src/client/app/mobile/views/pages/othello.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/othello.vue rename to src/client/app/mobile/views/pages/othello.vue diff --git a/src/server/web/app/mobile/views/pages/post.vue b/src/client/app/mobile/views/pages/post.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/post.vue rename to src/client/app/mobile/views/pages/post.vue diff --git a/src/server/web/app/mobile/views/pages/profile-setting.vue b/src/client/app/mobile/views/pages/profile-setting.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/profile-setting.vue rename to src/client/app/mobile/views/pages/profile-setting.vue diff --git a/src/server/web/app/mobile/views/pages/search.vue b/src/client/app/mobile/views/pages/search.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/search.vue rename to src/client/app/mobile/views/pages/search.vue diff --git a/src/server/web/app/mobile/views/pages/selectdrive.vue b/src/client/app/mobile/views/pages/selectdrive.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/selectdrive.vue rename to src/client/app/mobile/views/pages/selectdrive.vue diff --git a/src/server/web/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/settings.vue rename to src/client/app/mobile/views/pages/settings.vue diff --git a/src/server/web/app/mobile/views/pages/signup.vue b/src/client/app/mobile/views/pages/signup.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/signup.vue rename to src/client/app/mobile/views/pages/signup.vue diff --git a/src/server/web/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/user.vue rename to src/client/app/mobile/views/pages/user.vue diff --git a/src/server/web/app/mobile/views/pages/user/home.followers-you-know.vue b/src/client/app/mobile/views/pages/user/home.followers-you-know.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/user/home.followers-you-know.vue rename to src/client/app/mobile/views/pages/user/home.followers-you-know.vue diff --git a/src/server/web/app/mobile/views/pages/user/home.friends.vue b/src/client/app/mobile/views/pages/user/home.friends.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/user/home.friends.vue rename to src/client/app/mobile/views/pages/user/home.friends.vue diff --git a/src/server/web/app/mobile/views/pages/user/home.photos.vue b/src/client/app/mobile/views/pages/user/home.photos.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/user/home.photos.vue rename to src/client/app/mobile/views/pages/user/home.photos.vue diff --git a/src/server/web/app/mobile/views/pages/user/home.posts.vue b/src/client/app/mobile/views/pages/user/home.posts.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/user/home.posts.vue rename to src/client/app/mobile/views/pages/user/home.posts.vue diff --git a/src/server/web/app/mobile/views/pages/user/home.vue b/src/client/app/mobile/views/pages/user/home.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/user/home.vue rename to src/client/app/mobile/views/pages/user/home.vue diff --git a/src/server/web/app/mobile/views/pages/welcome.vue b/src/client/app/mobile/views/pages/welcome.vue similarity index 100% rename from src/server/web/app/mobile/views/pages/welcome.vue rename to src/client/app/mobile/views/pages/welcome.vue diff --git a/src/server/web/app/mobile/views/widgets/activity.vue b/src/client/app/mobile/views/widgets/activity.vue similarity index 100% rename from src/server/web/app/mobile/views/widgets/activity.vue rename to src/client/app/mobile/views/widgets/activity.vue diff --git a/src/server/web/app/mobile/views/widgets/index.ts b/src/client/app/mobile/views/widgets/index.ts similarity index 100% rename from src/server/web/app/mobile/views/widgets/index.ts rename to src/client/app/mobile/views/widgets/index.ts diff --git a/src/server/web/app/mobile/views/widgets/profile.vue b/src/client/app/mobile/views/widgets/profile.vue similarity index 100% rename from src/server/web/app/mobile/views/widgets/profile.vue rename to src/client/app/mobile/views/widgets/profile.vue diff --git a/src/server/web/app/reset.styl b/src/client/app/reset.styl similarity index 100% rename from src/server/web/app/reset.styl rename to src/client/app/reset.styl diff --git a/src/server/web/app/safe.js b/src/client/app/safe.js similarity index 100% rename from src/server/web/app/safe.js rename to src/client/app/safe.js diff --git a/src/server/web/app/stats/style.styl b/src/client/app/stats/style.styl similarity index 100% rename from src/server/web/app/stats/style.styl rename to src/client/app/stats/style.styl diff --git a/src/server/web/app/stats/tags/index.tag b/src/client/app/stats/tags/index.tag similarity index 100% rename from src/server/web/app/stats/tags/index.tag rename to src/client/app/stats/tags/index.tag diff --git a/src/server/web/app/stats/tags/index.ts b/src/client/app/stats/tags/index.ts similarity index 100% rename from src/server/web/app/stats/tags/index.ts rename to src/client/app/stats/tags/index.ts diff --git a/src/server/web/app/status/style.styl b/src/client/app/status/style.styl similarity index 100% rename from src/server/web/app/status/style.styl rename to src/client/app/status/style.styl diff --git a/src/server/web/app/status/tags/index.tag b/src/client/app/status/tags/index.tag similarity index 100% rename from src/server/web/app/status/tags/index.tag rename to src/client/app/status/tags/index.tag diff --git a/src/server/web/app/status/tags/index.ts b/src/client/app/status/tags/index.ts similarity index 100% rename from src/server/web/app/status/tags/index.ts rename to src/client/app/status/tags/index.ts diff --git a/src/server/web/app/sw.js b/src/client/app/sw.js similarity index 100% rename from src/server/web/app/sw.js rename to src/client/app/sw.js diff --git a/src/server/web/app/tsconfig.json b/src/client/app/tsconfig.json similarity index 100% rename from src/server/web/app/tsconfig.json rename to src/client/app/tsconfig.json diff --git a/src/server/web/app/v.d.ts b/src/client/app/v.d.ts similarity index 100% rename from src/server/web/app/v.d.ts rename to src/client/app/v.d.ts diff --git a/src/server/web/assets/404.js b/src/client/assets/404.js similarity index 100% rename from src/server/web/assets/404.js rename to src/client/assets/404.js diff --git a/src/server/web/assets/code-highlight.css b/src/client/assets/code-highlight.css similarity index 100% rename from src/server/web/assets/code-highlight.css rename to src/client/assets/code-highlight.css diff --git a/src/server/web/assets/error.jpg b/src/client/assets/error.jpg similarity index 100% rename from src/server/web/assets/error.jpg rename to src/client/assets/error.jpg diff --git a/src/server/web/assets/favicon.ico b/src/client/assets/favicon.ico similarity index 100% rename from src/server/web/assets/favicon.ico rename to src/client/assets/favicon.ico diff --git a/src/server/web/assets/label.svg b/src/client/assets/label.svg similarity index 100% rename from src/server/web/assets/label.svg rename to src/client/assets/label.svg diff --git a/src/server/web/assets/manifest.json b/src/client/assets/manifest.json similarity index 100% rename from src/server/web/assets/manifest.json rename to src/client/assets/manifest.json diff --git a/src/server/web/assets/message.mp3 b/src/client/assets/message.mp3 similarity index 100% rename from src/server/web/assets/message.mp3 rename to src/client/assets/message.mp3 diff --git a/src/server/web/assets/othello-put-me.mp3 b/src/client/assets/othello-put-me.mp3 similarity index 100% rename from src/server/web/assets/othello-put-me.mp3 rename to src/client/assets/othello-put-me.mp3 diff --git a/src/server/web/assets/othello-put-you.mp3 b/src/client/assets/othello-put-you.mp3 similarity index 100% rename from src/server/web/assets/othello-put-you.mp3 rename to src/client/assets/othello-put-you.mp3 diff --git a/src/server/web/assets/post.mp3 b/src/client/assets/post.mp3 similarity index 100% rename from src/server/web/assets/post.mp3 rename to src/client/assets/post.mp3 diff --git a/src/server/web/assets/reactions/angry.png b/src/client/assets/reactions/angry.png similarity index 100% rename from src/server/web/assets/reactions/angry.png rename to src/client/assets/reactions/angry.png diff --git a/src/server/web/assets/reactions/confused.png b/src/client/assets/reactions/confused.png similarity index 100% rename from src/server/web/assets/reactions/confused.png rename to src/client/assets/reactions/confused.png diff --git a/src/server/web/assets/reactions/congrats.png b/src/client/assets/reactions/congrats.png similarity index 100% rename from src/server/web/assets/reactions/congrats.png rename to src/client/assets/reactions/congrats.png diff --git a/src/server/web/assets/reactions/hmm.png b/src/client/assets/reactions/hmm.png similarity index 100% rename from src/server/web/assets/reactions/hmm.png rename to src/client/assets/reactions/hmm.png diff --git a/src/server/web/assets/reactions/laugh.png b/src/client/assets/reactions/laugh.png similarity index 100% rename from src/server/web/assets/reactions/laugh.png rename to src/client/assets/reactions/laugh.png diff --git a/src/server/web/assets/reactions/like.png b/src/client/assets/reactions/like.png similarity index 100% rename from src/server/web/assets/reactions/like.png rename to src/client/assets/reactions/like.png diff --git a/src/server/web/assets/reactions/love.png b/src/client/assets/reactions/love.png similarity index 100% rename from src/server/web/assets/reactions/love.png rename to src/client/assets/reactions/love.png diff --git a/src/server/web/assets/reactions/pudding.png b/src/client/assets/reactions/pudding.png similarity index 100% rename from src/server/web/assets/reactions/pudding.png rename to src/client/assets/reactions/pudding.png diff --git a/src/server/web/assets/reactions/surprise.png b/src/client/assets/reactions/surprise.png similarity index 100% rename from src/server/web/assets/reactions/surprise.png rename to src/client/assets/reactions/surprise.png diff --git a/src/server/web/assets/recover.html b/src/client/assets/recover.html similarity index 100% rename from src/server/web/assets/recover.html rename to src/client/assets/recover.html diff --git a/src/server/web/assets/title.svg b/src/client/assets/title.svg similarity index 100% rename from src/server/web/assets/title.svg rename to src/client/assets/title.svg diff --git a/src/server/web/assets/unread.svg b/src/client/assets/unread.svg similarity index 100% rename from src/server/web/assets/unread.svg rename to src/client/assets/unread.svg diff --git a/src/server/web/assets/welcome-bg.svg b/src/client/assets/welcome-bg.svg similarity index 100% rename from src/server/web/assets/welcome-bg.svg rename to src/client/assets/welcome-bg.svg diff --git a/src/server/web/assets/welcome-fg.svg b/src/client/assets/welcome-fg.svg similarity index 100% rename from src/server/web/assets/welcome-fg.svg rename to src/client/assets/welcome-fg.svg diff --git a/src/server/web/const.styl b/src/client/const.styl similarity index 74% rename from src/server/web/const.styl rename to src/client/const.styl index f16e07782..b6560701d 100644 --- a/src/server/web/const.styl +++ b/src/client/const.styl @@ -1,4 +1,4 @@ -json('../../const.json') +json('../const.json') $theme-color = themeColor $theme-color-foreground = themeColorForeground diff --git a/src/server/web/docs/about.en.pug b/src/client/docs/about.en.pug similarity index 100% rename from src/server/web/docs/about.en.pug rename to src/client/docs/about.en.pug diff --git a/src/server/web/docs/about.ja.pug b/src/client/docs/about.ja.pug similarity index 100% rename from src/server/web/docs/about.ja.pug rename to src/client/docs/about.ja.pug diff --git a/src/server/web/docs/api.ja.pug b/src/client/docs/api.ja.pug similarity index 100% rename from src/server/web/docs/api.ja.pug rename to src/client/docs/api.ja.pug diff --git a/src/server/web/docs/api/endpoints/posts/create.yaml b/src/client/docs/api/endpoints/posts/create.yaml similarity index 100% rename from src/server/web/docs/api/endpoints/posts/create.yaml rename to src/client/docs/api/endpoints/posts/create.yaml diff --git a/src/server/web/docs/api/endpoints/posts/timeline.yaml b/src/client/docs/api/endpoints/posts/timeline.yaml similarity index 100% rename from src/server/web/docs/api/endpoints/posts/timeline.yaml rename to src/client/docs/api/endpoints/posts/timeline.yaml diff --git a/src/server/web/docs/api/endpoints/style.styl b/src/client/docs/api/endpoints/style.styl similarity index 100% rename from src/server/web/docs/api/endpoints/style.styl rename to src/client/docs/api/endpoints/style.styl diff --git a/src/server/web/docs/api/endpoints/view.pug b/src/client/docs/api/endpoints/view.pug similarity index 100% rename from src/server/web/docs/api/endpoints/view.pug rename to src/client/docs/api/endpoints/view.pug diff --git a/src/server/web/docs/api/entities/drive-file.yaml b/src/client/docs/api/entities/drive-file.yaml similarity index 100% rename from src/server/web/docs/api/entities/drive-file.yaml rename to src/client/docs/api/entities/drive-file.yaml diff --git a/src/server/web/docs/api/entities/post.yaml b/src/client/docs/api/entities/post.yaml similarity index 100% rename from src/server/web/docs/api/entities/post.yaml rename to src/client/docs/api/entities/post.yaml diff --git a/src/server/web/docs/api/entities/style.styl b/src/client/docs/api/entities/style.styl similarity index 100% rename from src/server/web/docs/api/entities/style.styl rename to src/client/docs/api/entities/style.styl diff --git a/src/server/web/docs/api/entities/user.yaml b/src/client/docs/api/entities/user.yaml similarity index 100% rename from src/server/web/docs/api/entities/user.yaml rename to src/client/docs/api/entities/user.yaml diff --git a/src/server/web/docs/api/entities/view.pug b/src/client/docs/api/entities/view.pug similarity index 100% rename from src/server/web/docs/api/entities/view.pug rename to src/client/docs/api/entities/view.pug diff --git a/src/server/web/docs/api/gulpfile.ts b/src/client/docs/api/gulpfile.ts similarity index 80% rename from src/server/web/docs/api/gulpfile.ts rename to src/client/docs/api/gulpfile.ts index 37935413d..16066b0d2 100644 --- a/src/server/web/docs/api/gulpfile.ts +++ b/src/client/docs/api/gulpfile.ts @@ -10,10 +10,10 @@ import * as pug from 'pug'; import * as yaml from 'js-yaml'; import * as mkdirp from 'mkdirp'; -import locales from '../../../../../locales'; -import I18nReplacer from '../../../../build/i18n'; -import fa from '../../../../build/fa'; -import config from './../../../../conf'; +import locales from '../../../../locales'; +import I18nReplacer from '../../../build/i18n'; +import fa from '../../../build/fa'; +import config from './../../../conf'; import generateVars from '../vars'; @@ -94,7 +94,7 @@ gulp.task('doc:api', [ gulp.task('doc:api:endpoints', async () => { const commonVars = await generateVars(); - glob('./src/server/web/docs/api/endpoints/**/*.yaml', (globErr, files) => { + glob('./src/client/docs/api/endpoints/**/*.yaml', (globErr, files) => { if (globErr) { console.error(globErr); return; @@ -115,10 +115,10 @@ gulp.task('doc:api:endpoints', async () => { resDefs: ep.res ? extractDefs(ep.res) : null, }; langs.forEach(lang => { - pug.renderFile('./src/server/web/docs/api/endpoints/view.pug', Object.assign({}, vars, { + pug.renderFile('./src/client/docs/api/endpoints/view.pug', Object.assign({}, vars, { lang, title: ep.endpoint, - src: `https://github.com/syuilo/misskey/tree/master/src/server/web/docs/api/endpoints/${ep.endpoint}.yaml`, + src: `https://github.com/syuilo/misskey/tree/master/src/client/docs/api/endpoints/${ep.endpoint}.yaml`, kebab, common: commonVars }), (renderErr, html) => { @@ -129,7 +129,7 @@ gulp.task('doc:api:endpoints', async () => { const i18n = new I18nReplacer(lang); html = html.replace(i18n.pattern, i18n.replacement); html = fa(html); - const htmlPath = `./built/server/web/docs/${lang}/api/endpoints/${ep.endpoint}.html`; + const htmlPath = `./built/client/docs/${lang}/api/endpoints/${ep.endpoint}.html`; mkdirp(path.dirname(htmlPath), (mkdirErr) => { if (mkdirErr) { console.error(mkdirErr); @@ -145,7 +145,7 @@ gulp.task('doc:api:endpoints', async () => { gulp.task('doc:api:entities', async () => { const commonVars = await generateVars(); - glob('./src/server/web/docs/api/entities/**/*.yaml', (globErr, files) => { + glob('./src/client/docs/api/entities/**/*.yaml', (globErr, files) => { if (globErr) { console.error(globErr); return; @@ -159,10 +159,10 @@ gulp.task('doc:api:entities', async () => { propDefs: extractDefs(entity.props), }; langs.forEach(lang => { - pug.renderFile('./src/server/web/docs/api/entities/view.pug', Object.assign({}, vars, { + pug.renderFile('./src/client/docs/api/entities/view.pug', Object.assign({}, vars, { lang, title: entity.name, - src: `https://github.com/syuilo/misskey/tree/master/src/server/web/docs/api/entities/${kebab(entity.name)}.yaml`, + src: `https://github.com/syuilo/misskey/tree/master/src/client/docs/api/entities/${kebab(entity.name)}.yaml`, kebab, common: commonVars }), (renderErr, html) => { @@ -173,7 +173,7 @@ gulp.task('doc:api:entities', async () => { const i18n = new I18nReplacer(lang); html = html.replace(i18n.pattern, i18n.replacement); html = fa(html); - const htmlPath = `./built/server/web/docs/${lang}/api/entities/${kebab(entity.name)}.html`; + const htmlPath = `./built/client/docs/${lang}/api/entities/${kebab(entity.name)}.html`; mkdirp(path.dirname(htmlPath), (mkdirErr) => { if (mkdirErr) { console.error(mkdirErr); diff --git a/src/server/web/docs/api/mixins.pug b/src/client/docs/api/mixins.pug similarity index 100% rename from src/server/web/docs/api/mixins.pug rename to src/client/docs/api/mixins.pug diff --git a/src/server/web/docs/api/style.styl b/src/client/docs/api/style.styl similarity index 100% rename from src/server/web/docs/api/style.styl rename to src/client/docs/api/style.styl diff --git a/src/server/web/docs/gulpfile.ts b/src/client/docs/gulpfile.ts similarity index 74% rename from src/server/web/docs/gulpfile.ts rename to src/client/docs/gulpfile.ts index 7b36cf667..56bf6188c 100644 --- a/src/server/web/docs/gulpfile.ts +++ b/src/client/docs/gulpfile.ts @@ -11,8 +11,8 @@ import * as mkdirp from 'mkdirp'; import stylus = require('gulp-stylus'); import cssnano = require('gulp-cssnano'); -import I18nReplacer from '../../../build/i18n'; -import fa from '../../../build/fa'; +import I18nReplacer from '../../build/i18n'; +import fa from '../../build/fa'; import generateVars from './vars'; require('./api/gulpfile.ts'); @@ -26,7 +26,7 @@ gulp.task('doc', [ gulp.task('doc:docs', async () => { const commonVars = await generateVars(); - glob('./src/server/web/docs/**/*.*.pug', (globErr, files) => { + glob('./src/client/docs/**/*.*.pug', (globErr, files) => { if (globErr) { console.error(globErr); return; @@ -37,7 +37,7 @@ gulp.task('doc:docs', async () => { common: commonVars, lang: lang, title: fs.readFileSync(file, 'utf-8').match(/^h1 (.+?)\r?\n/)[1], - src: `https://github.com/syuilo/misskey/tree/master/src/server/web/docs/${name}.${lang}.pug`, + src: `https://github.com/syuilo/misskey/tree/master/src/client/docs/${name}.${lang}.pug`, }; pug.renderFile(file, vars, (renderErr, content) => { if (renderErr) { @@ -45,7 +45,7 @@ gulp.task('doc:docs', async () => { return; } - pug.renderFile('./src/server/web/docs/layout.pug', Object.assign({}, vars, { + pug.renderFile('./src/client/docs/layout.pug', Object.assign({}, vars, { content }), (renderErr2, html) => { if (renderErr2) { @@ -55,7 +55,7 @@ gulp.task('doc:docs', async () => { const i18n = new I18nReplacer(lang); html = html.replace(i18n.pattern, i18n.replacement); html = fa(html); - const htmlPath = `./built/server/web/docs/${lang}/${name}.html`; + const htmlPath = `./built/client/docs/${lang}/${name}.html`; mkdirp(path.dirname(htmlPath), (mkdirErr) => { if (mkdirErr) { console.error(mkdirErr); @@ -70,8 +70,8 @@ gulp.task('doc:docs', async () => { }); gulp.task('doc:styles', () => - gulp.src('./src/server/web/docs/**/*.styl') + gulp.src('./src/client/docs/**/*.styl') .pipe(stylus()) .pipe((cssnano as any)()) - .pipe(gulp.dest('./built/server/web/docs/assets/')) + .pipe(gulp.dest('./built/client/docs/assets/')) ); diff --git a/src/server/web/docs/index.en.pug b/src/client/docs/index.en.pug similarity index 100% rename from src/server/web/docs/index.en.pug rename to src/client/docs/index.en.pug diff --git a/src/server/web/docs/index.ja.pug b/src/client/docs/index.ja.pug similarity index 100% rename from src/server/web/docs/index.ja.pug rename to src/client/docs/index.ja.pug diff --git a/src/server/web/docs/layout.pug b/src/client/docs/layout.pug similarity index 100% rename from src/server/web/docs/layout.pug rename to src/client/docs/layout.pug diff --git a/src/server/web/docs/license.en.pug b/src/client/docs/license.en.pug similarity index 100% rename from src/server/web/docs/license.en.pug rename to src/client/docs/license.en.pug diff --git a/src/server/web/docs/license.ja.pug b/src/client/docs/license.ja.pug similarity index 100% rename from src/server/web/docs/license.ja.pug rename to src/client/docs/license.ja.pug diff --git a/src/server/web/docs/mute.ja.pug b/src/client/docs/mute.ja.pug similarity index 100% rename from src/server/web/docs/mute.ja.pug rename to src/client/docs/mute.ja.pug diff --git a/src/server/web/docs/search.ja.pug b/src/client/docs/search.ja.pug similarity index 100% rename from src/server/web/docs/search.ja.pug rename to src/client/docs/search.ja.pug diff --git a/src/server/web/docs/server.ts b/src/client/docs/server.ts similarity index 100% rename from src/server/web/docs/server.ts rename to src/client/docs/server.ts diff --git a/src/server/web/docs/style.styl b/src/client/docs/style.styl similarity index 100% rename from src/server/web/docs/style.styl rename to src/client/docs/style.styl diff --git a/src/server/web/docs/tou.ja.pug b/src/client/docs/tou.ja.pug similarity index 100% rename from src/server/web/docs/tou.ja.pug rename to src/client/docs/tou.ja.pug diff --git a/src/server/web/docs/ui.styl b/src/client/docs/ui.styl similarity index 100% rename from src/server/web/docs/ui.styl rename to src/client/docs/ui.styl diff --git a/src/server/web/docs/vars.ts b/src/client/docs/vars.ts similarity index 76% rename from src/server/web/docs/vars.ts rename to src/client/docs/vars.ts index 5096a39c9..1a3b48bd7 100644 --- a/src/server/web/docs/vars.ts +++ b/src/client/docs/vars.ts @@ -5,27 +5,27 @@ import * as yaml from 'js-yaml'; import * as licenseChecker from 'license-checker'; import * as tmp from 'tmp'; -import { fa } from '../../../build/fa'; -import config from '../../../conf'; -import { licenseHtml } from '../../../build/license'; -const constants = require('../../../const.json'); +import { fa } from '../../build/fa'; +import config from '../../conf'; +import { licenseHtml } from '../../build/license'; +const constants = require('../../const.json'); export default async function(): Promise<{ [key: string]: any }> { const vars = {} as { [key: string]: any }; - const endpoints = glob.sync('./src/server/web/docs/api/endpoints/**/*.yaml'); + const endpoints = glob.sync('./src/client/docs/api/endpoints/**/*.yaml'); vars['endpoints'] = endpoints.map(ep => { const _ep = yaml.safeLoad(fs.readFileSync(ep, 'utf-8')); return _ep.endpoint; }); - const entities = glob.sync('./src/server/web/docs/api/entities/**/*.yaml'); + const entities = glob.sync('./src/client/docs/api/entities/**/*.yaml'); vars['entities'] = entities.map(x => { const _x = yaml.safeLoad(fs.readFileSync(x, 'utf-8')); return _x.name; }); - const docs = glob.sync('./src/server/web/docs/**/*.*.pug'); + const docs = glob.sync('./src/client/docs/**/*.*.pug'); vars['docs'] = {}; docs.forEach(x => { const [, name, lang] = x.match(/docs\/(.+?)\.(.+?)\.pug$/); @@ -53,7 +53,7 @@ export default async function(): Promise<{ [key: string]: any }> { licenseText: '' }), 'utf-8'); const dependencies = await util.promisify(licenseChecker.init).bind(licenseChecker)({ - start: __dirname + '/../../../../', + start: __dirname + '/../../../', customPath: tmpObj.name }); tmpObj.removeCallback(); diff --git a/src/server/web/element.scss b/src/client/element.scss similarity index 91% rename from src/server/web/element.scss rename to src/client/element.scss index 7e6d0e709..917198e02 100644 --- a/src/server/web/element.scss +++ b/src/client/element.scss @@ -1,7 +1,7 @@ /* Element variable definitons */ /* SEE: http://element.eleme.io/#/en-US/component/custom-theme */ -@import '../../const.json'; +@import '../const.json'; /* theme color */ $--color-primary: $themeColor; diff --git a/src/server/web/style.styl b/src/client/style.styl similarity index 100% rename from src/server/web/style.styl rename to src/client/style.styl diff --git a/src/server/common/get-notification-summary.ts b/src/common/get-notification-summary.ts similarity index 100% rename from src/server/common/get-notification-summary.ts rename to src/common/get-notification-summary.ts diff --git a/src/server/common/get-post-summary.ts b/src/common/get-post-summary.ts similarity index 100% rename from src/server/common/get-post-summary.ts rename to src/common/get-post-summary.ts diff --git a/src/server/common/get-reaction-emoji.ts b/src/common/get-reaction-emoji.ts similarity index 100% rename from src/server/common/get-reaction-emoji.ts rename to src/common/get-reaction-emoji.ts diff --git a/src/server/common/othello/ai/back.ts b/src/common/othello/ai/back.ts similarity index 99% rename from src/server/common/othello/ai/back.ts rename to src/common/othello/ai/back.ts index 629e57113..0950adaa9 100644 --- a/src/server/common/othello/ai/back.ts +++ b/src/common/othello/ai/back.ts @@ -8,7 +8,7 @@ import * as request from 'request-promise-native'; import Othello, { Color } from '../core'; -import conf from '../../../../conf'; +import conf from '../../../conf'; let game; let form; diff --git a/src/server/common/othello/ai/front.ts b/src/common/othello/ai/front.ts similarity index 99% rename from src/server/common/othello/ai/front.ts rename to src/common/othello/ai/front.ts index fb7a9be13..e5496132f 100644 --- a/src/server/common/othello/ai/front.ts +++ b/src/common/othello/ai/front.ts @@ -10,7 +10,7 @@ import * as childProcess from 'child_process'; const WebSocket = require('ws'); import * as ReconnectingWebSocket from 'reconnecting-websocket'; import * as request from 'request-promise-native'; -import conf from '../../../../conf'; +import conf from '../../../conf'; // 設定 //////////////////////////////////////////////////////// diff --git a/src/server/common/othello/ai/index.ts b/src/common/othello/ai/index.ts similarity index 100% rename from src/server/common/othello/ai/index.ts rename to src/common/othello/ai/index.ts diff --git a/src/server/common/othello/core.ts b/src/common/othello/core.ts similarity index 100% rename from src/server/common/othello/core.ts rename to src/common/othello/core.ts diff --git a/src/server/common/othello/maps.ts b/src/common/othello/maps.ts similarity index 100% rename from src/server/common/othello/maps.ts rename to src/common/othello/maps.ts diff --git a/src/server/api/common/text/core/syntax-highlighter.ts b/src/common/text/core/syntax-highlighter.ts similarity index 100% rename from src/server/api/common/text/core/syntax-highlighter.ts rename to src/common/text/core/syntax-highlighter.ts diff --git a/src/server/api/common/text/elements/bold.ts b/src/common/text/elements/bold.ts similarity index 100% rename from src/server/api/common/text/elements/bold.ts rename to src/common/text/elements/bold.ts diff --git a/src/server/api/common/text/elements/code.ts b/src/common/text/elements/code.ts similarity index 100% rename from src/server/api/common/text/elements/code.ts rename to src/common/text/elements/code.ts diff --git a/src/server/api/common/text/elements/emoji.ts b/src/common/text/elements/emoji.ts similarity index 100% rename from src/server/api/common/text/elements/emoji.ts rename to src/common/text/elements/emoji.ts diff --git a/src/server/api/common/text/elements/hashtag.ts b/src/common/text/elements/hashtag.ts similarity index 100% rename from src/server/api/common/text/elements/hashtag.ts rename to src/common/text/elements/hashtag.ts diff --git a/src/server/api/common/text/elements/inline-code.ts b/src/common/text/elements/inline-code.ts similarity index 100% rename from src/server/api/common/text/elements/inline-code.ts rename to src/common/text/elements/inline-code.ts diff --git a/src/server/api/common/text/elements/link.ts b/src/common/text/elements/link.ts similarity index 100% rename from src/server/api/common/text/elements/link.ts rename to src/common/text/elements/link.ts diff --git a/src/server/api/common/text/elements/mention.ts b/src/common/text/elements/mention.ts similarity index 82% rename from src/server/api/common/text/elements/mention.ts rename to src/common/text/elements/mention.ts index 2025dfdaa..d05a76649 100644 --- a/src/server/api/common/text/elements/mention.ts +++ b/src/common/text/elements/mention.ts @@ -1,7 +1,7 @@ /** * Mention */ -import parseAcct from '../../../../common/user/parse-acct'; +import parseAcct from '../../../common/user/parse-acct'; module.exports = text => { const match = text.match(/^(?:@[a-zA-Z0-9\-]+){1,2}/); diff --git a/src/server/api/common/text/elements/quote.ts b/src/common/text/elements/quote.ts similarity index 100% rename from src/server/api/common/text/elements/quote.ts rename to src/common/text/elements/quote.ts diff --git a/src/server/api/common/text/elements/url.ts b/src/common/text/elements/url.ts similarity index 100% rename from src/server/api/common/text/elements/url.ts rename to src/common/text/elements/url.ts diff --git a/src/server/api/common/text/index.ts b/src/common/text/index.ts similarity index 100% rename from src/server/api/common/text/index.ts rename to src/common/text/index.ts diff --git a/src/server/common/user/get-acct.ts b/src/common/user/get-acct.ts similarity index 100% rename from src/server/common/user/get-acct.ts rename to src/common/user/get-acct.ts diff --git a/src/server/common/user/get-summary.ts b/src/common/user/get-summary.ts similarity index 90% rename from src/server/common/user/get-summary.ts rename to src/common/user/get-summary.ts index b314a5cef..47592c86b 100644 --- a/src/server/common/user/get-summary.ts +++ b/src/common/user/get-summary.ts @@ -1,4 +1,4 @@ -import { ILocalAccount, IUser } from '../../api/models/user'; +import { ILocalAccount, IUser } from '../../models/user'; import getAcct from './get-acct'; /** diff --git a/src/server/common/user/parse-acct.ts b/src/common/user/parse-acct.ts similarity index 100% rename from src/server/common/user/parse-acct.ts rename to src/common/user/parse-acct.ts diff --git a/src/server/api/models/access-token.ts b/src/models/access-token.ts similarity index 90% rename from src/server/api/models/access-token.ts rename to src/models/access-token.ts index 59bb09426..4451ca140 100644 --- a/src/server/api/models/access-token.ts +++ b/src/models/access-token.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const AccessToken = db.get('accessTokens'); AccessToken.createIndex('token'); diff --git a/src/server/api/models/app.ts b/src/models/app.ts similarity index 96% rename from src/server/api/models/app.ts rename to src/models/app.ts index 3c17c50fd..3b80a1602 100644 --- a/src/server/api/models/app.ts +++ b/src/models/app.ts @@ -1,8 +1,8 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); import AccessToken from './access-token'; -import db from '../../../db/mongodb'; -import config from '../../../conf'; +import db from '../db/mongodb'; +import config from '../conf'; const App = db.get('apps'); App.createIndex('nameId'); diff --git a/src/server/api/models/auth-session.ts b/src/models/auth-session.ts similarity index 96% rename from src/server/api/models/auth-session.ts rename to src/models/auth-session.ts index 2da40b1ea..6fe3468a7 100644 --- a/src/server/api/models/auth-session.ts +++ b/src/models/auth-session.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import { pack as packApp } from './app'; const AuthSession = db.get('authSessions'); diff --git a/src/server/api/models/channel-watching.ts b/src/models/channel-watching.ts similarity index 88% rename from src/server/api/models/channel-watching.ts rename to src/models/channel-watching.ts index a26b7edb9..44ca06883 100644 --- a/src/server/api/models/channel-watching.ts +++ b/src/models/channel-watching.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const ChannelWatching = db.get('channelWatching'); export default ChannelWatching; diff --git a/src/server/api/models/channel.ts b/src/models/channel.ts similarity index 97% rename from src/server/api/models/channel.ts rename to src/models/channel.ts index 9f94c5a8d..67386ac07 100644 --- a/src/server/api/models/channel.ts +++ b/src/models/channel.ts @@ -2,7 +2,7 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); import { IUser } from './user'; import Watching from './channel-watching'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const Channel = db.get('channels'); export default Channel; diff --git a/src/server/api/models/drive-file.ts b/src/models/drive-file.ts similarity index 96% rename from src/server/api/models/drive-file.ts rename to src/models/drive-file.ts index 04c9c54bd..9e0df58c4 100644 --- a/src/server/api/models/drive-file.ts +++ b/src/models/drive-file.ts @@ -1,8 +1,8 @@ import * as mongodb from 'mongodb'; import deepcopy = require('deepcopy'); import { pack as packFolder } from './drive-folder'; -import config from '../../../conf'; -import monkDb, { nativeDbConn } from '../../../db/mongodb'; +import config from '../conf'; +import monkDb, { nativeDbConn } from '../db/mongodb'; const DriveFile = monkDb.get('driveFiles.files'); diff --git a/src/server/api/models/drive-folder.ts b/src/models/drive-folder.ts similarity index 97% rename from src/server/api/models/drive-folder.ts rename to src/models/drive-folder.ts index 4ecafaa15..ad27b151b 100644 --- a/src/server/api/models/drive-folder.ts +++ b/src/models/drive-folder.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import DriveFile from './drive-file'; const DriveFolder = db.get('drive_folders'); diff --git a/src/server/api/models/favorite.ts b/src/models/favorite.ts similarity index 85% rename from src/server/api/models/favorite.ts rename to src/models/favorite.ts index 5fb4db95a..2fa00e99c 100644 --- a/src/server/api/models/favorite.ts +++ b/src/models/favorite.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const Favorites = db.get('favorites'); export default Favorites; diff --git a/src/server/api/models/following.ts b/src/models/following.ts similarity index 87% rename from src/server/api/models/following.ts rename to src/models/following.ts index 552e94604..3f8a9be50 100644 --- a/src/server/api/models/following.ts +++ b/src/models/following.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const Following = db.get('following'); export default Following; diff --git a/src/server/api/models/messaging-history.ts b/src/models/messaging-history.ts similarity index 88% rename from src/server/api/models/messaging-history.ts rename to src/models/messaging-history.ts index 44a2adc31..6864e22d2 100644 --- a/src/server/api/models/messaging-history.ts +++ b/src/models/messaging-history.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const MessagingHistory = db.get('messagingHistories'); export default MessagingHistory; diff --git a/src/server/api/models/messaging-message.ts b/src/models/messaging-message.ts similarity index 97% rename from src/server/api/models/messaging-message.ts rename to src/models/messaging-message.ts index d3a418c9a..8bee657c3 100644 --- a/src/server/api/models/messaging-message.ts +++ b/src/models/messaging-message.ts @@ -2,7 +2,7 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); import { pack as packUser } from './user'; import { pack as packFile } from './drive-file'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import parse from '../common/text'; const MessagingMessage = db.get('messagingMessages'); diff --git a/src/server/api/models/meta.ts b/src/models/meta.ts similarity index 73% rename from src/server/api/models/meta.ts rename to src/models/meta.ts index cad7f5096..710bb2338 100644 --- a/src/server/api/models/meta.ts +++ b/src/models/meta.ts @@ -1,4 +1,4 @@ -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const Meta = db.get('meta'); export default Meta; diff --git a/src/server/api/models/mute.ts b/src/models/mute.ts similarity index 85% rename from src/server/api/models/mute.ts rename to src/models/mute.ts index e5385ade3..879361596 100644 --- a/src/server/api/models/mute.ts +++ b/src/models/mute.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const Mute = db.get('mute'); export default Mute; diff --git a/src/server/api/models/notification.ts b/src/models/notification.ts similarity index 98% rename from src/server/api/models/notification.ts rename to src/models/notification.ts index 237e2663f..078c8d511 100644 --- a/src/server/api/models/notification.ts +++ b/src/models/notification.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import { IUser, pack as packUser } from './user'; import { pack as packPost } from './post'; diff --git a/src/server/api/models/othello-game.ts b/src/models/othello-game.ts similarity index 98% rename from src/server/api/models/othello-game.ts rename to src/models/othello-game.ts index ebe738815..297aee302 100644 --- a/src/server/api/models/othello-game.ts +++ b/src/models/othello-game.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import { IUser, pack as packUser } from './user'; const OthelloGame = db.get('othelloGames'); diff --git a/src/server/api/models/othello-matching.ts b/src/models/othello-matching.ts similarity index 96% rename from src/server/api/models/othello-matching.ts rename to src/models/othello-matching.ts index a294bd1ef..8082c258c 100644 --- a/src/server/api/models/othello-matching.ts +++ b/src/models/othello-matching.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import { IUser, pack as packUser } from './user'; const Matching = db.get('othelloMatchings'); diff --git a/src/server/api/models/poll-vote.ts b/src/models/poll-vote.ts similarity index 56% rename from src/server/api/models/poll-vote.ts rename to src/models/poll-vote.ts index 1cad95e5d..cd18ffd5f 100644 --- a/src/server/api/models/poll-vote.ts +++ b/src/models/poll-vote.ts @@ -1,9 +1,5 @@ -<<<<<<< HEAD:src/server/api/models/poll-vote.ts -import db from '../../../db/mongodb'; -======= import * as mongo from 'mongodb'; -import db from '../../db/mongodb'; ->>>>>>> refs/remotes/origin/master:src/api/models/poll-vote.ts +import db from '../db/mongodb'; const PollVote = db.get('pollVotes'); export default PollVote; diff --git a/src/server/api/models/post-reaction.ts b/src/models/post-reaction.ts similarity index 96% rename from src/server/api/models/post-reaction.ts rename to src/models/post-reaction.ts index f9a3f91c2..3fc33411f 100644 --- a/src/server/api/models/post-reaction.ts +++ b/src/models/post-reaction.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import Reaction from './post-reaction'; import { pack as packUser } from './user'; diff --git a/src/server/api/models/post-watching.ts b/src/models/post-watching.ts similarity index 86% rename from src/server/api/models/post-watching.ts rename to src/models/post-watching.ts index abd632249..b4ddcaafa 100644 --- a/src/server/api/models/post-watching.ts +++ b/src/models/post-watching.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const PostWatching = db.get('postWatching'); export default PostWatching; diff --git a/src/server/api/models/post.ts b/src/models/post.ts similarity index 99% rename from src/server/api/models/post.ts rename to src/models/post.ts index 1bf4e0905..833e59932 100644 --- a/src/server/api/models/post.ts +++ b/src/models/post.ts @@ -1,7 +1,7 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); import rap from '@prezzemolo/rap'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import { IUser, pack as packUser } from './user'; import { pack as packApp } from './app'; import { pack as packChannel } from './channel'; diff --git a/src/server/api/models/signin.ts b/src/models/signin.ts similarity index 94% rename from src/server/api/models/signin.ts rename to src/models/signin.ts index bec635947..7f56e1a28 100644 --- a/src/server/api/models/signin.ts +++ b/src/models/signin.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const Signin = db.get('signin'); export default Signin; diff --git a/src/server/api/models/sw-subscription.ts b/src/models/sw-subscription.ts similarity index 87% rename from src/server/api/models/sw-subscription.ts rename to src/models/sw-subscription.ts index d3bbd75a6..743d0d2dd 100644 --- a/src/server/api/models/sw-subscription.ts +++ b/src/models/sw-subscription.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; const SwSubscription = db.get('swSubscriptions'); export default SwSubscription; diff --git a/src/server/api/models/user.ts b/src/models/user.ts similarity index 98% rename from src/server/api/models/user.ts rename to src/models/user.ts index 419ad5397..4f2872800 100644 --- a/src/server/api/models/user.ts +++ b/src/models/user.ts @@ -1,12 +1,12 @@ import * as mongo from 'mongodb'; import deepcopy = require('deepcopy'); import rap from '@prezzemolo/rap'; -import db from '../../../db/mongodb'; +import db from '../db/mongodb'; import { IPost, pack as packPost } from './post'; import Following from './following'; import Mute from './mute'; -import getFriends from '../common/get-friends'; -import config from '../../../conf'; +import getFriends from '../server/api/common/get-friends'; +import config from '../conf'; const User = db.get('users'); diff --git a/src/processor/report-github-failure.ts b/src/processor/report-github-failure.ts index f42071142..610ffe276 100644 --- a/src/processor/report-github-failure.ts +++ b/src/processor/report-github-failure.ts @@ -1,5 +1,5 @@ import * as request from 'request'; -import User from '../server/api/models/user'; +import User from '../models/user'; const createPost = require('../server/api/endpoints/posts/create'); export default ({ data }, done) => { diff --git a/src/server/api/authenticate.ts b/src/server/api/authenticate.ts index 7b3983a83..856674483 100644 --- a/src/server/api/authenticate.ts +++ b/src/server/api/authenticate.ts @@ -1,7 +1,7 @@ import * as express from 'express'; -import App from './models/app'; -import { default as User, IUser } from './models/user'; -import AccessToken from './models/access-token'; +import App from '../../models/app'; +import { default as User, IUser } from '../../models/user'; +import AccessToken from '../../models/access-token'; import isNativeToken from './common/is-native-token'; export interface IAuthContext { diff --git a/src/server/api/bot/core.ts b/src/server/api/bot/core.ts index ec7c935f9..f84f1f5dc 100644 --- a/src/server/api/bot/core.ts +++ b/src/server/api/bot/core.ts @@ -1,12 +1,12 @@ import * as EventEmitter from 'events'; import * as bcrypt from 'bcryptjs'; -import User, { ILocalAccount, IUser, init as initUser } from '../models/user'; +import User, { ILocalAccount, IUser, init as initUser } from '../../../models/user'; -import getPostSummary from '../../common/get-post-summary'; -import getUserSummary from '../../common/user/get-summary'; -import parseAcct from '../../common/user/parse-acct'; -import getNotificationSummary from '../../common/get-notification-summary'; +import getPostSummary from '../../../common/get-post-summary'; +import getUserSummary from '../../../common/user/get-summary'; +import parseAcct from '../../../common/user/parse-acct'; +import getNotificationSummary from '../../../common/get-notification-summary'; const hmm = [ '?', diff --git a/src/server/api/bot/interfaces/line.ts b/src/server/api/bot/interfaces/line.ts index 1340ac992..58fbb217b 100644 --- a/src/server/api/bot/interfaces/line.ts +++ b/src/server/api/bot/interfaces/line.ts @@ -2,14 +2,14 @@ import * as EventEmitter from 'events'; import * as express from 'express'; import * as request from 'request'; import * as crypto from 'crypto'; -import User from '../../models/user'; +import User from '../../../../models/user'; import config from '../../../../conf'; import BotCore from '../core'; import _redis from '../../../../db/redis'; import prominence = require('prominence'); -import getAcct from '../../../common/user/get-acct'; -import parseAcct from '../../../common/user/parse-acct'; -import getPostSummary from '../../../common/get-post-summary'; +import getAcct from '../../../../common/user/get-acct'; +import parseAcct from '../../../../common/user/parse-acct'; +import getPostSummary from '../../../../common/get-post-summary'; const redis = prominence(_redis); diff --git a/src/server/api/common/drive/add-file.ts b/src/server/api/common/drive/add-file.ts index 21ddd1aae..4551f5574 100644 --- a/src/server/api/common/drive/add-file.ts +++ b/src/server/api/common/drive/add-file.ts @@ -10,11 +10,11 @@ import * as debug from 'debug'; import fileType = require('file-type'); import prominence = require('prominence'); -import DriveFile, { getGridFSBucket } from '../../models/drive-file'; -import DriveFolder from '../../models/drive-folder'; -import { pack } from '../../models/drive-file'; +import DriveFile, { getGridFSBucket } from '../../../../models/drive-file'; +import DriveFolder from '../../../../models/drive-folder'; +import { pack } from '../../../../models/drive-file'; import event, { publishDriveStream } from '../../event'; -import getAcct from '../../../common/user/get-acct'; +import getAcct from '../../../../common/user/get-acct'; import config from '../../../../conf'; const gm = _gm.subClass({ diff --git a/src/server/api/common/drive/upload_from_url.ts b/src/server/api/common/drive/upload_from_url.ts index 5dd969593..b825e4c53 100644 --- a/src/server/api/common/drive/upload_from_url.ts +++ b/src/server/api/common/drive/upload_from_url.ts @@ -1,5 +1,5 @@ import * as URL from 'url'; -import { IDriveFile, validateFileName } from '../../models/drive-file'; +import { IDriveFile, validateFileName } from '../../../../models/drive-file'; import create from './add-file'; import * as debug from 'debug'; import * as tmp from 'tmp'; diff --git a/src/server/api/common/get-friends.ts b/src/server/api/common/get-friends.ts index 7f548b3bb..e0942e029 100644 --- a/src/server/api/common/get-friends.ts +++ b/src/server/api/common/get-friends.ts @@ -1,5 +1,5 @@ import * as mongodb from 'mongodb'; -import Following from '../models/following'; +import Following from '../../../models/following'; export default async (me: mongodb.ObjectID, includeMe: boolean = true) => { // Fetch relation to other users who the I follows diff --git a/src/server/api/common/notify.ts b/src/server/api/common/notify.ts index c4df17f88..f90506cf3 100644 --- a/src/server/api/common/notify.ts +++ b/src/server/api/common/notify.ts @@ -1,8 +1,8 @@ import * as mongo from 'mongodb'; -import Notification from '../models/notification'; -import Mute from '../models/mute'; +import Notification from '../../../models/notification'; +import Mute from '../../../models/mute'; import event from '../event'; -import { pack } from '../models/notification'; +import { pack } from '../../../models/notification'; export default ( notifiee: mongo.ObjectID, diff --git a/src/server/api/common/push-sw.ts b/src/server/api/common/push-sw.ts index e5fbec10e..13227af8d 100644 --- a/src/server/api/common/push-sw.ts +++ b/src/server/api/common/push-sw.ts @@ -1,6 +1,6 @@ const push = require('web-push'); import * as mongo from 'mongodb'; -import Subscription from '../models/sw-subscription'; +import Subscription from '../../../models/sw-subscription'; import config from '../../../conf'; if (config.sw) { diff --git a/src/server/api/common/read-messaging-message.ts b/src/server/api/common/read-messaging-message.ts index 9047edec8..f728130bb 100644 --- a/src/server/api/common/read-messaging-message.ts +++ b/src/server/api/common/read-messaging-message.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; -import Message from '../models/messaging-message'; -import { IMessagingMessage as IMessage } from '../models/messaging-message'; +import Message from '../../../models/messaging-message'; +import { IMessagingMessage as IMessage } from '../../../models/messaging-message'; import publishUserStream from '../event'; import { publishMessagingStream } from '../event'; import { publishMessagingIndexStream } from '../event'; diff --git a/src/server/api/common/read-notification.ts b/src/server/api/common/read-notification.ts index 5bbf13632..27632c7ec 100644 --- a/src/server/api/common/read-notification.ts +++ b/src/server/api/common/read-notification.ts @@ -1,5 +1,5 @@ import * as mongo from 'mongodb'; -import { default as Notification, INotification } from '../models/notification'; +import { default as Notification, INotification } from '../../../models/notification'; import publishUserStream from '../event'; /** diff --git a/src/server/api/common/watch-post.ts b/src/server/api/common/watch-post.ts index 61ea44443..83c9b94f3 100644 --- a/src/server/api/common/watch-post.ts +++ b/src/server/api/common/watch-post.ts @@ -1,5 +1,5 @@ import * as mongodb from 'mongodb'; -import Watching from '../models/post-watching'; +import Watching from '../../../models/post-watching'; export default async (me: mongodb.ObjectID, post: object) => { // 自分の投稿はwatchできない diff --git a/src/server/api/endpoints/aggregation/posts.ts b/src/server/api/endpoints/aggregation/posts.ts index 67d261964..f4d401eda 100644 --- a/src/server/api/endpoints/aggregation/posts.ts +++ b/src/server/api/endpoints/aggregation/posts.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../models/post'; +import Post from '../../../../models/post'; /** * Aggregate posts diff --git a/src/server/api/endpoints/aggregation/posts/reaction.ts b/src/server/api/endpoints/aggregation/posts/reaction.ts index 9f9a4f37e..e62274533 100644 --- a/src/server/api/endpoints/aggregation/posts/reaction.ts +++ b/src/server/api/endpoints/aggregation/posts/reaction.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../../models/post'; -import Reaction from '../../../models/post-reaction'; +import Post from '../../../../../models/post'; +import Reaction from '../../../../../models/post-reaction'; /** * Aggregate reaction of a post diff --git a/src/server/api/endpoints/aggregation/posts/reactions.ts b/src/server/api/endpoints/aggregation/posts/reactions.ts index 2dc989281..5f23e296f 100644 --- a/src/server/api/endpoints/aggregation/posts/reactions.ts +++ b/src/server/api/endpoints/aggregation/posts/reactions.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../../models/post'; -import Reaction from '../../../models/post-reaction'; +import Post from '../../../../../models/post'; +import Reaction from '../../../../../models/post-reaction'; /** * Aggregate reactions of a post diff --git a/src/server/api/endpoints/aggregation/posts/reply.ts b/src/server/api/endpoints/aggregation/posts/reply.ts index 3b050582a..c76191e86 100644 --- a/src/server/api/endpoints/aggregation/posts/reply.ts +++ b/src/server/api/endpoints/aggregation/posts/reply.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../../models/post'; +import Post from '../../../../../models/post'; /** * Aggregate reply of a post diff --git a/src/server/api/endpoints/aggregation/posts/repost.ts b/src/server/api/endpoints/aggregation/posts/repost.ts index d9f3e36a0..a203605eb 100644 --- a/src/server/api/endpoints/aggregation/posts/repost.ts +++ b/src/server/api/endpoints/aggregation/posts/repost.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../../models/post'; +import Post from '../../../../../models/post'; /** * Aggregate repost of a post diff --git a/src/server/api/endpoints/aggregation/users.ts b/src/server/api/endpoints/aggregation/users.ts index a4e91a228..19776ed29 100644 --- a/src/server/api/endpoints/aggregation/users.ts +++ b/src/server/api/endpoints/aggregation/users.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; +import User from '../../../../models/user'; /** * Aggregate users diff --git a/src/server/api/endpoints/aggregation/users/activity.ts b/src/server/api/endpoints/aggregation/users/activity.ts index d47761657..cef007229 100644 --- a/src/server/api/endpoints/aggregation/users/activity.ts +++ b/src/server/api/endpoints/aggregation/users/activity.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../../models/user'; -import Post from '../../../models/post'; +import User from '../../../../../models/user'; +import Post from '../../../../../models/post'; // TODO: likeやfollowも集計 diff --git a/src/server/api/endpoints/aggregation/users/followers.ts b/src/server/api/endpoints/aggregation/users/followers.ts index 73a30281b..dda34ed7b 100644 --- a/src/server/api/endpoints/aggregation/users/followers.ts +++ b/src/server/api/endpoints/aggregation/users/followers.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../../models/user'; -import Following from '../../../models/following'; +import User from '../../../../../models/user'; +import Following from '../../../../../models/following'; /** * Aggregate followers of a user @@ -39,11 +39,12 @@ module.exports = (params) => new Promise(async (res, rej) => { { deletedAt: { $gt: startTime } } ] }, { - _id: false, - followerId: false, - followeeId: false - }, { - sort: { createdAt: -1 } + sort: { createdAt: -1 }, + fields: { + _id: false, + followerId: false, + followeeId: false + } }); const graph = []; diff --git a/src/server/api/endpoints/aggregation/users/following.ts b/src/server/api/endpoints/aggregation/users/following.ts index 16fc568d5..cd08d89e4 100644 --- a/src/server/api/endpoints/aggregation/users/following.ts +++ b/src/server/api/endpoints/aggregation/users/following.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../../models/user'; -import Following from '../../../models/following'; +import User from '../../../../../models/user'; +import Following from '../../../../../models/following'; /** * Aggregate following of a user @@ -39,11 +39,12 @@ module.exports = (params) => new Promise(async (res, rej) => { { deletedAt: { $gt: startTime } } ] }, { - _id: false, - followerId: false, - followeeId: false - }, { - sort: { createdAt: -1 } + sort: { createdAt: -1 }, + fields: { + _id: false, + followerId: false, + followeeId: false + } }); const graph = []; diff --git a/src/server/api/endpoints/aggregation/users/post.ts b/src/server/api/endpoints/aggregation/users/post.ts index c98874859..13617cf63 100644 --- a/src/server/api/endpoints/aggregation/users/post.ts +++ b/src/server/api/endpoints/aggregation/users/post.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../../models/user'; -import Post from '../../../models/post'; +import User from '../../../../../models/user'; +import Post from '../../../../../models/post'; /** * Aggregate post of a user diff --git a/src/server/api/endpoints/aggregation/users/reaction.ts b/src/server/api/endpoints/aggregation/users/reaction.ts index 60b33e9d1..0c42ba336 100644 --- a/src/server/api/endpoints/aggregation/users/reaction.ts +++ b/src/server/api/endpoints/aggregation/users/reaction.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../../models/user'; -import Reaction from '../../../models/post-reaction'; +import User from '../../../../../models/user'; +import Reaction from '../../../../../models/post-reaction'; /** * Aggregate reaction of a user diff --git a/src/server/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts index 713078463..f2033d33f 100644 --- a/src/server/api/endpoints/app/create.ts +++ b/src/server/api/endpoints/app/create.ts @@ -3,7 +3,7 @@ */ import rndstr from 'rndstr'; import $ from 'cafy'; -import App, { isValidNameId, pack } from '../../models/app'; +import App, { isValidNameId, pack } from '../../../../models/app'; /** * @swagger diff --git a/src/server/api/endpoints/app/name_id/available.ts b/src/server/api/endpoints/app/name_id/available.ts index 6d02b26d2..93b33cfa2 100644 --- a/src/server/api/endpoints/app/name_id/available.ts +++ b/src/server/api/endpoints/app/name_id/available.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import App from '../../../models/app'; -import { isValidNameId } from '../../../models/app'; +import App from '../../../../../models/app'; +import { isValidNameId } from '../../../../../models/app'; /** * @swagger diff --git a/src/server/api/endpoints/app/show.ts b/src/server/api/endpoints/app/show.ts index 34bb958ee..7c8d2881d 100644 --- a/src/server/api/endpoints/app/show.ts +++ b/src/server/api/endpoints/app/show.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import App, { pack } from '../../models/app'; +import App, { pack } from '../../../../models/app'; /** * @swagger diff --git a/src/server/api/endpoints/auth/accept.ts b/src/server/api/endpoints/auth/accept.ts index 5a1925144..aeabac2db 100644 --- a/src/server/api/endpoints/auth/accept.ts +++ b/src/server/api/endpoints/auth/accept.ts @@ -4,9 +4,9 @@ import rndstr from 'rndstr'; const crypto = require('crypto'); import $ from 'cafy'; -import App from '../../models/app'; -import AuthSess from '../../models/auth-session'; -import AccessToken from '../../models/access-token'; +import App from '../../../../models/app'; +import AuthSess from '../../../../models/auth-session'; +import AccessToken from '../../../../models/access-token'; /** * @swagger diff --git a/src/server/api/endpoints/auth/session/generate.ts b/src/server/api/endpoints/auth/session/generate.ts index 180ad83cc..ad03e538c 100644 --- a/src/server/api/endpoints/auth/session/generate.ts +++ b/src/server/api/endpoints/auth/session/generate.ts @@ -3,8 +3,8 @@ */ import * as uuid from 'uuid'; import $ from 'cafy'; -import App from '../../../models/app'; -import AuthSess from '../../../models/auth-session'; +import App from '../../../../../models/app'; +import AuthSess from '../../../../../models/auth-session'; import config from '../../../../../conf'; /** diff --git a/src/server/api/endpoints/auth/session/show.ts b/src/server/api/endpoints/auth/session/show.ts index 869b714e7..f473d7397 100644 --- a/src/server/api/endpoints/auth/session/show.ts +++ b/src/server/api/endpoints/auth/session/show.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import AuthSess, { pack } from '../../../models/auth-session'; +import AuthSess, { pack } from '../../../../../models/auth-session'; /** * @swagger diff --git a/src/server/api/endpoints/auth/session/userkey.ts b/src/server/api/endpoints/auth/session/userkey.ts index 5d9983af6..7dbb5ea6e 100644 --- a/src/server/api/endpoints/auth/session/userkey.ts +++ b/src/server/api/endpoints/auth/session/userkey.ts @@ -2,10 +2,10 @@ * Module dependencies */ import $ from 'cafy'; -import App from '../../../models/app'; -import AuthSess from '../../../models/auth-session'; -import AccessToken from '../../../models/access-token'; -import { pack } from '../../../models/user'; +import App from '../../../../../models/app'; +import AuthSess from '../../../../../models/auth-session'; +import AccessToken from '../../../../../models/access-token'; +import { pack } from '../../../../../models/user'; /** * @swagger diff --git a/src/server/api/endpoints/channels.ts b/src/server/api/endpoints/channels.ts index a4acc0660..582e6ba43 100644 --- a/src/server/api/endpoints/channels.ts +++ b/src/server/api/endpoints/channels.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Channel, { pack } from '../models/channel'; +import Channel, { pack } from '../../../models/channel'; /** * Get all channels diff --git a/src/server/api/endpoints/channels/create.ts b/src/server/api/endpoints/channels/create.ts index 1dc453c4a..0f0f558c8 100644 --- a/src/server/api/endpoints/channels/create.ts +++ b/src/server/api/endpoints/channels/create.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import Channel from '../../models/channel'; -import Watching from '../../models/channel-watching'; -import { pack } from '../../models/channel'; +import Channel from '../../../../models/channel'; +import Watching from '../../../../models/channel-watching'; +import { pack } from '../../../../models/channel'; /** * Create a channel diff --git a/src/server/api/endpoints/channels/posts.ts b/src/server/api/endpoints/channels/posts.ts index 348dbb108..e48f96da7 100644 --- a/src/server/api/endpoints/channels/posts.ts +++ b/src/server/api/endpoints/channels/posts.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import { default as Channel, IChannel } from '../../models/channel'; -import Post, { pack } from '../../models/post'; +import { default as Channel, IChannel } from '../../../../models/channel'; +import Post, { pack } from '../../../../models/post'; /** * Show a posts of a channel diff --git a/src/server/api/endpoints/channels/show.ts b/src/server/api/endpoints/channels/show.ts index 5874ed18a..3ce9ce474 100644 --- a/src/server/api/endpoints/channels/show.ts +++ b/src/server/api/endpoints/channels/show.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Channel, { IChannel, pack } from '../../models/channel'; +import Channel, { IChannel, pack } from '../../../../models/channel'; /** * Show a channel diff --git a/src/server/api/endpoints/channels/unwatch.ts b/src/server/api/endpoints/channels/unwatch.ts index 709313bc6..8220b90b6 100644 --- a/src/server/api/endpoints/channels/unwatch.ts +++ b/src/server/api/endpoints/channels/unwatch.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Channel from '../../models/channel'; -import Watching from '../../models/channel-watching'; +import Channel from '../../../../models/channel'; +import Watching from '../../../../models/channel-watching'; /** * Unwatch a channel diff --git a/src/server/api/endpoints/channels/watch.ts b/src/server/api/endpoints/channels/watch.ts index df9e70d5c..6906282a5 100644 --- a/src/server/api/endpoints/channels/watch.ts +++ b/src/server/api/endpoints/channels/watch.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Channel from '../../models/channel'; -import Watching from '../../models/channel-watching'; +import Channel from '../../../../models/channel'; +import Watching from '../../../../models/channel-watching'; /** * Watch a channel diff --git a/src/server/api/endpoints/drive.ts b/src/server/api/endpoints/drive.ts index eb2185391..d77ab2bbb 100644 --- a/src/server/api/endpoints/drive.ts +++ b/src/server/api/endpoints/drive.ts @@ -1,7 +1,7 @@ /** * Module dependencies */ -import DriveFile from '../models/drive-file'; +import DriveFile from '../../../models/drive-file'; /** * Get drive information diff --git a/src/server/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts index f982ef62e..63d69d145 100644 --- a/src/server/api/endpoints/drive/files.ts +++ b/src/server/api/endpoints/drive/files.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFile, { pack } from '../../models/drive-file'; +import DriveFile, { pack } from '../../../../models/drive-file'; /** * Get drive files diff --git a/src/server/api/endpoints/drive/files/create.ts b/src/server/api/endpoints/drive/files/create.ts index 2cd89a8fa..53c8c7067 100644 --- a/src/server/api/endpoints/drive/files/create.ts +++ b/src/server/api/endpoints/drive/files/create.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import { validateFileName, pack } from '../../../models/drive-file'; +import { validateFileName, pack } from '../../../../../models/drive-file'; import create from '../../../common/drive/add-file'; /** diff --git a/src/server/api/endpoints/drive/files/find.ts b/src/server/api/endpoints/drive/files/find.ts index 47ce89130..0ab6e5d3e 100644 --- a/src/server/api/endpoints/drive/files/find.ts +++ b/src/server/api/endpoints/drive/files/find.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFile, { pack } from '../../../models/drive-file'; +import DriveFile, { pack } from '../../../../../models/drive-file'; /** * Find a file(s) diff --git a/src/server/api/endpoints/drive/files/show.ts b/src/server/api/endpoints/drive/files/show.ts index 63920db7f..3398f2454 100644 --- a/src/server/api/endpoints/drive/files/show.ts +++ b/src/server/api/endpoints/drive/files/show.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFile, { pack } from '../../../models/drive-file'; +import DriveFile, { pack } from '../../../../../models/drive-file'; /** * Show a file diff --git a/src/server/api/endpoints/drive/files/update.ts b/src/server/api/endpoints/drive/files/update.ts index bfad45b0a..836b4cfcd 100644 --- a/src/server/api/endpoints/drive/files/update.ts +++ b/src/server/api/endpoints/drive/files/update.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFolder from '../../../models/drive-folder'; -import DriveFile, { validateFileName, pack } from '../../../models/drive-file'; +import DriveFolder from '../../../../../models/drive-folder'; +import DriveFile, { validateFileName, pack } from '../../../../../models/drive-file'; import { publishDriveStream } from '../../../event'; /** diff --git a/src/server/api/endpoints/drive/files/upload_from_url.ts b/src/server/api/endpoints/drive/files/upload_from_url.ts index 1a4ce0bf0..7262f09bb 100644 --- a/src/server/api/endpoints/drive/files/upload_from_url.ts +++ b/src/server/api/endpoints/drive/files/upload_from_url.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import { pack } from '../../../models/drive-file'; +import { pack } from '../../../../../models/drive-file'; import uploadFromUrl from '../../../common/drive/upload_from_url'; /** diff --git a/src/server/api/endpoints/drive/folders.ts b/src/server/api/endpoints/drive/folders.ts index c314837f7..489e47912 100644 --- a/src/server/api/endpoints/drive/folders.ts +++ b/src/server/api/endpoints/drive/folders.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFolder, { pack } from '../../models/drive-folder'; +import DriveFolder, { pack } from '../../../../models/drive-folder'; /** * Get drive folders diff --git a/src/server/api/endpoints/drive/folders/create.ts b/src/server/api/endpoints/drive/folders/create.ts index 564558606..24e035930 100644 --- a/src/server/api/endpoints/drive/folders/create.ts +++ b/src/server/api/endpoints/drive/folders/create.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFolder, { isValidFolderName, pack } from '../../../models/drive-folder'; +import DriveFolder, { isValidFolderName, pack } from '../../../../../models/drive-folder'; import { publishDriveStream } from '../../../event'; /** diff --git a/src/server/api/endpoints/drive/folders/find.ts b/src/server/api/endpoints/drive/folders/find.ts index f46aaedd3..04dc38f87 100644 --- a/src/server/api/endpoints/drive/folders/find.ts +++ b/src/server/api/endpoints/drive/folders/find.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFolder, { pack } from '../../../models/drive-folder'; +import DriveFolder, { pack } from '../../../../../models/drive-folder'; /** * Find a folder(s) diff --git a/src/server/api/endpoints/drive/folders/show.ts b/src/server/api/endpoints/drive/folders/show.ts index a6d7e86df..b432f5a50 100644 --- a/src/server/api/endpoints/drive/folders/show.ts +++ b/src/server/api/endpoints/drive/folders/show.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFolder, { pack } from '../../../models/drive-folder'; +import DriveFolder, { pack } from '../../../../../models/drive-folder'; /** * Show a folder diff --git a/src/server/api/endpoints/drive/folders/update.ts b/src/server/api/endpoints/drive/folders/update.ts index fcfd24124..6c5a5c376 100644 --- a/src/server/api/endpoints/drive/folders/update.ts +++ b/src/server/api/endpoints/drive/folders/update.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFolder, { isValidFolderName, pack } from '../../../models/drive-folder'; +import DriveFolder, { isValidFolderName, pack } from '../../../../../models/drive-folder'; import { publishDriveStream } from '../../../event'; /** diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index 71db38f3b..02313aa37 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import DriveFile, { pack } from '../../models/drive-file'; +import DriveFile, { pack } from '../../../../models/drive-file'; /** * Get drive stream diff --git a/src/server/api/endpoints/following/create.ts b/src/server/api/endpoints/following/create.ts index 983d8040f..1e24388a7 100644 --- a/src/server/api/endpoints/following/create.ts +++ b/src/server/api/endpoints/following/create.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User, { pack as packUser } from '../../models/user'; -import Following from '../../models/following'; +import User, { pack as packUser } from '../../../../models/user'; +import Following from '../../../../models/following'; import notify from '../../common/notify'; import event from '../../event'; diff --git a/src/server/api/endpoints/following/delete.ts b/src/server/api/endpoints/following/delete.ts index 25eba8b26..7fc5f477f 100644 --- a/src/server/api/endpoints/following/delete.ts +++ b/src/server/api/endpoints/following/delete.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User, { pack as packUser } from '../../models/user'; -import Following from '../../models/following'; +import User, { pack as packUser } from '../../../../models/user'; +import Following from '../../../../models/following'; import event from '../../event'; /** diff --git a/src/server/api/endpoints/i.ts b/src/server/api/endpoints/i.ts index f5e92b4de..44de71d16 100644 --- a/src/server/api/endpoints/i.ts +++ b/src/server/api/endpoints/i.ts @@ -1,7 +1,7 @@ /** * Module dependencies */ -import User, { pack } from '../models/user'; +import User, { pack } from '../../../models/user'; /** * Show myself diff --git a/src/server/api/endpoints/i/2fa/done.ts b/src/server/api/endpoints/i/2fa/done.ts index d61ebbe6f..0b2e32c13 100644 --- a/src/server/api/endpoints/i/2fa/done.ts +++ b/src/server/api/endpoints/i/2fa/done.ts @@ -3,7 +3,7 @@ */ import $ from 'cafy'; import * as speakeasy from 'speakeasy'; -import User from '../../../models/user'; +import User from '../../../../../models/user'; module.exports = async (params, user) => new Promise(async (res, rej) => { // Get 'token' parameter diff --git a/src/server/api/endpoints/i/2fa/register.ts b/src/server/api/endpoints/i/2fa/register.ts index 0b49ad882..d2683fb61 100644 --- a/src/server/api/endpoints/i/2fa/register.ts +++ b/src/server/api/endpoints/i/2fa/register.ts @@ -5,7 +5,7 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; import * as speakeasy from 'speakeasy'; import * as QRCode from 'qrcode'; -import User from '../../../models/user'; +import User from '../../../../../models/user'; import config from '../../../../../conf'; module.exports = async (params, user) => new Promise(async (res, rej) => { diff --git a/src/server/api/endpoints/i/2fa/unregister.ts b/src/server/api/endpoints/i/2fa/unregister.ts index 0221ecb96..ff2a435fe 100644 --- a/src/server/api/endpoints/i/2fa/unregister.ts +++ b/src/server/api/endpoints/i/2fa/unregister.ts @@ -3,7 +3,7 @@ */ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import User from '../../../models/user'; +import User from '../../../../../models/user'; module.exports = async (params, user) => new Promise(async (res, rej) => { // Get 'password' parameter diff --git a/src/server/api/endpoints/i/appdata/get.ts b/src/server/api/endpoints/i/appdata/get.ts deleted file mode 100644 index 0b34643f7..000000000 --- a/src/server/api/endpoints/i/appdata/get.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Module dependencies - */ -import $ from 'cafy'; -import Appdata from '../../../models/appdata'; - -/** - * Get app data - * - * @param {any} params - * @param {any} user - * @param {any} app - * @param {Boolean} isSecure - * @return {Promise} - */ -module.exports = (params, user, app) => new Promise(async (res, rej) => { - if (app == null) return rej('このAPIはサードパーティAppからのみ利用できます'); - - // Get 'key' parameter - const [key = null, keyError] = $(params.key).optional.nullable.string().match(/[a-z_]+/).$; - if (keyError) return rej('invalid key param'); - - const select = {}; - if (key !== null) { - select[`data.${key}`] = true; - } - const appdata = await Appdata.findOne({ - appId: app._id, - userId: user._id - }, { - fields: select - }); - - if (appdata) { - res(appdata.data); - } else { - res(); - } -}); diff --git a/src/server/api/endpoints/i/appdata/set.ts b/src/server/api/endpoints/i/appdata/set.ts deleted file mode 100644 index 1e3232ce3..000000000 --- a/src/server/api/endpoints/i/appdata/set.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Module dependencies - */ -import $ from 'cafy'; -import Appdata from '../../../models/appdata'; - -/** - * Set app data - * - * @param {any} params - * @param {any} user - * @param {any} app - * @param {Boolean} isSecure - * @return {Promise} - */ -module.exports = (params, user, app) => new Promise(async (res, rej) => { - if (app == null) return rej('このAPIはサードパーティAppからのみ利用できます'); - - // Get 'data' parameter - const [data, dataError] = $(params.data).optional.object() - .pipe(obj => { - const hasInvalidData = Object.entries(obj).some(([k, v]) => - $(k).string().match(/^[a-z_]+$/).nok() && $(v).string().nok()); - return !hasInvalidData; - }).$; - if (dataError) return rej('invalid data param'); - - // Get 'key' parameter - const [key, keyError] = $(params.key).optional.string().match(/[a-z_]+/).$; - if (keyError) return rej('invalid key param'); - - // Get 'value' parameter - const [value, valueError] = $(params.value).optional.string().$; - if (valueError) return rej('invalid value param'); - - const set = {}; - if (data) { - Object.entries(data).forEach(([k, v]) => { - set[`data.${k}`] = v; - }); - } else { - set[`data.${key}`] = value; - } - - await Appdata.update({ - appId: app._id, - userId: user._id - }, Object.assign({ - appId: app._id, - userId: user._id - }, { - $set: set - }), { - upsert: true - }); - - res(204); -}); diff --git a/src/server/api/endpoints/i/authorized_apps.ts b/src/server/api/endpoints/i/authorized_apps.ts index 5a38d7c18..82fd2d251 100644 --- a/src/server/api/endpoints/i/authorized_apps.ts +++ b/src/server/api/endpoints/i/authorized_apps.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import AccessToken from '../../models/access-token'; -import { pack } from '../../models/app'; +import AccessToken from '../../../../models/access-token'; +import { pack } from '../../../../models/app'; /** * Get authorized apps of my account diff --git a/src/server/api/endpoints/i/change_password.ts b/src/server/api/endpoints/i/change_password.ts index e3b0127e7..a38b56a21 100644 --- a/src/server/api/endpoints/i/change_password.ts +++ b/src/server/api/endpoints/i/change_password.ts @@ -3,7 +3,7 @@ */ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import User from '../../models/user'; +import User from '../../../../models/user'; /** * Change password diff --git a/src/server/api/endpoints/i/favorites.ts b/src/server/api/endpoints/i/favorites.ts index 9f8becf21..0b594e318 100644 --- a/src/server/api/endpoints/i/favorites.ts +++ b/src/server/api/endpoints/i/favorites.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Favorite from '../../models/favorite'; -import { pack } from '../../models/post'; +import Favorite from '../../../../models/favorite'; +import { pack } from '../../../../models/post'; /** * Get followers of a user diff --git a/src/server/api/endpoints/i/notifications.ts b/src/server/api/endpoints/i/notifications.ts index 7119bf6ea..5de087a9b 100644 --- a/src/server/api/endpoints/i/notifications.ts +++ b/src/server/api/endpoints/i/notifications.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import Notification from '../../models/notification'; -import Mute from '../../models/mute'; -import { pack } from '../../models/notification'; +import Notification from '../../../../models/notification'; +import Mute from '../../../../models/mute'; +import { pack } from '../../../../models/notification'; import getFriends from '../../common/get-friends'; import read from '../../common/read-notification'; diff --git a/src/server/api/endpoints/i/pin.ts b/src/server/api/endpoints/i/pin.ts index 886a3edeb..2a5757977 100644 --- a/src/server/api/endpoints/i/pin.ts +++ b/src/server/api/endpoints/i/pin.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; -import Post from '../../models/post'; -import { pack } from '../../models/user'; +import User from '../../../../models/user'; +import Post from '../../../../models/post'; +import { pack } from '../../../../models/user'; /** * Pin post diff --git a/src/server/api/endpoints/i/regenerate_token.ts b/src/server/api/endpoints/i/regenerate_token.ts index 9ac7b5507..c35778ac0 100644 --- a/src/server/api/endpoints/i/regenerate_token.ts +++ b/src/server/api/endpoints/i/regenerate_token.ts @@ -3,7 +3,7 @@ */ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import User from '../../models/user'; +import User from '../../../../models/user'; import event from '../../event'; import generateUserToken from '../../common/generate-native-user-token'; diff --git a/src/server/api/endpoints/i/signin_history.ts b/src/server/api/endpoints/i/signin_history.ts index a4ba22790..931b9e225 100644 --- a/src/server/api/endpoints/i/signin_history.ts +++ b/src/server/api/endpoints/i/signin_history.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Signin, { pack } from '../../models/signin'; +import Signin, { pack } from '../../../../models/signin'; /** * Get signin history of my account diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 8147b1bba..8e198f3ad 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import User, { isValidName, isValidDescription, isValidLocation, isValidBirthday, pack } from '../../models/user'; +import User, { isValidName, isValidDescription, isValidLocation, isValidBirthday, pack } from '../../../../models/user'; import event from '../../event'; import config from '../../../../conf'; diff --git a/src/server/api/endpoints/i/update_client_setting.ts b/src/server/api/endpoints/i/update_client_setting.ts index a0bef5e59..03867b401 100644 --- a/src/server/api/endpoints/i/update_client_setting.ts +++ b/src/server/api/endpoints/i/update_client_setting.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import User, { pack } from '../../models/user'; +import User, { pack } from '../../../../models/user'; import event from '../../event'; /** diff --git a/src/server/api/endpoints/i/update_home.ts b/src/server/api/endpoints/i/update_home.ts index 151c3e205..713cf9fcc 100644 --- a/src/server/api/endpoints/i/update_home.ts +++ b/src/server/api/endpoints/i/update_home.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; +import User from '../../../../models/user'; import event from '../../event'; module.exports = async (params, user) => new Promise(async (res, rej) => { diff --git a/src/server/api/endpoints/i/update_mobile_home.ts b/src/server/api/endpoints/i/update_mobile_home.ts index a8436b940..b06ca108a 100644 --- a/src/server/api/endpoints/i/update_mobile_home.ts +++ b/src/server/api/endpoints/i/update_mobile_home.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; +import User from '../../../../models/user'; import event from '../../event'; module.exports = async (params, user) => new Promise(async (res, rej) => { diff --git a/src/server/api/endpoints/messaging/history.ts b/src/server/api/endpoints/messaging/history.ts index 2bf3ed996..e42d34f21 100644 --- a/src/server/api/endpoints/messaging/history.ts +++ b/src/server/api/endpoints/messaging/history.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import History from '../../models/messaging-history'; -import Mute from '../../models/mute'; -import { pack } from '../../models/messaging-message'; +import History from '../../../../models/messaging-history'; +import Mute from '../../../../models/mute'; +import { pack } from '../../../../models/messaging-message'; /** * Show messaging history diff --git a/src/server/api/endpoints/messaging/messages.ts b/src/server/api/endpoints/messaging/messages.ts index dd80e41d0..092eab056 100644 --- a/src/server/api/endpoints/messaging/messages.ts +++ b/src/server/api/endpoints/messaging/messages.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import Message from '../../models/messaging-message'; -import User from '../../models/user'; -import { pack } from '../../models/messaging-message'; +import Message from '../../../../models/messaging-message'; +import User from '../../../../models/user'; +import { pack } from '../../../../models/messaging-message'; import read from '../../common/read-messaging-message'; /** diff --git a/src/server/api/endpoints/messaging/messages/create.ts b/src/server/api/endpoints/messaging/messages/create.ts index 4edd72655..d8ffa9fde 100644 --- a/src/server/api/endpoints/messaging/messages/create.ts +++ b/src/server/api/endpoints/messaging/messages/create.ts @@ -2,13 +2,13 @@ * Module dependencies */ import $ from 'cafy'; -import Message from '../../../models/messaging-message'; -import { isValidText } from '../../../models/messaging-message'; -import History from '../../../models/messaging-history'; -import User from '../../../models/user'; -import Mute from '../../../models/mute'; -import DriveFile from '../../../models/drive-file'; -import { pack } from '../../../models/messaging-message'; +import Message from '../../../../../models/messaging-message'; +import { isValidText } from '../../../../../models/messaging-message'; +import History from '../../../../../models/messaging-history'; +import User from '../../../../../models/user'; +import Mute from '../../../../../models/mute'; +import DriveFile from '../../../../../models/drive-file'; +import { pack } from '../../../../../models/messaging-message'; import publishUserStream from '../../../event'; import { publishMessagingStream, publishMessagingIndexStream, pushSw } from '../../../event'; import config from '../../../../../conf'; diff --git a/src/server/api/endpoints/messaging/unread.ts b/src/server/api/endpoints/messaging/unread.ts index f7f4047b6..30d59dd8b 100644 --- a/src/server/api/endpoints/messaging/unread.ts +++ b/src/server/api/endpoints/messaging/unread.ts @@ -1,8 +1,8 @@ /** * Module dependencies */ -import Message from '../../models/messaging-message'; -import Mute from '../../models/mute'; +import Message from '../../../../models/messaging-message'; +import Mute from '../../../../models/mute'; /** * Get count of unread messages diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index cb47ede57..4f0ae2a60 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -4,7 +4,7 @@ import * as os from 'os'; import version from '../../../version'; import config from '../../../conf'; -import Meta from '../models/meta'; +import Meta from '../../../models/meta'; /** * @swagger @@ -40,7 +40,7 @@ import Meta from '../models/meta'; * @return {Promise} */ module.exports = (params) => new Promise(async (res, rej) => { - const meta = (await Meta.findOne()) || {}; + const meta: any = (await Meta.findOne()) || {}; res({ maintainer: config.maintainer, diff --git a/src/server/api/endpoints/mute/create.ts b/src/server/api/endpoints/mute/create.ts index e86023508..a7fa5f7b4 100644 --- a/src/server/api/endpoints/mute/create.ts +++ b/src/server/api/endpoints/mute/create.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; -import Mute from '../../models/mute'; +import User from '../../../../models/user'; +import Mute from '../../../../models/mute'; /** * Mute a user diff --git a/src/server/api/endpoints/mute/delete.ts b/src/server/api/endpoints/mute/delete.ts index 7e361b479..687f01033 100644 --- a/src/server/api/endpoints/mute/delete.ts +++ b/src/server/api/endpoints/mute/delete.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; -import Mute from '../../models/mute'; +import User from '../../../../models/user'; +import Mute from '../../../../models/mute'; /** * Unmute a user diff --git a/src/server/api/endpoints/mute/list.ts b/src/server/api/endpoints/mute/list.ts index 3401fba64..bd8040144 100644 --- a/src/server/api/endpoints/mute/list.ts +++ b/src/server/api/endpoints/mute/list.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Mute from '../../models/mute'; -import { pack } from '../../models/user'; +import Mute from '../../../../models/mute'; +import { pack } from '../../../../models/user'; import getFriends from '../../common/get-friends'; /** diff --git a/src/server/api/endpoints/my/apps.ts b/src/server/api/endpoints/my/apps.ts index bc1290cac..2a3f8bcd7 100644 --- a/src/server/api/endpoints/my/apps.ts +++ b/src/server/api/endpoints/my/apps.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import App, { pack } from '../../models/app'; +import App, { pack } from '../../../../models/app'; /** * Get my apps diff --git a/src/server/api/endpoints/notifications/get_unread_count.ts b/src/server/api/endpoints/notifications/get_unread_count.ts index 8f9719fff..283ecd63b 100644 --- a/src/server/api/endpoints/notifications/get_unread_count.ts +++ b/src/server/api/endpoints/notifications/get_unread_count.ts @@ -1,8 +1,8 @@ /** * Module dependencies */ -import Notification from '../../models/notification'; -import Mute from '../../models/mute'; +import Notification from '../../../../models/notification'; +import Mute from '../../../../models/mute'; /** * Get count of unread notifications diff --git a/src/server/api/endpoints/notifications/mark_as_read_all.ts b/src/server/api/endpoints/notifications/mark_as_read_all.ts index 693de3d0e..3693ba87b 100644 --- a/src/server/api/endpoints/notifications/mark_as_read_all.ts +++ b/src/server/api/endpoints/notifications/mark_as_read_all.ts @@ -1,7 +1,7 @@ /** * Module dependencies */ -import Notification from '../../models/notification'; +import Notification from '../../../../models/notification'; import event from '../../event'; /** diff --git a/src/server/api/endpoints/othello/games.ts b/src/server/api/endpoints/othello/games.ts index 37fa38418..d05c1c258 100644 --- a/src/server/api/endpoints/othello/games.ts +++ b/src/server/api/endpoints/othello/games.ts @@ -1,5 +1,5 @@ import $ from 'cafy'; -import OthelloGame, { pack } from '../../models/othello-game'; +import OthelloGame, { pack } from '../../../../models/othello-game'; module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'my' parameter diff --git a/src/server/api/endpoints/othello/games/show.ts b/src/server/api/endpoints/othello/games/show.ts index f9084682f..0d3b53965 100644 --- a/src/server/api/endpoints/othello/games/show.ts +++ b/src/server/api/endpoints/othello/games/show.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import OthelloGame, { pack } from '../../../models/othello-game'; -import Othello from '../../../../common/othello/core'; +import OthelloGame, { pack } from '../../../../../models/othello-game'; +import Othello from '../../../../../common/othello/core'; module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'gameId' parameter diff --git a/src/server/api/endpoints/othello/invitations.ts b/src/server/api/endpoints/othello/invitations.ts index f6e0071a6..476153761 100644 --- a/src/server/api/endpoints/othello/invitations.ts +++ b/src/server/api/endpoints/othello/invitations.ts @@ -1,4 +1,4 @@ -import Matching, { pack as packMatching } from '../../models/othello-matching'; +import Matching, { pack as packMatching } from '../../../../models/othello-matching'; module.exports = (params, user) => new Promise(async (res, rej) => { // Find session diff --git a/src/server/api/endpoints/othello/match.ts b/src/server/api/endpoints/othello/match.ts index f503c5834..03168095d 100644 --- a/src/server/api/endpoints/othello/match.ts +++ b/src/server/api/endpoints/othello/match.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import Matching, { pack as packMatching } from '../../models/othello-matching'; -import OthelloGame, { pack as packGame } from '../../models/othello-game'; -import User from '../../models/user'; +import Matching, { pack as packMatching } from '../../../../models/othello-matching'; +import OthelloGame, { pack as packGame } from '../../../../models/othello-game'; +import User from '../../../../models/user'; import publishUserStream, { publishOthelloStream } from '../../event'; -import { eighteight } from '../../../common/othello/maps'; +import { eighteight } from '../../../../common/othello/maps'; module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'userId' parameter diff --git a/src/server/api/endpoints/othello/match/cancel.ts b/src/server/api/endpoints/othello/match/cancel.ts index ee0f82a61..562e69106 100644 --- a/src/server/api/endpoints/othello/match/cancel.ts +++ b/src/server/api/endpoints/othello/match/cancel.ts @@ -1,4 +1,4 @@ -import Matching from '../../../models/othello-matching'; +import Matching from '../../../../../models/othello-matching'; module.exports = (params, user) => new Promise(async (res, rej) => { await Matching.remove({ diff --git a/src/server/api/endpoints/posts.ts b/src/server/api/endpoints/posts.ts index bee1de02d..7af8cff67 100644 --- a/src/server/api/endpoints/posts.ts +++ b/src/server/api/endpoints/posts.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post, { pack } from '../models/post'; +import Post, { pack } from '../../../models/post'; /** * Lists all posts diff --git a/src/server/api/endpoints/posts/categorize.ts b/src/server/api/endpoints/posts/categorize.ts deleted file mode 100644 index 0436c8e69..000000000 --- a/src/server/api/endpoints/posts/categorize.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Module dependencies - */ -import $ from 'cafy'; -import Post from '../../models/post'; - -/** - * Categorize a post - * - * @param {any} params - * @param {any} user - * @return {Promise} - */ -module.exports = (params, user) => new Promise(async (res, rej) => { - if (!user.account.isPro) { - return rej('This endpoint is available only from a Pro account'); - } - - // Get 'postId' parameter - const [postId, postIdErr] = $(params.postId).id().$; - if (postIdErr) return rej('invalid postId param'); - - // Get categorizee - const post = await Post.findOne({ - _id: postId - }); - - if (post === null) { - return rej('post not found'); - } - - if (post.is_category_verified) { - return rej('This post already has the verified category'); - } - - // Get 'category' parameter - const [category, categoryErr] = $(params.category).string().or([ - 'music', 'game', 'anime', 'it', 'gadgets', 'photography' - ]).$; - if (categoryErr) return rej('invalid category param'); - - // Set category - Post.update({ _id: post._id }, { - $set: { - category: category, - is_category_verified: true - } - }); - - // Send response - res(); -}); diff --git a/src/server/api/endpoints/posts/context.ts b/src/server/api/endpoints/posts/context.ts index 44a77d102..7abb045a4 100644 --- a/src/server/api/endpoints/posts/context.ts +++ b/src/server/api/endpoints/posts/context.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post, { pack } from '../../models/post'; +import Post, { pack } from '../../../../models/post'; /** * Show a context of a post diff --git a/src/server/api/endpoints/posts/create.ts b/src/server/api/endpoints/posts/create.ts index 33042a51a..6b2957ae6 100644 --- a/src/server/api/endpoints/posts/create.ts +++ b/src/server/api/endpoints/posts/create.ts @@ -3,21 +3,21 @@ */ import $ from 'cafy'; import deepEqual = require('deep-equal'); -import parse from '../../common/text'; -import { default as Post, IPost, isValidText } from '../../models/post'; -import { default as User, ILocalAccount, IUser } from '../../models/user'; -import { default as Channel, IChannel } from '../../models/channel'; -import Following from '../../models/following'; -import Mute from '../../models/mute'; -import DriveFile from '../../models/drive-file'; -import Watching from '../../models/post-watching'; -import ChannelWatching from '../../models/channel-watching'; -import { pack } from '../../models/post'; +import parse from '../../../../common/text'; +import { default as Post, IPost, isValidText } from '../../../../models/post'; +import { default as User, ILocalAccount, IUser } from '../../../../models/user'; +import { default as Channel, IChannel } from '../../../../models/channel'; +import Following from '../../../../models/following'; +import Mute from '../../../../models/mute'; +import DriveFile from '../../../../models/drive-file'; +import Watching from '../../../../models/post-watching'; +import ChannelWatching from '../../../../models/channel-watching'; +import { pack } from '../../../../models/post'; import notify from '../../common/notify'; import watch from '../../common/watch-post'; import event, { pushSw, publishChannelStream } from '../../event'; -import getAcct from '../../../common/user/get-acct'; -import parseAcct from '../../../common/user/parse-acct'; +import getAcct from '../../../../common/user/get-acct'; +import parseAcct from '../../../../common/user/parse-acct'; import config from '../../../../conf'; /** diff --git a/src/server/api/endpoints/posts/favorites/create.ts b/src/server/api/endpoints/posts/favorites/create.ts index 6100e10b2..f537fb7dd 100644 --- a/src/server/api/endpoints/posts/favorites/create.ts +++ b/src/server/api/endpoints/posts/favorites/create.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Favorite from '../../../models/favorite'; -import Post from '../../../models/post'; +import Favorite from '../../../../../models/favorite'; +import Post from '../../../../../models/post'; /** * Favorite a post diff --git a/src/server/api/endpoints/posts/favorites/delete.ts b/src/server/api/endpoints/posts/favorites/delete.ts index db52036ec..28930337a 100644 --- a/src/server/api/endpoints/posts/favorites/delete.ts +++ b/src/server/api/endpoints/posts/favorites/delete.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Favorite from '../../../models/favorite'; -import Post from '../../../models/post'; +import Favorite from '../../../../../models/favorite'; +import Post from '../../../../../models/post'; /** * Unfavorite a post diff --git a/src/server/api/endpoints/posts/mentions.ts b/src/server/api/endpoints/posts/mentions.ts index 1b342e8de..d7302c062 100644 --- a/src/server/api/endpoints/posts/mentions.ts +++ b/src/server/api/endpoints/posts/mentions.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../models/post'; +import Post from '../../../../models/post'; import getFriends from '../../common/get-friends'; -import { pack } from '../../models/post'; +import { pack } from '../../../../models/post'; /** * Get mentions of myself diff --git a/src/server/api/endpoints/posts/polls/recommendation.ts b/src/server/api/endpoints/posts/polls/recommendation.ts index 19ef0975f..d70674261 100644 --- a/src/server/api/endpoints/posts/polls/recommendation.ts +++ b/src/server/api/endpoints/posts/polls/recommendation.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Vote from '../../../models/poll-vote'; -import Post, { pack } from '../../../models/post'; +import Vote from '../../../../../models/poll-vote'; +import Post, { pack } from '../../../../../models/post'; /** * Get recommended polls diff --git a/src/server/api/endpoints/posts/polls/vote.ts b/src/server/api/endpoints/posts/polls/vote.ts index 734a3a3c4..b970c05e8 100644 --- a/src/server/api/endpoints/posts/polls/vote.ts +++ b/src/server/api/endpoints/posts/polls/vote.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import Vote from '../../../models/poll-vote'; -import Post from '../../../models/post'; -import Watching from '../../../models/post-watching'; +import Vote from '../../../../../models/poll-vote'; +import Post from '../../../../../models/post'; +import Watching from '../../../../../models/post-watching'; import notify from '../../../common/notify'; import watch from '../../../common/watch-post'; import { publishPostStream } from '../../../event'; diff --git a/src/server/api/endpoints/posts/reactions.ts b/src/server/api/endpoints/posts/reactions.ts index f753ba7c2..da733f533 100644 --- a/src/server/api/endpoints/posts/reactions.ts +++ b/src/server/api/endpoints/posts/reactions.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../models/post'; -import Reaction, { pack } from '../../models/post-reaction'; +import Post from '../../../../models/post'; +import Reaction, { pack } from '../../../../models/post-reaction'; /** * Show reactions of a post diff --git a/src/server/api/endpoints/posts/reactions/create.ts b/src/server/api/endpoints/posts/reactions/create.ts index a1e677980..5d2b5a7ed 100644 --- a/src/server/api/endpoints/posts/reactions/create.ts +++ b/src/server/api/endpoints/posts/reactions/create.ts @@ -2,10 +2,10 @@ * Module dependencies */ import $ from 'cafy'; -import Reaction from '../../../models/post-reaction'; -import Post, { pack as packPost } from '../../../models/post'; -import { pack as packUser } from '../../../models/user'; -import Watching from '../../../models/post-watching'; +import Reaction from '../../../../../models/post-reaction'; +import Post, { pack as packPost } from '../../../../../models/post'; +import { pack as packUser } from '../../../../../models/user'; +import Watching from '../../../../../models/post-watching'; import notify from '../../../common/notify'; import watch from '../../../common/watch-post'; import { publishPostStream, pushSw } from '../../../event'; diff --git a/src/server/api/endpoints/posts/reactions/delete.ts b/src/server/api/endpoints/posts/reactions/delete.ts index b09bcbb4b..11f5c7daf 100644 --- a/src/server/api/endpoints/posts/reactions/delete.ts +++ b/src/server/api/endpoints/posts/reactions/delete.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Reaction from '../../../models/post-reaction'; -import Post from '../../../models/post'; +import Reaction from '../../../../../models/post-reaction'; +import Post from '../../../../../models/post'; // import event from '../../../event'; /** diff --git a/src/server/api/endpoints/posts/replies.ts b/src/server/api/endpoints/posts/replies.ts index db021505f..dd5a95c17 100644 --- a/src/server/api/endpoints/posts/replies.ts +++ b/src/server/api/endpoints/posts/replies.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post, { pack } from '../../models/post'; +import Post, { pack } from '../../../../models/post'; /** * Show a replies of a post diff --git a/src/server/api/endpoints/posts/reposts.ts b/src/server/api/endpoints/posts/reposts.ts index 51af41f52..ec6218ca3 100644 --- a/src/server/api/endpoints/posts/reposts.ts +++ b/src/server/api/endpoints/posts/reposts.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post, { pack } from '../../models/post'; +import Post, { pack } from '../../../../models/post'; /** * Show a reposts of a post diff --git a/src/server/api/endpoints/posts/search.ts b/src/server/api/endpoints/posts/search.ts index bb5c43892..21c4e77fd 100644 --- a/src/server/api/endpoints/posts/search.ts +++ b/src/server/api/endpoints/posts/search.ts @@ -3,11 +3,11 @@ */ import $ from 'cafy'; const escapeRegexp = require('escape-regexp'); -import Post from '../../models/post'; -import User from '../../models/user'; -import Mute from '../../models/mute'; +import Post from '../../../../models/post'; +import User from '../../../../models/user'; +import Mute from '../../../../models/mute'; import getFriends from '../../common/get-friends'; -import { pack } from '../../models/post'; +import { pack } from '../../../../models/post'; /** * Search a post diff --git a/src/server/api/endpoints/posts/show.ts b/src/server/api/endpoints/posts/show.ts index bb4bcdb79..e1781b545 100644 --- a/src/server/api/endpoints/posts/show.ts +++ b/src/server/api/endpoints/posts/show.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Post, { pack } from '../../models/post'; +import Post, { pack } from '../../../../models/post'; /** * Show a post diff --git a/src/server/api/endpoints/posts/timeline.ts b/src/server/api/endpoints/posts/timeline.ts index a3e915f16..b58d25fa8 100644 --- a/src/server/api/endpoints/posts/timeline.ts +++ b/src/server/api/endpoints/posts/timeline.ts @@ -3,11 +3,11 @@ */ import $ from 'cafy'; import rap from '@prezzemolo/rap'; -import Post from '../../models/post'; -import Mute from '../../models/mute'; -import ChannelWatching from '../../models/channel-watching'; +import Post from '../../../../models/post'; +import Mute from '../../../../models/mute'; +import ChannelWatching from '../../../../models/channel-watching'; import getFriends from '../../common/get-friends'; -import { pack } from '../../models/post'; +import { pack } from '../../../../models/post'; /** * Get timeline of myself diff --git a/src/server/api/endpoints/posts/trend.ts b/src/server/api/endpoints/posts/trend.ts index bc0c47fbc..dbee16913 100644 --- a/src/server/api/endpoints/posts/trend.ts +++ b/src/server/api/endpoints/posts/trend.ts @@ -3,7 +3,7 @@ */ const ms = require('ms'); import $ from 'cafy'; -import Post, { pack } from '../../models/post'; +import Post, { pack } from '../../../../models/post'; /** * Get trend posts diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts index 719792d40..0fb0c44b0 100644 --- a/src/server/api/endpoints/stats.ts +++ b/src/server/api/endpoints/stats.ts @@ -1,8 +1,8 @@ /** * Module dependencies */ -import Post from '../models/post'; -import User from '../models/user'; +import Post from '../../../models/post'; +import User from '../../../models/user'; /** * @swagger diff --git a/src/server/api/endpoints/sw/register.ts b/src/server/api/endpoints/sw/register.ts index 1542e1dbe..ef3428057 100644 --- a/src/server/api/endpoints/sw/register.ts +++ b/src/server/api/endpoints/sw/register.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import Subscription from '../../models/sw-subscription'; +import Subscription from '../../../../models/sw-subscription'; /** * subscribe service worker diff --git a/src/server/api/endpoints/username/available.ts b/src/server/api/endpoints/username/available.ts index f23cdbd85..bd27c37de 100644 --- a/src/server/api/endpoints/username/available.ts +++ b/src/server/api/endpoints/username/available.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; -import { validateUsername } from '../../models/user'; +import User from '../../../../models/user'; +import { validateUsername } from '../../../../models/user'; /** * Check available username diff --git a/src/server/api/endpoints/users.ts b/src/server/api/endpoints/users.ts index 393c3479c..e82d72748 100644 --- a/src/server/api/endpoints/users.ts +++ b/src/server/api/endpoints/users.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import User, { pack } from '../models/user'; +import User, { pack } from '../../../models/user'; /** * Lists all users diff --git a/src/server/api/endpoints/users/followers.ts b/src/server/api/endpoints/users/followers.ts index fc09cfa2c..39b69a6aa 100644 --- a/src/server/api/endpoints/users/followers.ts +++ b/src/server/api/endpoints/users/followers.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; -import Following from '../../models/following'; -import { pack } from '../../models/user'; +import User from '../../../../models/user'; +import Following from '../../../../models/following'; +import { pack } from '../../../../models/user'; import getFriends from '../../common/get-friends'; /** diff --git a/src/server/api/endpoints/users/following.ts b/src/server/api/endpoints/users/following.ts index 3387dab36..aa6628dde 100644 --- a/src/server/api/endpoints/users/following.ts +++ b/src/server/api/endpoints/users/following.ts @@ -2,9 +2,9 @@ * Module dependencies */ import $ from 'cafy'; -import User from '../../models/user'; -import Following from '../../models/following'; -import { pack } from '../../models/user'; +import User from '../../../../models/user'; +import Following from '../../../../models/following'; +import { pack } from '../../../../models/user'; import getFriends from '../../common/get-friends'; /** diff --git a/src/server/api/endpoints/users/get_frequently_replied_users.ts b/src/server/api/endpoints/users/get_frequently_replied_users.ts index 991c5555b..3a116c8e2 100644 --- a/src/server/api/endpoints/users/get_frequently_replied_users.ts +++ b/src/server/api/endpoints/users/get_frequently_replied_users.ts @@ -2,8 +2,8 @@ * Module dependencies */ import $ from 'cafy'; -import Post from '../../models/post'; -import User, { pack } from '../../models/user'; +import Post from '../../../../models/post'; +import User, { pack } from '../../../../models/user'; module.exports = (params, me) => new Promise(async (res, rej) => { // Get 'userId' parameter diff --git a/src/server/api/endpoints/users/posts.ts b/src/server/api/endpoints/users/posts.ts index 934690749..b6c533fb5 100644 --- a/src/server/api/endpoints/users/posts.ts +++ b/src/server/api/endpoints/users/posts.ts @@ -3,8 +3,8 @@ */ import $ from 'cafy'; import getHostLower from '../../common/get-host-lower'; -import Post, { pack } from '../../models/post'; -import User from '../../models/user'; +import Post, { pack } from '../../../../models/post'; +import User from '../../../../models/user'; /** * Get posts of a user diff --git a/src/server/api/endpoints/users/recommendation.ts b/src/server/api/endpoints/users/recommendation.ts index c5297cdc5..c81533969 100644 --- a/src/server/api/endpoints/users/recommendation.ts +++ b/src/server/api/endpoints/users/recommendation.ts @@ -3,7 +3,7 @@ */ const ms = require('ms'); import $ from 'cafy'; -import User, { pack } from '../../models/user'; +import User, { pack } from '../../../../models/user'; import getFriends from '../../common/get-friends'; /** diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index b03ed2f2f..335043b02 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -3,7 +3,7 @@ */ import * as mongo from 'mongodb'; import $ from 'cafy'; -import User, { pack } from '../../models/user'; +import User, { pack } from '../../../../models/user'; import config from '../../../../conf'; const escapeRegexp = require('escape-regexp'); diff --git a/src/server/api/endpoints/users/search_by_username.ts b/src/server/api/endpoints/users/search_by_username.ts index 24e9c98e7..5f6ececff 100644 --- a/src/server/api/endpoints/users/search_by_username.ts +++ b/src/server/api/endpoints/users/search_by_username.ts @@ -2,7 +2,7 @@ * Module dependencies */ import $ from 'cafy'; -import User, { pack } from '../../models/user'; +import User, { pack } from '../../../../models/user'; /** * Search a user by username diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index 16411dddc..0b7646f81 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -5,7 +5,7 @@ import $ from 'cafy'; import { JSDOM } from 'jsdom'; import { toUnicode, toASCII } from 'punycode'; import uploadFromUrl from '../../common/drive/upload_from_url'; -import User, { pack, validateUsername, isValidName, isValidDescription } from '../../models/user'; +import User, { pack, validateUsername, isValidName, isValidDescription } from '../../../../models/user'; const request = require('request-promise-native'); const WebFinger = require('webfinger.js'); diff --git a/src/server/api/limitter.ts b/src/server/api/limitter.ts index 33337fbb1..88ea6c367 100644 --- a/src/server/api/limitter.ts +++ b/src/server/api/limitter.ts @@ -3,7 +3,7 @@ import * as debug from 'debug'; import limiterDB from '../../db/redis'; import { Endpoint } from './endpoints'; import { IAuthContext } from './authenticate'; -import getAcct from '../common/user/get-acct'; +import getAcct from '../../common/user/get-acct'; const log = debug('misskey:limitter'); diff --git a/src/server/api/private/signin.ts b/src/server/api/private/signin.ts index 4b60f4c75..d78fa11b8 100644 --- a/src/server/api/private/signin.ts +++ b/src/server/api/private/signin.ts @@ -1,8 +1,8 @@ import * as express from 'express'; import * as bcrypt from 'bcryptjs'; import * as speakeasy from 'speakeasy'; -import { default as User, ILocalAccount, IUser } from '../models/user'; -import Signin, { pack } from '../models/signin'; +import { default as User, ILocalAccount, IUser } from '../../../models/user'; +import Signin, { pack } from '../../../models/signin'; import event from '../event'; import signin from '../common/signin'; import config from '../../../conf'; diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index cad9752c4..fd47b5303 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -3,7 +3,7 @@ import * as express from 'express'; import * as bcrypt from 'bcryptjs'; import { generate as generateKeypair } from '../../../crypto_key'; import recaptcha = require('recaptcha-promise'); -import User, { IUser, validateUsername, validatePassword, pack } from '../models/user'; +import User, { IUser, validateUsername, validatePassword, pack } from '../../../models/user'; import generateUserToken from '../common/generate-native-user-token'; import config from '../../../conf'; diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts index 98732e6b8..6eacdb747 100644 --- a/src/server/api/service/github.ts +++ b/src/server/api/service/github.ts @@ -1,7 +1,7 @@ import * as EventEmitter from 'events'; import * as express from 'express'; -const crypto = require('crypto'); -import User from '../models/user'; +//const crypto = require('crypto'); +import User from '../../../models/user'; import config from '../../../conf'; import queue from '../../../queue'; diff --git a/src/server/api/service/twitter.ts b/src/server/api/service/twitter.ts index bdbedc864..d77341db2 100644 --- a/src/server/api/service/twitter.ts +++ b/src/server/api/service/twitter.ts @@ -5,7 +5,7 @@ import * as uuid from 'uuid'; // const Twitter = require('twitter'); import autwh from 'autwh'; import redis from '../../../db/redis'; -import User, { pack } from '../models/user'; +import User, { pack } from '../../../models/user'; import event from '../event'; import config from '../../../conf'; import signin from '../common/signin'; diff --git a/src/server/api/stream/channel.ts b/src/server/api/stream/channel.ts index d67d77cbf..cb0427823 100644 --- a/src/server/api/stream/channel.ts +++ b/src/server/api/stream/channel.ts @@ -1,8 +1,10 @@ import * as websocket from 'websocket'; import * as redis from 'redis'; +import { ParsedUrlQuery } from 'querystring'; export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient): void { - const channel = request.resourceURL.query.channel; + const q = request.resourceURL.query as ParsedUrlQuery; + const channel = q.channel; // Subscribe channel stream subscriber.subscribe(`misskey:channel-stream:${channel}`); diff --git a/src/server/api/stream/home.ts b/src/server/api/stream/home.ts index 291be0824..648bd7c3c 100644 --- a/src/server/api/stream/home.ts +++ b/src/server/api/stream/home.ts @@ -2,9 +2,9 @@ import * as websocket from 'websocket'; import * as redis from 'redis'; import * as debug from 'debug'; -import User from '../models/user'; -import Mute from '../models/mute'; -import { pack as packPost } from '../models/post'; +import User from '../../../models/user'; +import Mute from '../../../models/mute'; +import { pack as packPost } from '../../../models/post'; import readNotification from '../common/read-notification'; const log = debug('misskey'); diff --git a/src/server/api/stream/messaging.ts b/src/server/api/stream/messaging.ts index a4a12426a..3e6c2cd50 100644 --- a/src/server/api/stream/messaging.ts +++ b/src/server/api/stream/messaging.ts @@ -1,9 +1,11 @@ import * as websocket from 'websocket'; import * as redis from 'redis'; import read from '../common/read-messaging-message'; +import { ParsedUrlQuery } from 'querystring'; export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user: any): void { - const otherparty = request.resourceURL.query.otherparty; + const q = request.resourceURL.query as ParsedUrlQuery; + const otherparty = q.otherparty as string; // Subscribe messaging stream subscriber.subscribe(`misskey:messaging-stream:${user._id}-${otherparty}`); diff --git a/src/server/api/stream/othello-game.ts b/src/server/api/stream/othello-game.ts index e48d93cdd..b6a251c4c 100644 --- a/src/server/api/stream/othello-game.ts +++ b/src/server/api/stream/othello-game.ts @@ -1,13 +1,15 @@ import * as websocket from 'websocket'; import * as redis from 'redis'; import * as CRC32 from 'crc-32'; -import OthelloGame, { pack } from '../models/othello-game'; +import OthelloGame, { pack } from '../../../models/othello-game'; import { publishOthelloGameStream } from '../event'; -import Othello from '../../common/othello/core'; -import * as maps from '../../common/othello/maps'; +import Othello from '../../../common/othello/core'; +import * as maps from '../../../common/othello/maps'; +import { ParsedUrlQuery } from 'querystring'; export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user?: any): void { - const gameId = request.resourceURL.query.game; + const q = request.resourceURL.query as ParsedUrlQuery; + const gameId = q.game; // Subscribe game stream subscriber.subscribe(`misskey:othello-game-stream:${gameId}`); diff --git a/src/server/api/stream/othello.ts b/src/server/api/stream/othello.ts index 55c993ec8..4205afae7 100644 --- a/src/server/api/stream/othello.ts +++ b/src/server/api/stream/othello.ts @@ -1,7 +1,7 @@ import * as mongo from 'mongodb'; import * as websocket from 'websocket'; import * as redis from 'redis'; -import Matching, { pack } from '../models/othello-matching'; +import Matching, { pack } from '../../../models/othello-matching'; import publishUserStream from '../event'; export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user: any): void { diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index 73f099bd8..c86c6a8b4 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -2,8 +2,8 @@ import * as http from 'http'; import * as websocket from 'websocket'; import * as redis from 'redis'; import config from '../../conf'; -import { default as User, IUser } from './models/user'; -import AccessToken from './models/access-token'; +import { default as User, IUser } from '../../models/user'; +import AccessToken from '../../models/access-token'; import isNativeToken from './common/is-native-token'; import homeStream from './stream/home'; @@ -15,6 +15,7 @@ import othelloStream from './stream/othello'; import serverStream from './stream/server'; import requestsStream from './stream/requests'; import channelStream from './stream/channel'; +import { ParsedUrlQuery } from 'querystring'; module.exports = (server: http.Server) => { /** @@ -51,7 +52,8 @@ module.exports = (server: http.Server) => { return; } - const user = await authenticate(request.resourceURL.query.i); + const q = request.resourceURL.query as ParsedUrlQuery; + const user = await authenticate(q.i as string); if (request.resourceURL.pathname === '/othello-game') { othelloGameStream(request, connection, subscriber, user); diff --git a/src/server/file/server.ts b/src/server/file/server.ts index 3bda5b14f..062d260cb 100644 --- a/src/server/file/server.ts +++ b/src/server/file/server.ts @@ -10,7 +10,7 @@ import * as mongodb from 'mongodb'; import * as _gm from 'gm'; import * as stream from 'stream'; -import DriveFile, { getGridFSBucket } from '../api/models/drive-file'; +import DriveFile, { getGridFSBucket } from '../../models/drive-file'; const gm = _gm.subClass({ imageMagick: true diff --git a/src/server/web/server.ts b/src/server/web/server.ts index b117f6ae8..2fc8f1b8a 100644 --- a/src/server/web/server.ts +++ b/src/server/web/server.ts @@ -1,5 +1,5 @@ /** - * Web Server + * Web Client Server */ import * as path from 'path'; @@ -11,9 +11,9 @@ import * as bodyParser from 'body-parser'; import * as favicon from 'serve-favicon'; import * as compression from 'compression'; -/** - * Init app - */ +const client = `${__dirname}/../../client/`; + +// Create server const app = express(); app.disable('x-powered-by'); @@ -25,51 +25,40 @@ app.use(bodyParser.json({ })); app.use(compression()); -/** - * Initialize requests - */ app.use((req, res, next) => { res.header('X-Frame-Options', 'DENY'); next(); }); -/** - * Static assets - */ -app.use(favicon(`${__dirname}/assets/favicon.ico`)); -app.get('/apple-touch-icon.png', (req, res) => res.sendFile(`${__dirname}/assets/apple-touch-icon.png`)); -app.use('/assets', express.static(`${__dirname}/assets`, { +//#region static assets + +app.use(favicon(`${client}/assets/favicon.ico`)); +app.get('/apple-touch-icon.png', (req, res) => res.sendFile(`${client}/assets/apple-touch-icon.png`)); +app.use('/assets', express.static(`${client}/assets`, { maxAge: ms('7 days') })); -app.use('/assets/*.js', (req, res) => res.sendFile(`${__dirname}/assets/404.js`)); +app.use('/assets/*.js', (req, res) => res.sendFile(`${client}/assets/404.js`)); app.use('/assets', (req, res) => { res.sendStatus(404); }); -app.use('/recover', (req, res) => res.sendFile(`${__dirname}/assets/recover.html`)); +app.use('/recover', (req, res) => res.sendFile(`${client}/assets/recover.html`)); -/** - * ServiceWroker - */ +// ServiceWroker app.get(/^\/sw\.(.+?)\.js$/, (req, res) => - res.sendFile(`${__dirname}/assets/sw.${req.params[0]}.js`)); + res.sendFile(`${client}/assets/sw.${req.params[0]}.js`)); -/** - * Manifest - */ +// Manifest app.get('/manifest.json', (req, res) => - res.sendFile(`${__dirname}/assets/manifest.json`)); + res.sendFile(`${client}/assets/manifest.json`)); -/** - * Common API - */ -app.get(/\/api:url/, require('./service/url-preview')); +//#endregion -/** - * Routing - */ +app.get(/\/api:url/, require('./url-preview')); + +// Render base html for all requests app.get('*', (req, res) => { - res.sendFile(path.resolve(`${__dirname}/app/base.html`), { + res.sendFile(path.resolve(`${client}/app/base.html`), { maxAge: ms('7 days') }); }); diff --git a/src/server/web/service/url-preview.ts b/src/server/web/url-preview.ts similarity index 100% rename from src/server/web/service/url-preview.ts rename to src/server/web/url-preview.ts diff --git a/src/tools/analysis/core.ts b/src/tools/analysis/core.ts deleted file mode 100644 index 839fffd3c..000000000 --- a/src/tools/analysis/core.ts +++ /dev/null @@ -1,49 +0,0 @@ -const bayes = require('./naive-bayes.js'); - -const MeCab = require('./mecab'); -import Post from '../../server/api/models/post'; - -/** - * 投稿を学習したり与えられた投稿のカテゴリを予測します - */ -export default class Categorizer { - private classifier: any; - private mecab: any; - - constructor() { - this.mecab = new MeCab(); - - // BIND ----------------------------------- - this.tokenizer = this.tokenizer.bind(this); - } - - private tokenizer(text: string) { - const tokens = this.mecab.parseSync(text) - // 名詞だけに制限 - .filter(token => token[1] === '名詞') - // 取り出し - .map(token => token[0]); - - return tokens; - } - - public async init() { - this.classifier = bayes({ - tokenizer: this.tokenizer - }); - - // 訓練データ取得 - const verifiedPosts = await Post.find({ - is_category_verified: true - }); - - // 学習 - verifiedPosts.forEach(post => { - this.classifier.learn(post.text, post.category); - }); - } - - public async predict(text) { - return this.classifier.categorize(text); - } -} diff --git a/src/tools/analysis/extract-user-domains.ts b/src/tools/analysis/extract-user-domains.ts deleted file mode 100644 index 1aa456db8..000000000 --- a/src/tools/analysis/extract-user-domains.ts +++ /dev/null @@ -1,120 +0,0 @@ -import * as URL from 'url'; - -import Post from '../../server/api/models/post'; -import User from '../../server/api/models/user'; -import parse from '../../server/api/common/text'; - -process.on('unhandledRejection', console.dir); - -function tokenize(text: string) { - if (text == null) return []; - - // パース - const ast = parse(text); - - const domains = ast - // URLを抽出 - .filter(t => t.type == 'url' || t.type == 'link') - .map(t => URL.parse(t.url).hostname); - - return domains; -} - -// Fetch all users -User.find({}, { - fields: { - _id: true - } -}).then(users => { - let i = -1; - - const x = cb => { - if (++i == users.length) return cb(); - extractDomainsOne(users[i]._id).then(() => x(cb), err => { - console.error(err); - setTimeout(() => { - i--; - x(cb); - }, 1000); - }); - }; - - x(() => { - console.log('complete'); - }); -}); - -function extractDomainsOne(id) { - return new Promise(async (resolve, reject) => { - process.stdout.write(`extracting domains of ${id} ...`); - - // Fetch recent posts - const recentPosts = await Post.find({ - userId: id, - text: { - $exists: true - } - }, { - sort: { - _id: -1 - }, - limit: 10000, - fields: { - _id: false, - text: true - } - }); - - // 投稿が少なかったら中断 - if (recentPosts.length < 100) { - process.stdout.write(' >>> -\n'); - return resolve(); - } - - const domains = {}; - - // Extract domains from recent posts - recentPosts.forEach(post => { - const domainsOfPost = tokenize(post.text); - - domainsOfPost.forEach(domain => { - if (domains[domain]) { - domains[domain]++; - } else { - domains[domain] = 1; - } - }); - }); - - // Calc peak - let peak = 0; - Object.keys(domains).forEach(domain => { - if (domains[domain] > peak) peak = domains[domain]; - }); - - // Sort domains by frequency - const domainsSorted = Object.keys(domains).sort((a, b) => domains[b] - domains[a]); - - // Lookup top 10 domains - const topDomains = domainsSorted.slice(0, 10); - - process.stdout.write(' >>> ' + topDomains.join(', ') + '\n'); - - // Make domains object (includes weights) - const domainsObj = topDomains.map(domain => ({ - domain: domain, - weight: domains[domain] / peak - })); - - // Save - User.update({ _id: id }, { - $set: { - domains: domainsObj - } - }).then(() => { - resolve(); - }, err => { - reject(err); - }); - }); -} diff --git a/src/tools/analysis/extract-user-keywords.ts b/src/tools/analysis/extract-user-keywords.ts deleted file mode 100644 index 9b0691b7d..000000000 --- a/src/tools/analysis/extract-user-keywords.ts +++ /dev/null @@ -1,154 +0,0 @@ -const moji = require('moji'); - -const MeCab = require('./mecab'); -import Post from '../../server/api/models/post'; -import User from '../../server/api/models/user'; -import parse from '../../server/api/common/text'; - -process.on('unhandledRejection', console.dir); - -const stopwords = [ - 'ー', - - 'の', 'に', 'は', 'を', 'た', 'が', 'で', 'て', 'と', 'し', 'れ', 'さ', - 'ある', 'いる', 'も', 'する', 'から', 'な', 'こと', 'として', 'い', 'や', 'れる', - 'など', 'なっ', 'ない', 'この', 'ため', 'その', 'あっ', 'よう', 'また', 'もの', - 'という', 'あり', 'まで', 'られ', 'なる', 'へ', 'か', 'だ', 'これ', 'によって', - 'により', 'おり', 'より', 'による', 'ず', 'なり', 'られる', 'において', 'ば', 'なかっ', - 'なく', 'しかし', 'について', 'せ', 'だっ', 'その後', 'できる', 'それ', 'う', 'ので', - 'なお', 'のみ', 'でき', 'き', 'つ', 'における', 'および', 'いう', 'さらに', 'でも', - 'ら', 'たり', 'その他', 'に関する', 'たち', 'ます', 'ん', 'なら', 'に対して', '特に', - 'せる', '及び', 'これら', 'とき', 'では', 'にて', 'ほか', 'ながら', 'うち', 'そして', - 'とともに', 'ただし', 'かつて', 'それぞれ', 'または', 'お', 'ほど', 'ものの', 'に対する', - 'ほとんど', 'と共に', 'といった', 'です', 'とも', 'ところ', 'ここ', '感じ', '気持ち', - 'あと', '自分', 'すき', '()', - - 'about', 'after', 'all', 'also', 'am', 'an', 'and', 'another', 'any', 'are', 'as', 'at', 'be', - 'because', 'been', 'before', 'being', 'between', 'both', 'but', 'by', 'came', 'can', - 'come', 'could', 'did', 'do', 'each', 'for', 'from', 'get', 'got', 'has', 'had', - 'he', 'have', 'her', 'here', 'him', 'himself', 'his', 'how', 'if', 'in', 'into', - 'is', 'it', 'like', 'make', 'many', 'me', 'might', 'more', 'most', 'much', 'must', - 'my', 'never', 'now', 'of', 'on', 'only', 'or', 'other', 'our', 'out', 'over', - 'said', 'same', 'see', 'should', 'since', 'some', 'still', 'such', 'take', 'than', - 'that', 'the', 'their', 'them', 'then', 'there', 'these', 'they', 'this', 'those', - 'through', 'to', 'too', 'under', 'up', 'very', 'was', 'way', 'we', 'well', 'were', - 'what', 'where', 'which', 'while', 'who', 'with', 'would', 'you', 'your', 'a', 'i' -]; - -const mecab = new MeCab(); - -function tokenize(text: string) { - if (text == null) return []; - - // パース - const ast = parse(text); - - const plain = ast - // テキストのみ(URLなどを除外するという意) - .filter(t => t.type == 'text' || t.type == 'bold') - .map(t => t.content) - .join(''); - - const tokens = mecab.parseSync(plain) - // キーワードのみ - .filter(token => token[1] == '名詞' && (token[2] == '固有名詞' || token[2] == '一般')) - // 取り出し(&整形(全角を半角にしたり大文字を小文字で統一したり)) - .map(token => moji(token[0]).convert('ZE', 'HE').convert('HK', 'ZK').toString().toLowerCase()) - // ストップワードなど - .filter(word => - stopwords.indexOf(word) === -1 && - word.length > 1 && - word.indexOf('!') === -1 && - word.indexOf('!') === -1 && - word.indexOf('?') === -1 && - word.indexOf('?') === -1); - - return tokens; -} - -// Fetch all users -User.find({}, { - fields: { - _id: true - } -}).then(users => { - let i = -1; - - const x = cb => { - if (++i == users.length) return cb(); - extractKeywordsOne(users[i]._id).then(() => x(cb), err => { - console.error(err); - setTimeout(() => { - i--; - x(cb); - }, 1000); - }); - }; - - x(() => { - console.log('complete'); - }); -}); - -function extractKeywordsOne(id) { - return new Promise(async (resolve, reject) => { - process.stdout.write(`extracting keywords of ${id} ...`); - - // Fetch recent posts - const recentPosts = await Post.find({ - userId: id, - text: { - $exists: true - } - }, { - sort: { - _id: -1 - }, - limit: 10000, - fields: { - _id: false, - text: true - } - }); - - // 投稿が少なかったら中断 - if (recentPosts.length < 300) { - process.stdout.write(' >>> -\n'); - return resolve(); - } - - const keywords = {}; - - // Extract keywords from recent posts - recentPosts.forEach(post => { - const keywordsOfPost = tokenize(post.text); - - keywordsOfPost.forEach(keyword => { - if (keywords[keyword]) { - keywords[keyword]++; - } else { - keywords[keyword] = 1; - } - }); - }); - - // Sort keywords by frequency - const keywordsSorted = Object.keys(keywords).sort((a, b) => keywords[b] - keywords[a]); - - // Lookup top 10 keywords - const topKeywords = keywordsSorted.slice(0, 10); - - process.stdout.write(' >>> ' + topKeywords.join(', ') + '\n'); - - // Save - User.update({ _id: id }, { - $set: { - keywords: topKeywords - } - }).then(() => { - resolve(); - }, err => { - reject(err); - }); - }); -} diff --git a/src/tools/analysis/mecab.js b/src/tools/analysis/mecab.js deleted file mode 100644 index 82f7d6d52..000000000 --- a/src/tools/analysis/mecab.js +++ /dev/null @@ -1,85 +0,0 @@ -// Original source code: https://github.com/hecomi/node-mecab-async -// CUSTOMIZED BY SYUILO - -var exec = require('child_process').exec; -var execSync = require('child_process').execSync; -var sq = require('shell-quote'); - -const config = require('../../conf').default; - -// for backward compatibility -var MeCab = function() {}; - -MeCab.prototype = { - command : config.analysis.mecab_command ? config.analysis.mecab_command : 'mecab', - _format: function(arrayResult) { - var result = []; - if (!arrayResult) { return result; } - // Reference: http://mecab.googlecode.com/svn/trunk/mecab/doc/index.html - // 表層形\t品詞,品詞細分類1,品詞細分類2,品詞細分類3,活用形,活用型,原形,読み,発音 - arrayResult.forEach(function(parsed) { - if (parsed.length <= 8) { return; } - result.push({ - kanji : parsed[0], - lexical : parsed[1], - compound : parsed[2], - compound2 : parsed[3], - compound3 : parsed[4], - conjugation : parsed[5], - inflection : parsed[6], - original : parsed[7], - reading : parsed[8], - pronunciation : parsed[9] || '' - }); - }); - return result; - }, - _shellCommand : function(str) { - return sq.quote(['echo', str]) + ' | ' + this.command; - }, - _parseMeCabResult : function(result) { - return result.split('\n').map(function(line) { - return line.replace('\t', ',').split(','); - }); - }, - parse : function(str, callback) { - process.nextTick(function() { // for bug - exec(MeCab._shellCommand(str), function(err, result) { - if (err) { return callback(err); } - callback(err, MeCab._parseMeCabResult(result).slice(0,-2)); - }); - }); - }, - parseSync : function(str) { - var result = execSync(MeCab._shellCommand(str)); - return MeCab._parseMeCabResult(String(result)).slice(0, -2); - }, - parseFormat : function(str, callback) { - MeCab.parse(str, function(err, result) { - if (err) { return callback(err); } - callback(err, MeCab._format(result)); - }); - }, - parseSyncFormat : function(str) { - return MeCab._format(MeCab.parseSync(str)); - }, - _wakatsu : function(arr) { - return arr.map(function(data) { return data[0]; }); - }, - wakachi : function(str, callback) { - MeCab.parse(str, function(err, arr) { - if (err) { return callback(err); } - callback(null, MeCab._wakatsu(arr)); - }); - }, - wakachiSync : function(str) { - var arr = MeCab.parseSync(str); - return MeCab._wakatsu(arr); - } -}; - -for (var x in MeCab.prototype) { - MeCab[x] = MeCab.prototype[x]; -} - -module.exports = MeCab; diff --git a/src/tools/analysis/naive-bayes.js b/src/tools/analysis/naive-bayes.js deleted file mode 100644 index 78f07153c..000000000 --- a/src/tools/analysis/naive-bayes.js +++ /dev/null @@ -1,302 +0,0 @@ -// Original source code: https://github.com/ttezel/bayes/blob/master/lib/naive_bayes.js (commit: 2c20d3066e4fc786400aaedcf3e42987e52abe3c) -// CUSTOMIZED BY SYUILO - -/* - Expose our naive-bayes generator function -*/ -module.exports = function (options) { - return new Naivebayes(options) -} - -// keys we use to serialize a classifier's state -var STATE_KEYS = module.exports.STATE_KEYS = [ - 'categories', 'docCount', 'totalDocuments', 'vocabulary', 'vocabularySize', - 'wordCount', 'wordFrequencyCount', 'options' -]; - -/** - * Initializes a NaiveBayes instance from a JSON state representation. - * Use this with classifier.toJson(). - * - * @param {String} jsonStr state representation obtained by classifier.toJson() - * @return {NaiveBayes} Classifier - */ -module.exports.fromJson = function (jsonStr) { - var parsed; - try { - parsed = JSON.parse(jsonStr) - } catch (e) { - throw new Error('Naivebayes.fromJson expects a valid JSON string.') - } - // init a new classifier - var classifier = new Naivebayes(parsed.options) - - // override the classifier's state - STATE_KEYS.forEach(function (k) { - if (!parsed[k]) { - throw new Error('Naivebayes.fromJson: JSON string is missing an expected property: `'+k+'`.') - } - classifier[k] = parsed[k] - }) - - return classifier -} - -/** - * Given an input string, tokenize it into an array of word tokens. - * This is the default tokenization function used if user does not provide one in `options`. - * - * @param {String} text - * @return {Array} - */ -var defaultTokenizer = function (text) { - //remove punctuation from text - remove anything that isn't a word char or a space - var rgxPunctuation = /[^(a-zA-ZA-Яa-я0-9_)+\s]/g - - var sanitized = text.replace(rgxPunctuation, ' ') - - return sanitized.split(/\s+/) -} - -/** - * Naive-Bayes Classifier - * - * This is a naive-bayes classifier that uses Laplace Smoothing. - * - * Takes an (optional) options object containing: - * - `tokenizer` => custom tokenization function - * - */ -function Naivebayes (options) { - // set options object - this.options = {} - if (typeof options !== 'undefined') { - if (!options || typeof options !== 'object' || Array.isArray(options)) { - throw TypeError('NaiveBayes got invalid `options`: `' + options + '`. Pass in an object.') - } - this.options = options - } - - this.tokenizer = this.options.tokenizer || defaultTokenizer - - //initialize our vocabulary and its size - this.vocabulary = {} - this.vocabularySize = 0 - - //number of documents we have learned from - this.totalDocuments = 0 - - //document frequency table for each of our categories - //=> for each category, how often were documents mapped to it - this.docCount = {} - - //for each category, how many words total were mapped to it - this.wordCount = {} - - //word frequency table for each category - //=> for each category, how frequent was a given word mapped to it - this.wordFrequencyCount = {} - - //hashmap of our category names - this.categories = {} -} - -/** - * Initialize each of our data structure entries for this new category - * - * @param {String} categoryName - */ -Naivebayes.prototype.initializeCategory = function (categoryName) { - if (!this.categories[categoryName]) { - this.docCount[categoryName] = 0 - this.wordCount[categoryName] = 0 - this.wordFrequencyCount[categoryName] = {} - this.categories[categoryName] = true - } - return this -} - -/** - * train our naive-bayes classifier by telling it what `category` - * the `text` corresponds to. - * - * @param {String} text - * @param {String} class - */ -Naivebayes.prototype.learn = function (text, category) { - var self = this - - //initialize category data structures if we've never seen this category - self.initializeCategory(category) - - //update our count of how many documents mapped to this category - self.docCount[category]++ - - //update the total number of documents we have learned from - self.totalDocuments++ - - //normalize the text into a word array - var tokens = self.tokenizer(text) - - //get a frequency count for each token in the text - var frequencyTable = self.frequencyTable(tokens) - - /* - Update our vocabulary and our word frequency count for this category - */ - - Object - .keys(frequencyTable) - .forEach(function (token) { - //add this word to our vocabulary if not already existing - if (!self.vocabulary[token]) { - self.vocabulary[token] = true - self.vocabularySize++ - } - - var frequencyInText = frequencyTable[token] - - //update the frequency information for this word in this category - if (!self.wordFrequencyCount[category][token]) - self.wordFrequencyCount[category][token] = frequencyInText - else - self.wordFrequencyCount[category][token] += frequencyInText - - //update the count of all words we have seen mapped to this category - self.wordCount[category] += frequencyInText - }) - - return self -} - -/** - * Determine what category `text` belongs to. - * - * @param {String} text - * @return {String} category - */ -Naivebayes.prototype.categorize = function (text) { - var self = this - , maxProbability = -Infinity - , chosenCategory = null - - var tokens = self.tokenizer(text) - var frequencyTable = self.frequencyTable(tokens) - - //iterate thru our categories to find the one with max probability for this text - Object - .keys(self.categories) - .forEach(function (category) { - - //start by calculating the overall probability of this category - //=> out of all documents we've ever looked at, how many were - // mapped to this category - var categoryProbability = self.docCount[category] / self.totalDocuments - - //take the log to avoid underflow - var logProbability = Math.log(categoryProbability) - - //now determine P( w | c ) for each word `w` in the text - Object - .keys(frequencyTable) - .forEach(function (token) { - var frequencyInText = frequencyTable[token] - var tokenProbability = self.tokenProbability(token, category) - - // console.log('token: %s category: `%s` tokenProbability: %d', token, category, tokenProbability) - - //determine the log of the P( w | c ) for this word - logProbability += frequencyInText * Math.log(tokenProbability) - }) - - if (logProbability > maxProbability) { - maxProbability = logProbability - chosenCategory = category - } - }) - - return chosenCategory -} - -/** - * Calculate probability that a `token` belongs to a `category` - * - * @param {String} token - * @param {String} category - * @return {Number} probability - */ -Naivebayes.prototype.tokenProbability = function (token, category) { - //how many times this word has occurred in documents mapped to this category - var wordFrequencyCount = this.wordFrequencyCount[category][token] || 0 - - //what is the count of all words that have ever been mapped to this category - var wordCount = this.wordCount[category] - - //use laplace Add-1 Smoothing equation - return ( wordFrequencyCount + 1 ) / ( wordCount + this.vocabularySize ) -} - -/** - * Build a frequency hashmap where - * - the keys are the entries in `tokens` - * - the values are the frequency of each entry in `tokens` - * - * @param {Array} tokens Normalized word array - * @return {Object} - */ -Naivebayes.prototype.frequencyTable = function (tokens) { - var frequencyTable = Object.create(null) - - tokens.forEach(function (token) { - if (!frequencyTable[token]) - frequencyTable[token] = 1 - else - frequencyTable[token]++ - }) - - return frequencyTable -} - -/** - * Dump the classifier's state as a JSON string. - * @return {String} Representation of the classifier. - */ -Naivebayes.prototype.toJson = function () { - var state = {} - var self = this - STATE_KEYS.forEach(function (k) { - state[k] = self[k] - }) - - var jsonStr = JSON.stringify(state) - - return jsonStr -} - -// (original method) -Naivebayes.prototype.export = function () { - var state = {} - var self = this - STATE_KEYS.forEach(function (k) { - state[k] = self[k] - }) - - return state -} - -module.exports.import = function (data) { - var parsed = data - - // init a new classifier - var classifier = new Naivebayes() - - // override the classifier's state - STATE_KEYS.forEach(function (k) { - if (!parsed[k]) { - throw new Error('Naivebayes.import: data is missing an expected property: `'+k+'`.') - } - classifier[k] = parsed[k] - }) - - return classifier -} diff --git a/src/tools/analysis/predict-all-post-category.ts b/src/tools/analysis/predict-all-post-category.ts deleted file mode 100644 index 8564fd1b1..000000000 --- a/src/tools/analysis/predict-all-post-category.ts +++ /dev/null @@ -1,35 +0,0 @@ -import Post from '../../server/api/models/post'; -import Core from './core'; - -const c = new Core(); - -c.init().then(() => { - // 全ての(人間によって証明されていない)投稿を取得 - Post.find({ - text: { - $exists: true - }, - is_category_verified: { - $ne: true - } - }, { - sort: { - _id: -1 - }, - fields: { - _id: true, - text: true - } - }).then(posts => { - posts.forEach(post => { - console.log(`predicting... ${post._id}`); - const category = c.predict(post.text); - - Post.update({ _id: post._id }, { - $set: { - category: category - } - }); - }); - }); -}); diff --git a/src/tools/analysis/predict-user-interst.ts b/src/tools/analysis/predict-user-interst.ts deleted file mode 100644 index a101f2010..000000000 --- a/src/tools/analysis/predict-user-interst.ts +++ /dev/null @@ -1,45 +0,0 @@ -import Post from '../../server/api/models/post'; -import User from '../../server/api/models/user'; - -export async function predictOne(id) { - console.log(`predict interest of ${id} ...`); - - // TODO: repostなども含める - const recentPosts = await Post.find({ - userId: id, - category: { - $exists: true - } - }, { - sort: { - _id: -1 - }, - limit: 1000, - fields: { - _id: false, - category: true - } - }); - - const categories = {}; - - recentPosts.forEach(post => { - if (categories[post.category]) { - categories[post.category]++; - } else { - categories[post.category] = 1; - } - }); -} - -export async function predictAll() { - const allUsers = await User.find({}, { - fields: { - _id: true - } - }); - - allUsers.forEach(user => { - predictOne(user._id); - }); -} diff --git a/tsconfig.json b/tsconfig.json index 574c11bac..c407d554e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,6 @@ "./src/**/*.ts" ], "exclude": [ - "./src/server/web/app/**/*.ts" + "./src/client/app/**/*.ts" ] } diff --git a/webpack.config.ts b/webpack.config.ts index 53e3d2630..d486e100a 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -34,7 +34,7 @@ global['collapseSpacesReplacement'] = html => { }; global['base64replacement'] = (_, key) => { - return fs.readFileSync(__dirname + '/src/server/web/' + key, 'base64'); + return fs.readFileSync(__dirname + '/src/client/' + key, 'base64'); }; //#endregion @@ -52,18 +52,18 @@ module.exports = entries.map(x => { // Entries const entry = { - desktop: './src/server/web/app/desktop/script.ts', - mobile: './src/server/web/app/mobile/script.ts', - //ch: './src/server/web/app/ch/script.ts', - //stats: './src/server/web/app/stats/script.ts', - //status: './src/server/web/app/status/script.ts', - dev: './src/server/web/app/dev/script.ts', - auth: './src/server/web/app/auth/script.ts', - sw: './src/server/web/app/sw.js' + desktop: './src/client/app/desktop/script.ts', + mobile: './src/client/app/mobile/script.ts', + //ch: './src/client/app/ch/script.ts', + //stats: './src/client/app/stats/script.ts', + //status: './src/client/app/status/script.ts', + dev: './src/client/app/dev/script.ts', + auth: './src/client/app/auth/script.ts', + sw: './src/client/app/sw.js' }; const output = { - path: __dirname + '/built/server/web/assets', + path: __dirname + '/built/client/assets', filename: `[name].${version}.${lang}.${isProduction ? 'min' : 'raw'}.js` }; @@ -207,7 +207,7 @@ module.exports = entries.map(x => { loader: 'ts-loader', options: { happyPackMode: true, - configFile: __dirname + '/../src/server/web/app/tsconfig.json', + configFile: __dirname + '/src/client/app/tsconfig.json', appendTsSuffixTo: [/\.vue$/] } }, { @@ -232,7 +232,7 @@ module.exports = entries.map(x => { '.js', '.ts', '.json' ], alias: { - 'const.styl': __dirname + '/src/server/web/const.styl' + 'const.styl': __dirname + '/src/client/const.styl' } }, resolveLoader: {