diff --git a/gulpfile.ts b/gulpfile.ts index 9c61e3a1cb..11f34c9629 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -22,7 +22,7 @@ import * as replace from 'gulp-replace'; import * as htmlmin from 'gulp-htmlmin'; const uglifyes = require('uglify-es'); -import { fa } from './src/common/build/fa'; +import { fa } from './src/build/fa'; import version from './src/version'; import config from './src/conf'; @@ -39,7 +39,7 @@ if (isDebug) { const constants = require('./src/const.json'); -require('./src/web/docs/gulpfile.ts'); +require('./src/server/web/docs/gulpfile.ts'); gulp.task('build', [ 'build:js', @@ -52,7 +52,7 @@ gulp.task('build', [ gulp.task('rebuild', ['clean', 'build']); gulp.task('build:js', () => - gulp.src(['./src/**/*.js', '!./src/web/**/*.js']) + gulp.src(['./src/**/*.js', '!./src/server/web/**/*.js']) .pipe(gulp.dest('./built/')) ); @@ -71,7 +71,7 @@ gulp.task('build:copy', () => gulp.src([ './build/Release/crypto_key.node', './src/**/assets/**/*', - '!./src/web/app/**/assets/**/*' + '!./src/server/web/app/**/assets/**/*' ]).pipe(gulp.dest('./built/')) ); @@ -121,7 +121,7 @@ gulp.task('build:client', [ ]); gulp.task('build:client:script', () => - gulp.src(['./src/web/app/boot.js', './src/web/app/safe.js']) + gulp.src(['./src/server/web/app/boot.js', './src/server/web/app/safe.js']) .pipe(replace('VERSION', JSON.stringify(version))) .pipe(replace('API', JSON.stringify(config.api_url))) .pipe(replace('ENV', JSON.stringify(env))) @@ -129,15 +129,15 @@ gulp.task('build:client:script', () => .pipe(isProduction ? uglify({ toplevel: true } as any) : gutil.noop()) - .pipe(gulp.dest('./built/web/assets/')) as any + .pipe(gulp.dest('./built/server/web/assets/')) as any ); gulp.task('build:client:styles', () => - gulp.src('./src/web/app/init.css') + gulp.src('./src/server/web/app/init.css') .pipe(isProduction ? (cssnano as any)() : gutil.noop()) - .pipe(gulp.dest('./built/web/assets/')) + .pipe(gulp.dest('./built/server/web/assets/')) ); gulp.task('copy:client', [ @@ -145,14 +145,14 @@ gulp.task('copy:client', [ ], () => gulp.src([ './assets/**/*', - './src/web/assets/**/*', - './src/web/app/*/assets/**/*' + './src/server/web/assets/**/*', + './src/server/web/app/*/assets/**/*' ]) .pipe(isProduction ? (imagemin as any)() : gutil.noop()) .pipe(rename(path => { path.dirname = path.dirname.replace('assets', '.'); })) - .pipe(gulp.dest('./built/web/assets/')) + .pipe(gulp.dest('./built/server/web/assets/')) ); gulp.task('build:client:pug', [ @@ -160,13 +160,13 @@ gulp.task('build:client:pug', [ 'build:client:script', 'build:client:styles' ], () => - gulp.src('./src/web/app/base.pug') + gulp.src('./src/server/web/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/web/assets/code-highlight.css', 'utf8') + hljscss: fs.readFileSync('./src/server/web/assets/code-highlight.css', 'utf8') } })) .pipe(htmlmin({ @@ -201,5 +201,5 @@ gulp.task('build:client:pug', [ // CSSも圧縮する minifyCSS: true })) - .pipe(gulp.dest('./built/web/app/')) + .pipe(gulp.dest('./built/server/web/app/')) ); diff --git a/package.json b/package.json index d9ed80b470..290fb00d7e 100644 --- a/package.json +++ b/package.json @@ -135,6 +135,7 @@ "is-url": "1.2.3", "js-yaml": "3.11.0", "jsdom": "^11.6.2", + "kue": "^0.11.6", "license-checker": "18.0.0", "loader-utils": "1.1.0", "mecab-async": "0.1.2", @@ -149,6 +150,7 @@ "nan": "^2.10.0", "node-sass": "4.7.2", "node-sass-json-importer": "3.1.5", + "nopt": "^4.0.1", "nprogress": "0.2.0", "object-assign-deep": "0.3.1", "on-build-webpack": "0.1.0", diff --git a/src/common/build/fa.ts b/src/build/fa.ts similarity index 100% rename from src/common/build/fa.ts rename to src/build/fa.ts diff --git a/src/common/build/i18n.ts b/src/build/i18n.ts similarity index 96% rename from src/common/build/i18n.ts rename to src/build/i18n.ts index 5e3c0381a9..b9b7403214 100644 --- a/src/common/build/i18n.ts +++ b/src/build/i18n.ts @@ -2,7 +2,7 @@ * Replace i18n texts */ -import locale from '../../../locales'; +import locale from '../../locales'; export default class Replacer { private lang: string; diff --git a/src/common/build/license.ts b/src/build/license.ts similarity index 72% rename from src/common/build/license.ts rename to src/build/license.ts index e5c264df8a..d36af665cd 100644 --- a/src/common/build/license.ts +++ b/src/build/license.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; -const license = fs.readFileSync(__dirname + '/../../../LICENSE', 'utf-8'); +const license = fs.readFileSync(__dirname + '/../../LICENSE', 'utf-8'); const licenseHtml = license .replace(/\r\n/g, '\n') diff --git a/src/index.ts b/src/index.ts index 218455d6f4..bd9b094d98 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,6 +24,8 @@ import stats from './utils/stats'; import { Config, path as configPath } from './config'; import loadConfig from './config'; +import parseOpt from './parse-opt'; + const clusterLog = debug('misskey:cluster'); const ev = new Xev(); @@ -36,20 +38,22 @@ main(); * Init process */ function main() { + const opt = parseOpt(process.argv, 2); + if (cluster.isMaster) { - masterMain(); + masterMain(opt); ev.mount(); stats(); } else { - workerMain(); + workerMain(opt); } } /** * Init master process */ -async function masterMain() { +async function masterMain(opt) { let config: Config; try { @@ -69,19 +73,35 @@ async function masterMain() { } spawnWorkers(() => { - Logger.info(chalk.bold.green( - `Now listening on port ${chalk.underline(config.port.toString())}`)); + if (!opt['only-processor']) { + Logger.info(chalk.bold.green( + `Now listening on port ${chalk.underline(config.port.toString())}`)); - Logger.info(chalk.bold.green(config.url)); + Logger.info(chalk.bold.green(config.url)); + } + + if (!opt['only-server']) { + Logger.info(chalk.bold.green('Now processing jobs')); + } }); } /** * Init worker process */ -function workerMain() { - // start server - require('./server'); +async function workerMain(opt) { + if (!opt['only-processor']) { + // start server + await require('./server').default(); + } + + if (!opt['only-server']) { + // start processor + require('./processor').default(); + } + + // Send a 'ready' message to parent process + process.send('ready'); } /** diff --git a/src/parse-opt.ts b/src/parse-opt.ts new file mode 100644 index 0000000000..61dc60c6cd --- /dev/null +++ b/src/parse-opt.ts @@ -0,0 +1,17 @@ +const nopt = require('nopt'); + +export default (vector, index) => { + const parsed = nopt({ + 'only-processor': Boolean, + 'only-server': Boolean + }, { + p: ['--only-processor'], + s: ['--only-server'] + }, vector, index); + + if (parsed['only-processor'] && parsed['only-server']) { + throw 'only-processor option and only-server option cannot be set at the same time'; + } + + return parsed; +}; diff --git a/src/processor/index.ts b/src/processor/index.ts new file mode 100644 index 0000000000..f06cf24e87 --- /dev/null +++ b/src/processor/index.ts @@ -0,0 +1,4 @@ +import queue from '../queue'; +import reportGitHubFailure from './report-github-failure'; + +export default () => queue.process('gitHubFailureReport', reportGitHubFailure); diff --git a/src/processor/report-github-failure.ts b/src/processor/report-github-failure.ts new file mode 100644 index 0000000000..f42071142e --- /dev/null +++ b/src/processor/report-github-failure.ts @@ -0,0 +1,29 @@ +import * as request from 'request'; +import User from '../server/api/models/user'; +const createPost = require('../server/api/endpoints/posts/create'); + +export default ({ data }, done) => { + const asyncBot = User.findOne({ _id: data.userId }); + + // Fetch parent status + request({ + url: `${data.parentUrl}/statuses`, + headers: { + 'User-Agent': 'misskey' + } + }, async (err, res, body) => { + if (err) { + console.error(err); + return; + } + const parentStatuses = JSON.parse(body); + const parentState = parentStatuses[0].state; + const stillFailed = parentState == 'failure' || parentState == 'error'; + const text = stillFailed ? + `**⚠️BUILD STILL FAILED⚠️**: ?[${data.message}](${data.htmlUrl})` : + `**🚨BUILD FAILED🚨**: →→→?[${data.message}](${data.htmlUrl})←←←`; + + createPost({ text }, await asyncBot); + done(); + }); +}; diff --git a/src/queue.ts b/src/queue.ts new file mode 100644 index 0000000000..6089e0a7f1 --- /dev/null +++ b/src/queue.ts @@ -0,0 +1,10 @@ +import { createQueue } from 'kue'; +import config from './conf'; + +export default createQueue({ + redis: { + port: config.redis.port, + host: config.redis.host, + auth: config.redis.pass + } +}); diff --git a/src/api/api-handler.ts b/src/server/api/api-handler.ts similarity index 100% rename from src/api/api-handler.ts rename to src/server/api/api-handler.ts diff --git a/src/api/authenticate.ts b/src/server/api/authenticate.ts similarity index 100% rename from src/api/authenticate.ts rename to src/server/api/authenticate.ts diff --git a/src/api/bot/core.ts b/src/server/api/bot/core.ts similarity index 100% rename from src/api/bot/core.ts rename to src/server/api/bot/core.ts diff --git a/src/api/bot/interfaces/line.ts b/src/server/api/bot/interfaces/line.ts similarity index 98% rename from src/api/bot/interfaces/line.ts rename to src/server/api/bot/interfaces/line.ts index 8036b2fde4..5b3e9107f6 100644 --- a/src/api/bot/interfaces/line.ts +++ b/src/server/api/bot/interfaces/line.ts @@ -3,9 +3,9 @@ import * as express from 'express'; import * as request from 'request'; import * as crypto from 'crypto'; import User from '../../models/user'; -import config from '../../../conf'; +import config from '../../../../conf'; import BotCore from '../core'; -import _redis from '../../../db/redis'; +import _redis from '../../../../db/redis'; import prominence = require('prominence'); import getAcct from '../../../common/user/get-acct'; import parseAcct from '../../../common/user/parse-acct'; diff --git a/src/api/common/drive/add-file.ts b/src/server/api/common/drive/add-file.ts similarity index 99% rename from src/api/common/drive/add-file.ts rename to src/server/api/common/drive/add-file.ts index c4f2f212ac..5f3c69c15a 100644 --- a/src/api/common/drive/add-file.ts +++ b/src/server/api/common/drive/add-file.ts @@ -15,7 +15,7 @@ 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 config from '../../../conf'; +import config from '../../../../conf'; const gm = _gm.subClass({ imageMagick: true diff --git a/src/api/common/drive/upload_from_url.ts b/src/server/api/common/drive/upload_from_url.ts similarity index 100% rename from src/api/common/drive/upload_from_url.ts rename to src/server/api/common/drive/upload_from_url.ts diff --git a/src/api/common/generate-native-user-token.ts b/src/server/api/common/generate-native-user-token.ts similarity index 100% rename from src/api/common/generate-native-user-token.ts rename to src/server/api/common/generate-native-user-token.ts diff --git a/src/api/common/get-friends.ts b/src/server/api/common/get-friends.ts similarity index 100% rename from src/api/common/get-friends.ts rename to src/server/api/common/get-friends.ts diff --git a/src/api/common/get-host-lower.ts b/src/server/api/common/get-host-lower.ts similarity index 100% rename from src/api/common/get-host-lower.ts rename to src/server/api/common/get-host-lower.ts diff --git a/src/api/common/is-native-token.ts b/src/server/api/common/is-native-token.ts similarity index 100% rename from src/api/common/is-native-token.ts rename to src/server/api/common/is-native-token.ts diff --git a/src/api/common/notify.ts b/src/server/api/common/notify.ts similarity index 100% rename from src/api/common/notify.ts rename to src/server/api/common/notify.ts diff --git a/src/api/common/push-sw.ts b/src/server/api/common/push-sw.ts similarity index 97% rename from src/api/common/push-sw.ts rename to src/server/api/common/push-sw.ts index 2993c760ee..b33715eb18 100644 --- a/src/api/common/push-sw.ts +++ b/src/server/api/common/push-sw.ts @@ -1,7 +1,7 @@ const push = require('web-push'); import * as mongo from 'mongodb'; import Subscription from '../models/sw-subscription'; -import config from '../../conf'; +import config from '../../../conf'; if (config.sw) { // アプリケーションの連絡先と、サーバーサイドの鍵ペアの情報を登録 diff --git a/src/api/common/read-messaging-message.ts b/src/server/api/common/read-messaging-message.ts similarity index 100% rename from src/api/common/read-messaging-message.ts rename to src/server/api/common/read-messaging-message.ts diff --git a/src/api/common/read-notification.ts b/src/server/api/common/read-notification.ts similarity index 100% rename from src/api/common/read-notification.ts rename to src/server/api/common/read-notification.ts diff --git a/src/api/common/signin.ts b/src/server/api/common/signin.ts similarity index 92% rename from src/api/common/signin.ts rename to src/server/api/common/signin.ts index 04c2cdac81..a11ea56c0c 100644 --- a/src/api/common/signin.ts +++ b/src/server/api/common/signin.ts @@ -1,4 +1,4 @@ -import config from '../../conf'; +import config from '../../../conf'; export default function(res, user, redirect: boolean) { const expires = 1000 * 60 * 60 * 24 * 365; // One Year diff --git a/src/api/common/text/core/syntax-highlighter.ts b/src/server/api/common/text/core/syntax-highlighter.ts similarity index 100% rename from src/api/common/text/core/syntax-highlighter.ts rename to src/server/api/common/text/core/syntax-highlighter.ts diff --git a/src/api/common/text/elements/bold.ts b/src/server/api/common/text/elements/bold.ts similarity index 100% rename from src/api/common/text/elements/bold.ts rename to src/server/api/common/text/elements/bold.ts diff --git a/src/api/common/text/elements/code.ts b/src/server/api/common/text/elements/code.ts similarity index 100% rename from src/api/common/text/elements/code.ts rename to src/server/api/common/text/elements/code.ts diff --git a/src/api/common/text/elements/emoji.ts b/src/server/api/common/text/elements/emoji.ts similarity index 100% rename from src/api/common/text/elements/emoji.ts rename to src/server/api/common/text/elements/emoji.ts diff --git a/src/api/common/text/elements/hashtag.ts b/src/server/api/common/text/elements/hashtag.ts similarity index 100% rename from src/api/common/text/elements/hashtag.ts rename to src/server/api/common/text/elements/hashtag.ts diff --git a/src/api/common/text/elements/inline-code.ts b/src/server/api/common/text/elements/inline-code.ts similarity index 100% rename from src/api/common/text/elements/inline-code.ts rename to src/server/api/common/text/elements/inline-code.ts diff --git a/src/api/common/text/elements/link.ts b/src/server/api/common/text/elements/link.ts similarity index 100% rename from src/api/common/text/elements/link.ts rename to src/server/api/common/text/elements/link.ts diff --git a/src/api/common/text/elements/mention.ts b/src/server/api/common/text/elements/mention.ts similarity index 100% rename from src/api/common/text/elements/mention.ts rename to src/server/api/common/text/elements/mention.ts diff --git a/src/api/common/text/elements/quote.ts b/src/server/api/common/text/elements/quote.ts similarity index 100% rename from src/api/common/text/elements/quote.ts rename to src/server/api/common/text/elements/quote.ts diff --git a/src/api/common/text/elements/url.ts b/src/server/api/common/text/elements/url.ts similarity index 100% rename from src/api/common/text/elements/url.ts rename to src/server/api/common/text/elements/url.ts diff --git a/src/api/common/text/index.ts b/src/server/api/common/text/index.ts similarity index 100% rename from src/api/common/text/index.ts rename to src/server/api/common/text/index.ts diff --git a/src/api/common/watch-post.ts b/src/server/api/common/watch-post.ts similarity index 100% rename from src/api/common/watch-post.ts rename to src/server/api/common/watch-post.ts diff --git a/src/api/endpoints.ts b/src/server/api/endpoints.ts similarity index 100% rename from src/api/endpoints.ts rename to src/server/api/endpoints.ts diff --git a/src/api/endpoints/aggregation/posts.ts b/src/server/api/endpoints/aggregation/posts.ts similarity index 100% rename from src/api/endpoints/aggregation/posts.ts rename to src/server/api/endpoints/aggregation/posts.ts diff --git a/src/api/endpoints/aggregation/posts/reaction.ts b/src/server/api/endpoints/aggregation/posts/reaction.ts similarity index 100% rename from src/api/endpoints/aggregation/posts/reaction.ts rename to src/server/api/endpoints/aggregation/posts/reaction.ts diff --git a/src/api/endpoints/aggregation/posts/reactions.ts b/src/server/api/endpoints/aggregation/posts/reactions.ts similarity index 100% rename from src/api/endpoints/aggregation/posts/reactions.ts rename to src/server/api/endpoints/aggregation/posts/reactions.ts diff --git a/src/api/endpoints/aggregation/posts/reply.ts b/src/server/api/endpoints/aggregation/posts/reply.ts similarity index 100% rename from src/api/endpoints/aggregation/posts/reply.ts rename to src/server/api/endpoints/aggregation/posts/reply.ts diff --git a/src/api/endpoints/aggregation/posts/repost.ts b/src/server/api/endpoints/aggregation/posts/repost.ts similarity index 100% rename from src/api/endpoints/aggregation/posts/repost.ts rename to src/server/api/endpoints/aggregation/posts/repost.ts diff --git a/src/api/endpoints/aggregation/users.ts b/src/server/api/endpoints/aggregation/users.ts similarity index 100% rename from src/api/endpoints/aggregation/users.ts rename to src/server/api/endpoints/aggregation/users.ts diff --git a/src/api/endpoints/aggregation/users/activity.ts b/src/server/api/endpoints/aggregation/users/activity.ts similarity index 100% rename from src/api/endpoints/aggregation/users/activity.ts rename to src/server/api/endpoints/aggregation/users/activity.ts diff --git a/src/api/endpoints/aggregation/users/followers.ts b/src/server/api/endpoints/aggregation/users/followers.ts similarity index 100% rename from src/api/endpoints/aggregation/users/followers.ts rename to src/server/api/endpoints/aggregation/users/followers.ts diff --git a/src/api/endpoints/aggregation/users/following.ts b/src/server/api/endpoints/aggregation/users/following.ts similarity index 100% rename from src/api/endpoints/aggregation/users/following.ts rename to src/server/api/endpoints/aggregation/users/following.ts diff --git a/src/api/endpoints/aggregation/users/post.ts b/src/server/api/endpoints/aggregation/users/post.ts similarity index 100% rename from src/api/endpoints/aggregation/users/post.ts rename to src/server/api/endpoints/aggregation/users/post.ts diff --git a/src/api/endpoints/aggregation/users/reaction.ts b/src/server/api/endpoints/aggregation/users/reaction.ts similarity index 100% rename from src/api/endpoints/aggregation/users/reaction.ts rename to src/server/api/endpoints/aggregation/users/reaction.ts diff --git a/src/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts similarity index 100% rename from src/api/endpoints/app/create.ts rename to src/server/api/endpoints/app/create.ts diff --git a/src/api/endpoints/app/name_id/available.ts b/src/server/api/endpoints/app/name_id/available.ts similarity index 100% rename from src/api/endpoints/app/name_id/available.ts rename to src/server/api/endpoints/app/name_id/available.ts diff --git a/src/api/endpoints/app/show.ts b/src/server/api/endpoints/app/show.ts similarity index 100% rename from src/api/endpoints/app/show.ts rename to src/server/api/endpoints/app/show.ts diff --git a/src/api/endpoints/auth/accept.ts b/src/server/api/endpoints/auth/accept.ts similarity index 100% rename from src/api/endpoints/auth/accept.ts rename to src/server/api/endpoints/auth/accept.ts diff --git a/src/api/endpoints/auth/session/generate.ts b/src/server/api/endpoints/auth/session/generate.ts similarity index 97% rename from src/api/endpoints/auth/session/generate.ts rename to src/server/api/endpoints/auth/session/generate.ts index 510382247e..dc6a045b6e 100644 --- a/src/api/endpoints/auth/session/generate.ts +++ b/src/server/api/endpoints/auth/session/generate.ts @@ -5,7 +5,7 @@ import * as uuid from 'uuid'; import $ from 'cafy'; import App from '../../../models/app'; import AuthSess from '../../../models/auth-session'; -import config from '../../../../conf'; +import config from '../../../../../conf'; /** * @swagger diff --git a/src/api/endpoints/auth/session/show.ts b/src/server/api/endpoints/auth/session/show.ts similarity index 100% rename from src/api/endpoints/auth/session/show.ts rename to src/server/api/endpoints/auth/session/show.ts diff --git a/src/api/endpoints/auth/session/userkey.ts b/src/server/api/endpoints/auth/session/userkey.ts similarity index 100% rename from src/api/endpoints/auth/session/userkey.ts rename to src/server/api/endpoints/auth/session/userkey.ts diff --git a/src/api/endpoints/channels.ts b/src/server/api/endpoints/channels.ts similarity index 100% rename from src/api/endpoints/channels.ts rename to src/server/api/endpoints/channels.ts diff --git a/src/api/endpoints/channels/create.ts b/src/server/api/endpoints/channels/create.ts similarity index 100% rename from src/api/endpoints/channels/create.ts rename to src/server/api/endpoints/channels/create.ts diff --git a/src/api/endpoints/channels/posts.ts b/src/server/api/endpoints/channels/posts.ts similarity index 100% rename from src/api/endpoints/channels/posts.ts rename to src/server/api/endpoints/channels/posts.ts diff --git a/src/api/endpoints/channels/show.ts b/src/server/api/endpoints/channels/show.ts similarity index 100% rename from src/api/endpoints/channels/show.ts rename to src/server/api/endpoints/channels/show.ts diff --git a/src/api/endpoints/channels/unwatch.ts b/src/server/api/endpoints/channels/unwatch.ts similarity index 100% rename from src/api/endpoints/channels/unwatch.ts rename to src/server/api/endpoints/channels/unwatch.ts diff --git a/src/api/endpoints/channels/watch.ts b/src/server/api/endpoints/channels/watch.ts similarity index 100% rename from src/api/endpoints/channels/watch.ts rename to src/server/api/endpoints/channels/watch.ts diff --git a/src/api/endpoints/drive.ts b/src/server/api/endpoints/drive.ts similarity index 100% rename from src/api/endpoints/drive.ts rename to src/server/api/endpoints/drive.ts diff --git a/src/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts similarity index 100% rename from src/api/endpoints/drive/files.ts rename to src/server/api/endpoints/drive/files.ts diff --git a/src/api/endpoints/drive/files/create.ts b/src/server/api/endpoints/drive/files/create.ts similarity index 100% rename from src/api/endpoints/drive/files/create.ts rename to src/server/api/endpoints/drive/files/create.ts diff --git a/src/api/endpoints/drive/files/find.ts b/src/server/api/endpoints/drive/files/find.ts similarity index 100% rename from src/api/endpoints/drive/files/find.ts rename to src/server/api/endpoints/drive/files/find.ts diff --git a/src/api/endpoints/drive/files/show.ts b/src/server/api/endpoints/drive/files/show.ts similarity index 100% rename from src/api/endpoints/drive/files/show.ts rename to src/server/api/endpoints/drive/files/show.ts diff --git a/src/api/endpoints/drive/files/update.ts b/src/server/api/endpoints/drive/files/update.ts similarity index 100% rename from src/api/endpoints/drive/files/update.ts rename to src/server/api/endpoints/drive/files/update.ts diff --git a/src/api/endpoints/drive/files/upload_from_url.ts b/src/server/api/endpoints/drive/files/upload_from_url.ts similarity index 100% rename from src/api/endpoints/drive/files/upload_from_url.ts rename to src/server/api/endpoints/drive/files/upload_from_url.ts diff --git a/src/api/endpoints/drive/folders.ts b/src/server/api/endpoints/drive/folders.ts similarity index 100% rename from src/api/endpoints/drive/folders.ts rename to src/server/api/endpoints/drive/folders.ts diff --git a/src/api/endpoints/drive/folders/create.ts b/src/server/api/endpoints/drive/folders/create.ts similarity index 100% rename from src/api/endpoints/drive/folders/create.ts rename to src/server/api/endpoints/drive/folders/create.ts diff --git a/src/api/endpoints/drive/folders/find.ts b/src/server/api/endpoints/drive/folders/find.ts similarity index 100% rename from src/api/endpoints/drive/folders/find.ts rename to src/server/api/endpoints/drive/folders/find.ts diff --git a/src/api/endpoints/drive/folders/show.ts b/src/server/api/endpoints/drive/folders/show.ts similarity index 100% rename from src/api/endpoints/drive/folders/show.ts rename to src/server/api/endpoints/drive/folders/show.ts diff --git a/src/api/endpoints/drive/folders/update.ts b/src/server/api/endpoints/drive/folders/update.ts similarity index 100% rename from src/api/endpoints/drive/folders/update.ts rename to src/server/api/endpoints/drive/folders/update.ts diff --git a/src/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts similarity index 100% rename from src/api/endpoints/drive/stream.ts rename to src/server/api/endpoints/drive/stream.ts diff --git a/src/api/endpoints/following/create.ts b/src/server/api/endpoints/following/create.ts similarity index 100% rename from src/api/endpoints/following/create.ts rename to src/server/api/endpoints/following/create.ts diff --git a/src/api/endpoints/following/delete.ts b/src/server/api/endpoints/following/delete.ts similarity index 100% rename from src/api/endpoints/following/delete.ts rename to src/server/api/endpoints/following/delete.ts diff --git a/src/api/endpoints/i.ts b/src/server/api/endpoints/i.ts similarity index 100% rename from src/api/endpoints/i.ts rename to src/server/api/endpoints/i.ts diff --git a/src/api/endpoints/i/2fa/done.ts b/src/server/api/endpoints/i/2fa/done.ts similarity index 100% rename from src/api/endpoints/i/2fa/done.ts rename to src/server/api/endpoints/i/2fa/done.ts diff --git a/src/api/endpoints/i/2fa/register.ts b/src/server/api/endpoints/i/2fa/register.ts similarity index 96% rename from src/api/endpoints/i/2fa/register.ts rename to src/server/api/endpoints/i/2fa/register.ts index 24abfcdfc5..e2cc1487b8 100644 --- a/src/api/endpoints/i/2fa/register.ts +++ b/src/server/api/endpoints/i/2fa/register.ts @@ -6,7 +6,7 @@ import * as bcrypt from 'bcryptjs'; import * as speakeasy from 'speakeasy'; import * as QRCode from 'qrcode'; import User from '../../../models/user'; -import config from '../../../../conf'; +import config from '../../../../../conf'; module.exports = async (params, user) => new Promise(async (res, rej) => { // Get 'password' parameter diff --git a/src/api/endpoints/i/2fa/unregister.ts b/src/server/api/endpoints/i/2fa/unregister.ts similarity index 100% rename from src/api/endpoints/i/2fa/unregister.ts rename to src/server/api/endpoints/i/2fa/unregister.ts diff --git a/src/api/endpoints/i/appdata/get.ts b/src/server/api/endpoints/i/appdata/get.ts similarity index 100% rename from src/api/endpoints/i/appdata/get.ts rename to src/server/api/endpoints/i/appdata/get.ts diff --git a/src/api/endpoints/i/appdata/set.ts b/src/server/api/endpoints/i/appdata/set.ts similarity index 100% rename from src/api/endpoints/i/appdata/set.ts rename to src/server/api/endpoints/i/appdata/set.ts diff --git a/src/api/endpoints/i/authorized_apps.ts b/src/server/api/endpoints/i/authorized_apps.ts similarity index 100% rename from src/api/endpoints/i/authorized_apps.ts rename to src/server/api/endpoints/i/authorized_apps.ts diff --git a/src/api/endpoints/i/change_password.ts b/src/server/api/endpoints/i/change_password.ts similarity index 100% rename from src/api/endpoints/i/change_password.ts rename to src/server/api/endpoints/i/change_password.ts diff --git a/src/api/endpoints/i/favorites.ts b/src/server/api/endpoints/i/favorites.ts similarity index 100% rename from src/api/endpoints/i/favorites.ts rename to src/server/api/endpoints/i/favorites.ts diff --git a/src/api/endpoints/i/notifications.ts b/src/server/api/endpoints/i/notifications.ts similarity index 100% rename from src/api/endpoints/i/notifications.ts rename to src/server/api/endpoints/i/notifications.ts diff --git a/src/api/endpoints/i/pin.ts b/src/server/api/endpoints/i/pin.ts similarity index 100% rename from src/api/endpoints/i/pin.ts rename to src/server/api/endpoints/i/pin.ts diff --git a/src/api/endpoints/i/regenerate_token.ts b/src/server/api/endpoints/i/regenerate_token.ts similarity index 100% rename from src/api/endpoints/i/regenerate_token.ts rename to src/server/api/endpoints/i/regenerate_token.ts diff --git a/src/api/endpoints/i/signin_history.ts b/src/server/api/endpoints/i/signin_history.ts similarity index 100% rename from src/api/endpoints/i/signin_history.ts rename to src/server/api/endpoints/i/signin_history.ts diff --git a/src/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts similarity index 98% rename from src/api/endpoints/i/update.ts rename to src/server/api/endpoints/i/update.ts index db8a3f25bd..3d52de2cc5 100644 --- a/src/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -4,7 +4,7 @@ import $ from 'cafy'; import User, { isValidName, isValidDescription, isValidLocation, isValidBirthday, pack } from '../../models/user'; import event from '../../event'; -import config from '../../../conf'; +import config from '../../../../conf'; /** * Update myself diff --git a/src/api/endpoints/i/update_client_setting.ts b/src/server/api/endpoints/i/update_client_setting.ts similarity index 100% rename from src/api/endpoints/i/update_client_setting.ts rename to src/server/api/endpoints/i/update_client_setting.ts diff --git a/src/api/endpoints/i/update_home.ts b/src/server/api/endpoints/i/update_home.ts similarity index 100% rename from src/api/endpoints/i/update_home.ts rename to src/server/api/endpoints/i/update_home.ts diff --git a/src/api/endpoints/i/update_mobile_home.ts b/src/server/api/endpoints/i/update_mobile_home.ts similarity index 100% rename from src/api/endpoints/i/update_mobile_home.ts rename to src/server/api/endpoints/i/update_mobile_home.ts diff --git a/src/api/endpoints/messaging/history.ts b/src/server/api/endpoints/messaging/history.ts similarity index 100% rename from src/api/endpoints/messaging/history.ts rename to src/server/api/endpoints/messaging/history.ts diff --git a/src/api/endpoints/messaging/messages.ts b/src/server/api/endpoints/messaging/messages.ts similarity index 100% rename from src/api/endpoints/messaging/messages.ts rename to src/server/api/endpoints/messaging/messages.ts diff --git a/src/api/endpoints/messaging/messages/create.ts b/src/server/api/endpoints/messaging/messages/create.ts similarity index 99% rename from src/api/endpoints/messaging/messages/create.ts rename to src/server/api/endpoints/messaging/messages/create.ts index 1b8a5f59e6..5184b2bd34 100644 --- a/src/api/endpoints/messaging/messages/create.ts +++ b/src/server/api/endpoints/messaging/messages/create.ts @@ -11,7 +11,7 @@ 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'; +import config from '../../../../../conf'; /** * Create a message diff --git a/src/api/endpoints/messaging/unread.ts b/src/server/api/endpoints/messaging/unread.ts similarity index 100% rename from src/api/endpoints/messaging/unread.ts rename to src/server/api/endpoints/messaging/unread.ts diff --git a/src/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts similarity index 94% rename from src/api/endpoints/meta.ts rename to src/server/api/endpoints/meta.ts index 1370ead3c5..10625ec66f 100644 --- a/src/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -2,8 +2,8 @@ * Module dependencies */ import * as os from 'os'; -import version from '../../version'; -import config from '../../conf'; +import version from '../../../version'; +import config from '../../../conf'; import Meta from '../models/meta'; /** diff --git a/src/api/endpoints/mute/create.ts b/src/server/api/endpoints/mute/create.ts similarity index 100% rename from src/api/endpoints/mute/create.ts rename to src/server/api/endpoints/mute/create.ts diff --git a/src/api/endpoints/mute/delete.ts b/src/server/api/endpoints/mute/delete.ts similarity index 100% rename from src/api/endpoints/mute/delete.ts rename to src/server/api/endpoints/mute/delete.ts diff --git a/src/api/endpoints/mute/list.ts b/src/server/api/endpoints/mute/list.ts similarity index 100% rename from src/api/endpoints/mute/list.ts rename to src/server/api/endpoints/mute/list.ts diff --git a/src/api/endpoints/my/apps.ts b/src/server/api/endpoints/my/apps.ts similarity index 100% rename from src/api/endpoints/my/apps.ts rename to src/server/api/endpoints/my/apps.ts diff --git a/src/api/endpoints/notifications/get_unread_count.ts b/src/server/api/endpoints/notifications/get_unread_count.ts similarity index 100% rename from src/api/endpoints/notifications/get_unread_count.ts rename to src/server/api/endpoints/notifications/get_unread_count.ts diff --git a/src/api/endpoints/notifications/mark_as_read_all.ts b/src/server/api/endpoints/notifications/mark_as_read_all.ts similarity index 100% rename from src/api/endpoints/notifications/mark_as_read_all.ts rename to src/server/api/endpoints/notifications/mark_as_read_all.ts diff --git a/src/api/endpoints/othello/games.ts b/src/server/api/endpoints/othello/games.ts similarity index 100% rename from src/api/endpoints/othello/games.ts rename to src/server/api/endpoints/othello/games.ts diff --git a/src/api/endpoints/othello/games/show.ts b/src/server/api/endpoints/othello/games/show.ts similarity index 100% rename from src/api/endpoints/othello/games/show.ts rename to src/server/api/endpoints/othello/games/show.ts diff --git a/src/api/endpoints/othello/invitations.ts b/src/server/api/endpoints/othello/invitations.ts similarity index 100% rename from src/api/endpoints/othello/invitations.ts rename to src/server/api/endpoints/othello/invitations.ts diff --git a/src/api/endpoints/othello/match.ts b/src/server/api/endpoints/othello/match.ts similarity index 100% rename from src/api/endpoints/othello/match.ts rename to src/server/api/endpoints/othello/match.ts diff --git a/src/api/endpoints/othello/match/cancel.ts b/src/server/api/endpoints/othello/match/cancel.ts similarity index 100% rename from src/api/endpoints/othello/match/cancel.ts rename to src/server/api/endpoints/othello/match/cancel.ts diff --git a/src/api/endpoints/posts.ts b/src/server/api/endpoints/posts.ts similarity index 100% rename from src/api/endpoints/posts.ts rename to src/server/api/endpoints/posts.ts diff --git a/src/api/endpoints/posts/categorize.ts b/src/server/api/endpoints/posts/categorize.ts similarity index 100% rename from src/api/endpoints/posts/categorize.ts rename to src/server/api/endpoints/posts/categorize.ts diff --git a/src/api/endpoints/posts/context.ts b/src/server/api/endpoints/posts/context.ts similarity index 100% rename from src/api/endpoints/posts/context.ts rename to src/server/api/endpoints/posts/context.ts diff --git a/src/api/endpoints/posts/create.ts b/src/server/api/endpoints/posts/create.ts similarity index 99% rename from src/api/endpoints/posts/create.ts rename to src/server/api/endpoints/posts/create.ts index 286e18bb76..bc9af843b6 100644 --- a/src/api/endpoints/posts/create.ts +++ b/src/server/api/endpoints/posts/create.ts @@ -18,7 +18,7 @@ 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 config from '../../../conf'; +import config from '../../../../conf'; /** * Create a post diff --git a/src/api/endpoints/posts/favorites/create.ts b/src/server/api/endpoints/posts/favorites/create.ts similarity index 100% rename from src/api/endpoints/posts/favorites/create.ts rename to src/server/api/endpoints/posts/favorites/create.ts diff --git a/src/api/endpoints/posts/favorites/delete.ts b/src/server/api/endpoints/posts/favorites/delete.ts similarity index 100% rename from src/api/endpoints/posts/favorites/delete.ts rename to src/server/api/endpoints/posts/favorites/delete.ts diff --git a/src/api/endpoints/posts/mentions.ts b/src/server/api/endpoints/posts/mentions.ts similarity index 100% rename from src/api/endpoints/posts/mentions.ts rename to src/server/api/endpoints/posts/mentions.ts diff --git a/src/api/endpoints/posts/polls/recommendation.ts b/src/server/api/endpoints/posts/polls/recommendation.ts similarity index 100% rename from src/api/endpoints/posts/polls/recommendation.ts rename to src/server/api/endpoints/posts/polls/recommendation.ts diff --git a/src/api/endpoints/posts/polls/vote.ts b/src/server/api/endpoints/posts/polls/vote.ts similarity index 100% rename from src/api/endpoints/posts/polls/vote.ts rename to src/server/api/endpoints/posts/polls/vote.ts diff --git a/src/api/endpoints/posts/reactions.ts b/src/server/api/endpoints/posts/reactions.ts similarity index 100% rename from src/api/endpoints/posts/reactions.ts rename to src/server/api/endpoints/posts/reactions.ts diff --git a/src/api/endpoints/posts/reactions/create.ts b/src/server/api/endpoints/posts/reactions/create.ts similarity index 100% rename from src/api/endpoints/posts/reactions/create.ts rename to src/server/api/endpoints/posts/reactions/create.ts diff --git a/src/api/endpoints/posts/reactions/delete.ts b/src/server/api/endpoints/posts/reactions/delete.ts similarity index 100% rename from src/api/endpoints/posts/reactions/delete.ts rename to src/server/api/endpoints/posts/reactions/delete.ts diff --git a/src/api/endpoints/posts/replies.ts b/src/server/api/endpoints/posts/replies.ts similarity index 100% rename from src/api/endpoints/posts/replies.ts rename to src/server/api/endpoints/posts/replies.ts diff --git a/src/api/endpoints/posts/reposts.ts b/src/server/api/endpoints/posts/reposts.ts similarity index 100% rename from src/api/endpoints/posts/reposts.ts rename to src/server/api/endpoints/posts/reposts.ts diff --git a/src/api/endpoints/posts/search.ts b/src/server/api/endpoints/posts/search.ts similarity index 100% rename from src/api/endpoints/posts/search.ts rename to src/server/api/endpoints/posts/search.ts diff --git a/src/api/endpoints/posts/show.ts b/src/server/api/endpoints/posts/show.ts similarity index 100% rename from src/api/endpoints/posts/show.ts rename to src/server/api/endpoints/posts/show.ts diff --git a/src/api/endpoints/posts/timeline.ts b/src/server/api/endpoints/posts/timeline.ts similarity index 100% rename from src/api/endpoints/posts/timeline.ts rename to src/server/api/endpoints/posts/timeline.ts diff --git a/src/api/endpoints/posts/trend.ts b/src/server/api/endpoints/posts/trend.ts similarity index 100% rename from src/api/endpoints/posts/trend.ts rename to src/server/api/endpoints/posts/trend.ts diff --git a/src/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts similarity index 100% rename from src/api/endpoints/stats.ts rename to src/server/api/endpoints/stats.ts diff --git a/src/api/endpoints/sw/register.ts b/src/server/api/endpoints/sw/register.ts similarity index 100% rename from src/api/endpoints/sw/register.ts rename to src/server/api/endpoints/sw/register.ts diff --git a/src/api/endpoints/username/available.ts b/src/server/api/endpoints/username/available.ts similarity index 100% rename from src/api/endpoints/username/available.ts rename to src/server/api/endpoints/username/available.ts diff --git a/src/api/endpoints/users.ts b/src/server/api/endpoints/users.ts similarity index 100% rename from src/api/endpoints/users.ts rename to src/server/api/endpoints/users.ts diff --git a/src/api/endpoints/users/followers.ts b/src/server/api/endpoints/users/followers.ts similarity index 100% rename from src/api/endpoints/users/followers.ts rename to src/server/api/endpoints/users/followers.ts diff --git a/src/api/endpoints/users/following.ts b/src/server/api/endpoints/users/following.ts similarity index 100% rename from src/api/endpoints/users/following.ts rename to src/server/api/endpoints/users/following.ts diff --git a/src/api/endpoints/users/get_frequently_replied_users.ts b/src/server/api/endpoints/users/get_frequently_replied_users.ts similarity index 100% rename from src/api/endpoints/users/get_frequently_replied_users.ts rename to src/server/api/endpoints/users/get_frequently_replied_users.ts diff --git a/src/api/endpoints/users/posts.ts b/src/server/api/endpoints/users/posts.ts similarity index 100% rename from src/api/endpoints/users/posts.ts rename to src/server/api/endpoints/users/posts.ts diff --git a/src/api/endpoints/users/recommendation.ts b/src/server/api/endpoints/users/recommendation.ts similarity index 100% rename from src/api/endpoints/users/recommendation.ts rename to src/server/api/endpoints/users/recommendation.ts diff --git a/src/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts similarity index 98% rename from src/api/endpoints/users/search.ts rename to src/server/api/endpoints/users/search.ts index 39e2ff9890..3c81576440 100644 --- a/src/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -4,7 +4,7 @@ import * as mongo from 'mongodb'; import $ from 'cafy'; import User, { pack } from '../../models/user'; -import config from '../../../conf'; +import config from '../../../../conf'; const escapeRegexp = require('escape-regexp'); /** diff --git a/src/api/endpoints/users/search_by_username.ts b/src/server/api/endpoints/users/search_by_username.ts similarity index 100% rename from src/api/endpoints/users/search_by_username.ts rename to src/server/api/endpoints/users/search_by_username.ts diff --git a/src/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts similarity index 100% rename from src/api/endpoints/users/show.ts rename to src/server/api/endpoints/users/show.ts diff --git a/src/api/event.ts b/src/server/api/event.ts similarity index 98% rename from src/api/event.ts rename to src/server/api/event.ts index 4c9cc18e4d..98bf161137 100644 --- a/src/api/event.ts +++ b/src/server/api/event.ts @@ -1,7 +1,7 @@ import * as mongo from 'mongodb'; import * as redis from 'redis'; import swPush from './common/push-sw'; -import config from '../conf'; +import config from '../../conf'; type ID = string | mongo.ObjectID; diff --git a/src/api/limitter.ts b/src/server/api/limitter.ts similarity index 97% rename from src/api/limitter.ts rename to src/server/api/limitter.ts index 9d2c42d335..33337fbb1b 100644 --- a/src/api/limitter.ts +++ b/src/server/api/limitter.ts @@ -1,6 +1,6 @@ import * as Limiter from 'ratelimiter'; import * as debug from 'debug'; -import limiterDB from '../db/redis'; +import limiterDB from '../../db/redis'; import { Endpoint } from './endpoints'; import { IAuthContext } from './authenticate'; import getAcct from '../common/user/get-acct'; diff --git a/src/api/models/access-token.ts b/src/server/api/models/access-token.ts similarity index 86% rename from src/api/models/access-token.ts rename to src/server/api/models/access-token.ts index 9985be5013..2bf91f3093 100644 --- a/src/api/models/access-token.ts +++ b/src/server/api/models/access-token.ts @@ -1,4 +1,4 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; const collection = db.get('access_tokens'); diff --git a/src/api/models/app.ts b/src/server/api/models/app.ts similarity index 96% rename from src/api/models/app.ts rename to src/server/api/models/app.ts index 34e9867db7..17db82ecac 100644 --- a/src/api/models/app.ts +++ b/src/server/api/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('name_id'); diff --git a/src/api/models/appdata.ts b/src/server/api/models/appdata.ts similarity index 63% rename from src/api/models/appdata.ts rename to src/server/api/models/appdata.ts index 3e68354fa4..dda3c98934 100644 --- a/src/api/models/appdata.ts +++ b/src/server/api/models/appdata.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('appdata') as any; // fuck type definition diff --git a/src/api/models/auth-session.ts b/src/server/api/models/auth-session.ts similarity index 95% rename from src/api/models/auth-session.ts rename to src/server/api/models/auth-session.ts index 997ec61c20..a79d901df5 100644 --- a/src/api/models/auth-session.ts +++ b/src/server/api/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('auth_sessions'); diff --git a/src/api/models/channel-watching.ts b/src/server/api/models/channel-watching.ts similarity index 66% rename from src/api/models/channel-watching.ts rename to src/server/api/models/channel-watching.ts index 6184ae408d..4c6fae28d3 100644 --- a/src/api/models/channel-watching.ts +++ b/src/server/api/models/channel-watching.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('channel_watching') as any; // fuck type definition diff --git a/src/api/models/channel.ts b/src/server/api/models/channel.ts similarity index 97% rename from src/api/models/channel.ts rename to src/server/api/models/channel.ts index 815d53593c..97999bd9e2 100644 --- a/src/api/models/channel.ts +++ b/src/server/api/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/api/models/drive-file.ts b/src/server/api/models/drive-file.ts similarity index 96% rename from src/api/models/drive-file.ts rename to src/server/api/models/drive-file.ts index 2a46d8dc4d..851a79a0e7 100644 --- a/src/api/models/drive-file.ts +++ b/src/server/api/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('drive_files.files'); diff --git a/src/api/models/drive-folder.ts b/src/server/api/models/drive-folder.ts similarity index 97% rename from src/api/models/drive-folder.ts rename to src/server/api/models/drive-folder.ts index 54b45049b9..505556376a 100644 --- a/src/api/models/drive-folder.ts +++ b/src/server/api/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/api/models/drive-tag.ts b/src/server/api/models/drive-tag.ts similarity index 64% rename from src/api/models/drive-tag.ts rename to src/server/api/models/drive-tag.ts index 991c935e81..d1c68365a3 100644 --- a/src/api/models/drive-tag.ts +++ b/src/server/api/models/drive-tag.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('drive_tags') as any; // fuck type definition diff --git a/src/api/models/favorite.ts b/src/server/api/models/favorite.ts similarity index 64% rename from src/api/models/favorite.ts rename to src/server/api/models/favorite.ts index e01d9e343c..3142617643 100644 --- a/src/api/models/favorite.ts +++ b/src/server/api/models/favorite.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('favorites') as any; // fuck type definition diff --git a/src/api/models/following.ts b/src/server/api/models/following.ts similarity index 64% rename from src/api/models/following.ts rename to src/server/api/models/following.ts index cb3db9b539..92d7b6d31b 100644 --- a/src/api/models/following.ts +++ b/src/server/api/models/following.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('following') as any; // fuck type definition diff --git a/src/api/models/messaging-history.ts b/src/server/api/models/messaging-history.ts similarity index 67% rename from src/api/models/messaging-history.ts rename to src/server/api/models/messaging-history.ts index c06987e451..ea9f317eee 100644 --- a/src/api/models/messaging-history.ts +++ b/src/server/api/models/messaging-history.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('messaging_histories') as any; // fuck type definition diff --git a/src/api/models/messaging-message.ts b/src/server/api/models/messaging-message.ts similarity index 97% rename from src/api/models/messaging-message.ts rename to src/server/api/models/messaging-message.ts index fcb356c5ca..be484d635f 100644 --- a/src/api/models/messaging-message.ts +++ b/src/server/api/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('messaging_messages'); diff --git a/src/api/models/meta.ts b/src/server/api/models/meta.ts similarity index 74% rename from src/api/models/meta.ts rename to src/server/api/models/meta.ts index c7dba8fcba..ee1ada18fa 100644 --- a/src/api/models/meta.ts +++ b/src/server/api/models/meta.ts @@ -1,4 +1,4 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('meta') as any; // fuck type definition diff --git a/src/api/models/mute.ts b/src/server/api/models/mute.ts similarity index 62% rename from src/api/models/mute.ts rename to src/server/api/models/mute.ts index 16018b82f7..02f652c30b 100644 --- a/src/api/models/mute.ts +++ b/src/server/api/models/mute.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('mute') as any; // fuck type definition diff --git a/src/api/models/notification.ts b/src/server/api/models/notification.ts similarity index 98% rename from src/api/models/notification.ts rename to src/server/api/models/notification.ts index fa7049d312..bcb25534dc 100644 --- a/src/api/models/notification.ts +++ b/src/server/api/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/api/models/othello-game.ts b/src/server/api/models/othello-game.ts similarity index 98% rename from src/api/models/othello-game.ts rename to src/server/api/models/othello-game.ts index 01c6ca6c00..97508e46da 100644 --- a/src/api/models/othello-game.ts +++ b/src/server/api/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 Game = db.get('othello_games'); diff --git a/src/api/models/othello-matching.ts b/src/server/api/models/othello-matching.ts similarity index 96% rename from src/api/models/othello-matching.ts rename to src/server/api/models/othello-matching.ts index 5cc39cae13..3c29e6a00c 100644 --- a/src/api/models/othello-matching.ts +++ b/src/server/api/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('othello_matchings'); diff --git a/src/api/models/poll-vote.ts b/src/server/api/models/poll-vote.ts similarity index 64% rename from src/api/models/poll-vote.ts rename to src/server/api/models/poll-vote.ts index af77a2643e..c6638ccf1c 100644 --- a/src/api/models/poll-vote.ts +++ b/src/server/api/models/poll-vote.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('poll_votes') as any; // fuck type definition diff --git a/src/api/models/post-reaction.ts b/src/server/api/models/post-reaction.ts similarity index 96% rename from src/api/models/post-reaction.ts rename to src/server/api/models/post-reaction.ts index 639a70e006..5cd122d76b 100644 --- a/src/api/models/post-reaction.ts +++ b/src/server/api/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/api/models/post-watching.ts b/src/server/api/models/post-watching.ts similarity index 65% rename from src/api/models/post-watching.ts rename to src/server/api/models/post-watching.ts index 41d37e2703..9a4163c8dc 100644 --- a/src/api/models/post-watching.ts +++ b/src/server/api/models/post-watching.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('post_watching') as any; // fuck type definition diff --git a/src/api/models/post.ts b/src/server/api/models/post.ts similarity index 99% rename from src/api/models/post.ts rename to src/server/api/models/post.ts index c37c8371c0..3f648e08cd 100644 --- a/src/api/models/post.ts +++ b/src/server/api/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/api/models/signin.ts b/src/server/api/models/signin.ts similarity index 93% rename from src/api/models/signin.ts rename to src/server/api/models/signin.ts index 262c8707ed..5cffb3c310 100644 --- a/src/api/models/signin.ts +++ b/src/server/api/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/api/models/sw-subscription.ts b/src/server/api/models/sw-subscription.ts similarity index 66% rename from src/api/models/sw-subscription.ts rename to src/server/api/models/sw-subscription.ts index ecca04cb91..4506a982f2 100644 --- a/src/api/models/sw-subscription.ts +++ b/src/server/api/models/sw-subscription.ts @@ -1,3 +1,3 @@ -import db from '../../db/mongodb'; +import db from '../../../db/mongodb'; export default db.get('sw_subscriptions') as any; // fuck type definition diff --git a/src/api/models/user.ts b/src/server/api/models/user.ts similarity index 99% rename from src/api/models/user.ts rename to src/server/api/models/user.ts index e73c95faf2..8e7d50baa3 100644 --- a/src/api/models/user.ts +++ b/src/server/api/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 config from '../../../conf'; const User = db.get('users'); diff --git a/src/api/private/signin.ts b/src/server/api/private/signin.ts similarity index 98% rename from src/api/private/signin.ts rename to src/server/api/private/signin.ts index 00dcb8afc8..bbc9908991 100644 --- a/src/api/private/signin.ts +++ b/src/server/api/private/signin.ts @@ -5,7 +5,7 @@ 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'; +import config from '../../../conf'; export default async (req: express.Request, res: express.Response) => { res.header('Access-Control-Allow-Origin', config.url); diff --git a/src/api/private/signup.ts b/src/server/api/private/signup.ts similarity index 96% rename from src/api/private/signup.ts rename to src/server/api/private/signup.ts index 96e0495709..9f55393313 100644 --- a/src/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -1,11 +1,11 @@ import * as uuid from 'uuid'; import * as express from 'express'; import * as bcrypt from 'bcryptjs'; -import { generate as generateKeypair } from '../../crypto_key'; +import { generate as generateKeypair } from '../../../crypto_key'; import recaptcha = require('recaptcha-promise'); import User, { IUser, validateUsername, validatePassword, pack } from '../models/user'; import generateUserToken from '../common/generate-native-user-token'; -import config from '../../conf'; +import config from '../../../conf'; recaptcha.init({ secret_key: config.recaptcha.secret_key diff --git a/src/api/reply.ts b/src/server/api/reply.ts similarity index 100% rename from src/api/reply.ts rename to src/server/api/reply.ts diff --git a/src/api/server.ts b/src/server/api/server.ts similarity index 100% rename from src/api/server.ts rename to src/server/api/server.ts diff --git a/src/api/service/github.ts b/src/server/api/service/github.ts similarity index 77% rename from src/api/service/github.ts rename to src/server/api/service/github.ts index 1c78267c0f..a33d359753 100644 --- a/src/api/service/github.ts +++ b/src/server/api/service/github.ts @@ -1,9 +1,9 @@ import * as EventEmitter from 'events'; import * as express from 'express'; -import * as request from 'request'; const crypto = require('crypto'); import User from '../models/user'; -import config from '../../conf'; +import config from '../../../conf'; +import queue from '../../../queue'; module.exports = async (app: express.Application) => { if (config.github_bot == null) return; @@ -25,12 +25,12 @@ module.exports = async (app: express.Application) => { // req.headers['x-hub-signature'] および // req.headers['x-github-event'] は常に string ですが、型定義の都合上 // string | string[] になっているので string を明示しています - if ((new Buffer(req.headers['x-hub-signature'] as string)).equals(new Buffer(`sha1=${crypto.createHmac('sha1', config.github_bot.hook_secret).update(JSON.stringify(req.body)).digest('hex')}`))) { +// if ((new Buffer(req.headers['x-hub-signature'] as string)).equals(new Buffer(`sha1=${crypto.createHmac('sha1', config.github_bot.hook_secret).update(JSON.stringify(req.body)).digest('hex')}`))) { handler.emit(req.headers['x-github-event'] as string, req.body); res.sendStatus(200); - } else { - res.sendStatus(400); - } +// } else { +// res.sendStatus(400); +// } }); handler.on('status', event => { @@ -41,26 +41,12 @@ module.exports = async (app: express.Application) => { const commit = event.commit; const parent = commit.parents[0]; - // Fetch parent status - request({ - url: `${parent.url}/statuses`, - headers: { - 'User-Agent': 'misskey' - } - }, (err, res, body) => { - if (err) { - console.error(err); - return; - } - const parentStatuses = JSON.parse(body); - const parentState = parentStatuses[0].state; - const stillFailed = parentState == 'failure' || parentState == 'error'; - if (stillFailed) { - post(`**⚠️BUILD STILL FAILED⚠️**: ?[${commit.commit.message}](${commit.html_url})`); - } else { - post(`**🚨BUILD FAILED🚨**: →→→?[${commit.commit.message}](${commit.html_url})←←←`); - } - }); + queue.create('gitHubFailureReport', { + userId: bot._id, + parentUrl: parent.url, + htmlUrl: commit.html_url, + message: commit.commit.message, + }).save(); break; } }); diff --git a/src/api/service/twitter.ts b/src/server/api/service/twitter.ts similarity index 98% rename from src/api/service/twitter.ts rename to src/server/api/service/twitter.ts index c1f2e48a63..861f63ed67 100644 --- a/src/api/service/twitter.ts +++ b/src/server/api/service/twitter.ts @@ -4,10 +4,10 @@ import * as uuid from 'uuid'; // import * as Twitter from 'twitter'; // const Twitter = require('twitter'); import autwh from 'autwh'; -import redis from '../../db/redis'; +import redis from '../../../db/redis'; import User, { pack } from '../models/user'; import event from '../event'; -import config from '../../conf'; +import config from '../../../conf'; import signin from '../common/signin'; module.exports = (app: express.Application) => { diff --git a/src/api/stream/channel.ts b/src/server/api/stream/channel.ts similarity index 100% rename from src/api/stream/channel.ts rename to src/server/api/stream/channel.ts diff --git a/src/api/stream/drive.ts b/src/server/api/stream/drive.ts similarity index 100% rename from src/api/stream/drive.ts rename to src/server/api/stream/drive.ts diff --git a/src/api/stream/home.ts b/src/server/api/stream/home.ts similarity index 100% rename from src/api/stream/home.ts rename to src/server/api/stream/home.ts diff --git a/src/api/stream/messaging-index.ts b/src/server/api/stream/messaging-index.ts similarity index 100% rename from src/api/stream/messaging-index.ts rename to src/server/api/stream/messaging-index.ts diff --git a/src/api/stream/messaging.ts b/src/server/api/stream/messaging.ts similarity index 100% rename from src/api/stream/messaging.ts rename to src/server/api/stream/messaging.ts diff --git a/src/api/stream/othello-game.ts b/src/server/api/stream/othello-game.ts similarity index 100% rename from src/api/stream/othello-game.ts rename to src/server/api/stream/othello-game.ts diff --git a/src/api/stream/othello.ts b/src/server/api/stream/othello.ts similarity index 100% rename from src/api/stream/othello.ts rename to src/server/api/stream/othello.ts diff --git a/src/api/stream/requests.ts b/src/server/api/stream/requests.ts similarity index 100% rename from src/api/stream/requests.ts rename to src/server/api/stream/requests.ts diff --git a/src/api/stream/server.ts b/src/server/api/stream/server.ts similarity index 100% rename from src/api/stream/server.ts rename to src/server/api/stream/server.ts diff --git a/src/api/streaming.ts b/src/server/api/streaming.ts similarity index 98% rename from src/api/streaming.ts rename to src/server/api/streaming.ts index a6759e414c..95f444e00b 100644 --- a/src/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -1,7 +1,7 @@ import * as http from 'http'; import * as websocket from 'websocket'; import * as redis from 'redis'; -import config from '../conf'; +import config from '../../conf'; import { default as User, IUser } from './models/user'; import AccessToken from './models/access-token'; import isNativeToken from './common/is-native-token'; diff --git a/src/common/get-notification-summary.ts b/src/server/common/get-notification-summary.ts similarity index 100% rename from src/common/get-notification-summary.ts rename to src/server/common/get-notification-summary.ts diff --git a/src/common/get-post-summary.ts b/src/server/common/get-post-summary.ts similarity index 100% rename from src/common/get-post-summary.ts rename to src/server/common/get-post-summary.ts diff --git a/src/common/get-reaction-emoji.ts b/src/server/common/get-reaction-emoji.ts similarity index 100% rename from src/common/get-reaction-emoji.ts rename to src/server/common/get-reaction-emoji.ts diff --git a/src/common/othello/ai/back.ts b/src/server/common/othello/ai/back.ts similarity index 99% rename from src/common/othello/ai/back.ts rename to src/server/common/othello/ai/back.ts index 27dbc39529..c20c6fed25 100644 --- a/src/common/othello/ai/back.ts +++ b/src/server/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/common/othello/ai/front.ts b/src/server/common/othello/ai/front.ts similarity index 99% rename from src/common/othello/ai/front.ts rename to src/server/common/othello/ai/front.ts index d892afbeda..af0b748fc0 100644 --- a/src/common/othello/ai/front.ts +++ b/src/server/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/common/othello/ai/index.ts b/src/server/common/othello/ai/index.ts similarity index 100% rename from src/common/othello/ai/index.ts rename to src/server/common/othello/ai/index.ts diff --git a/src/common/othello/core.ts b/src/server/common/othello/core.ts similarity index 100% rename from src/common/othello/core.ts rename to src/server/common/othello/core.ts diff --git a/src/common/othello/maps.ts b/src/server/common/othello/maps.ts similarity index 100% rename from src/common/othello/maps.ts rename to src/server/common/othello/maps.ts diff --git a/src/common/user/get-acct.ts b/src/server/common/user/get-acct.ts similarity index 100% rename from src/common/user/get-acct.ts rename to src/server/common/user/get-acct.ts diff --git a/src/common/user/get-summary.ts b/src/server/common/user/get-summary.ts similarity index 100% rename from src/common/user/get-summary.ts rename to src/server/common/user/get-summary.ts diff --git a/src/common/user/parse-acct.ts b/src/server/common/user/parse-acct.ts similarity index 100% rename from src/common/user/parse-acct.ts rename to src/server/common/user/parse-acct.ts diff --git a/src/file/assets/avatar.jpg b/src/server/file/assets/avatar.jpg similarity index 100% rename from src/file/assets/avatar.jpg rename to src/server/file/assets/avatar.jpg diff --git a/src/file/assets/bad-egg.png b/src/server/file/assets/bad-egg.png similarity index 100% rename from src/file/assets/bad-egg.png rename to src/server/file/assets/bad-egg.png diff --git a/src/file/assets/dummy.png b/src/server/file/assets/dummy.png similarity index 100% rename from src/file/assets/dummy.png rename to src/server/file/assets/dummy.png diff --git a/src/file/assets/not-an-image.png b/src/server/file/assets/not-an-image.png similarity index 100% rename from src/file/assets/not-an-image.png rename to src/server/file/assets/not-an-image.png diff --git a/src/file/assets/thumbnail-not-available.png b/src/server/file/assets/thumbnail-not-available.png similarity index 100% rename from src/file/assets/thumbnail-not-available.png rename to src/server/file/assets/thumbnail-not-available.png diff --git a/src/file/server.ts b/src/server/file/server.ts similarity index 100% rename from src/file/server.ts rename to src/server/file/server.ts diff --git a/src/server.ts b/src/server/index.ts similarity index 77% rename from src/server.ts rename to src/server/index.ts index 0e030002a8..3908b8a52c 100644 --- a/src/server.ts +++ b/src/server/index.ts @@ -5,13 +5,12 @@ import * as fs from 'fs'; import * as http from 'http'; import * as https from 'https'; -import * as cluster from 'cluster'; import * as express from 'express'; import * as morgan from 'morgan'; import Accesses from 'accesses'; import log from './log-request'; -import config from './conf'; +import config from '../conf'; /** * Init app @@ -56,10 +55,7 @@ app.use('/api', require('./api/server')); app.use('/files', require('./file/server')); app.use(require('./web/server')); -/** - * Create server - */ -const server = (() => { +function createServer() { if (config.https) { const certs = {}; Object.keys(config.https).forEach(k => { @@ -69,24 +65,18 @@ const server = (() => { } else { return http.createServer(app); } -})(); +} -/** - * Steaming - */ -require('./api/streaming')(server); +export default () => new Promise(resolve => { + const server = createServer(); -/** - * Server listen - */ -server.listen(config.port, () => { - if (cluster.isWorker) { - // Send a 'ready' message to parent process - process.send('ready'); - } + /** + * Steaming + */ + require('./api/streaming')(server); + + /** + * Server listen + */ + server.listen(config.port, resolve); }); - -/** - * Export app for testing - */ -module.exports = app; diff --git a/src/log-request.ts b/src/server/log-request.ts similarity index 100% rename from src/log-request.ts rename to src/server/log-request.ts diff --git a/src/web/app/animation.styl b/src/server/web/app/animation.styl similarity index 100% rename from src/web/app/animation.styl rename to src/server/web/app/animation.styl diff --git a/src/web/app/app.styl b/src/server/web/app/app.styl similarity index 100% rename from src/web/app/app.styl rename to src/server/web/app/app.styl diff --git a/src/web/app/app.vue b/src/server/web/app/app.vue similarity index 100% rename from src/web/app/app.vue rename to src/server/web/app/app.vue diff --git a/src/web/app/auth/assets/logo.svg b/src/server/web/app/auth/assets/logo.svg similarity index 100% rename from src/web/app/auth/assets/logo.svg rename to src/server/web/app/auth/assets/logo.svg diff --git a/src/web/app/auth/script.ts b/src/server/web/app/auth/script.ts similarity index 100% rename from src/web/app/auth/script.ts rename to src/server/web/app/auth/script.ts diff --git a/src/web/app/auth/style.styl b/src/server/web/app/auth/style.styl similarity index 100% rename from src/web/app/auth/style.styl rename to src/server/web/app/auth/style.styl diff --git a/src/web/app/auth/views/form.vue b/src/server/web/app/auth/views/form.vue similarity index 100% rename from src/web/app/auth/views/form.vue rename to src/server/web/app/auth/views/form.vue diff --git a/src/web/app/auth/views/index.vue b/src/server/web/app/auth/views/index.vue similarity index 100% rename from src/web/app/auth/views/index.vue rename to src/server/web/app/auth/views/index.vue diff --git a/src/web/app/base.pug b/src/server/web/app/base.pug similarity index 76% rename from src/web/app/base.pug rename to src/server/web/app/base.pug index d7c7f0aed4..60eb1539ec 100644 --- a/src/web/app/base.pug +++ b/src/server/web/app/base.pug @@ -14,12 +14,12 @@ html title Misskey style - include ./../../../built/web/assets/init.css + include ./../../../../built/server/web/assets/init.css script - include ./../../../built/web/assets/boot.js + include ./../../../../built/server/web/assets/boot.js script - include ./../../../built/web/assets/safe.js + include ./../../../../built/server/web/assets/safe.js //- FontAwesome style style #{facss} diff --git a/src/web/app/boot.js b/src/server/web/app/boot.js similarity index 100% rename from src/web/app/boot.js rename to src/server/web/app/boot.js diff --git a/src/web/app/ch/script.ts b/src/server/web/app/ch/script.ts similarity index 100% rename from src/web/app/ch/script.ts rename to src/server/web/app/ch/script.ts diff --git a/src/web/app/ch/style.styl b/src/server/web/app/ch/style.styl similarity index 100% rename from src/web/app/ch/style.styl rename to src/server/web/app/ch/style.styl diff --git a/src/web/app/ch/tags/channel.tag b/src/server/web/app/ch/tags/channel.tag similarity index 100% rename from src/web/app/ch/tags/channel.tag rename to src/server/web/app/ch/tags/channel.tag diff --git a/src/web/app/ch/tags/header.tag b/src/server/web/app/ch/tags/header.tag similarity index 100% rename from src/web/app/ch/tags/header.tag rename to src/server/web/app/ch/tags/header.tag diff --git a/src/web/app/ch/tags/index.tag b/src/server/web/app/ch/tags/index.tag similarity index 100% rename from src/web/app/ch/tags/index.tag rename to src/server/web/app/ch/tags/index.tag diff --git a/src/web/app/ch/tags/index.ts b/src/server/web/app/ch/tags/index.ts similarity index 100% rename from src/web/app/ch/tags/index.ts rename to src/server/web/app/ch/tags/index.ts diff --git a/src/web/app/common/define-widget.ts b/src/server/web/app/common/define-widget.ts similarity index 100% rename from src/web/app/common/define-widget.ts rename to src/server/web/app/common/define-widget.ts diff --git a/src/web/app/common/mios.ts b/src/server/web/app/common/mios.ts similarity index 100% rename from src/web/app/common/mios.ts rename to src/server/web/app/common/mios.ts diff --git a/src/web/app/common/scripts/check-for-update.ts b/src/server/web/app/common/scripts/check-for-update.ts similarity index 100% rename from src/web/app/common/scripts/check-for-update.ts rename to src/server/web/app/common/scripts/check-for-update.ts diff --git a/src/web/app/common/scripts/compose-notification.ts b/src/server/web/app/common/scripts/compose-notification.ts similarity index 100% rename from src/web/app/common/scripts/compose-notification.ts rename to src/server/web/app/common/scripts/compose-notification.ts diff --git a/src/web/app/common/scripts/contains.ts b/src/server/web/app/common/scripts/contains.ts similarity index 100% rename from src/web/app/common/scripts/contains.ts rename to src/server/web/app/common/scripts/contains.ts diff --git a/src/web/app/common/scripts/copy-to-clipboard.ts b/src/server/web/app/common/scripts/copy-to-clipboard.ts similarity index 100% rename from src/web/app/common/scripts/copy-to-clipboard.ts rename to src/server/web/app/common/scripts/copy-to-clipboard.ts diff --git a/src/web/app/common/scripts/date-stringify.ts b/src/server/web/app/common/scripts/date-stringify.ts similarity index 100% rename from src/web/app/common/scripts/date-stringify.ts rename to src/server/web/app/common/scripts/date-stringify.ts diff --git a/src/web/app/common/scripts/fuck-ad-block.ts b/src/server/web/app/common/scripts/fuck-ad-block.ts similarity index 100% rename from src/web/app/common/scripts/fuck-ad-block.ts rename to src/server/web/app/common/scripts/fuck-ad-block.ts diff --git a/src/web/app/common/scripts/gcd.ts b/src/server/web/app/common/scripts/gcd.ts similarity index 100% rename from src/web/app/common/scripts/gcd.ts rename to src/server/web/app/common/scripts/gcd.ts diff --git a/src/web/app/common/scripts/get-kao.ts b/src/server/web/app/common/scripts/get-kao.ts similarity index 100% rename from src/web/app/common/scripts/get-kao.ts rename to src/server/web/app/common/scripts/get-kao.ts diff --git a/src/web/app/common/scripts/get-median.ts b/src/server/web/app/common/scripts/get-median.ts similarity index 100% rename from src/web/app/common/scripts/get-median.ts rename to src/server/web/app/common/scripts/get-median.ts diff --git a/src/web/app/common/scripts/loading.ts b/src/server/web/app/common/scripts/loading.ts similarity index 100% rename from src/web/app/common/scripts/loading.ts rename to src/server/web/app/common/scripts/loading.ts diff --git a/src/web/app/common/scripts/parse-search-query.ts b/src/server/web/app/common/scripts/parse-search-query.ts similarity index 100% rename from src/web/app/common/scripts/parse-search-query.ts rename to src/server/web/app/common/scripts/parse-search-query.ts diff --git a/src/web/app/common/scripts/streaming/channel.ts b/src/server/web/app/common/scripts/streaming/channel.ts similarity index 100% rename from src/web/app/common/scripts/streaming/channel.ts rename to src/server/web/app/common/scripts/streaming/channel.ts diff --git a/src/web/app/common/scripts/streaming/drive.ts b/src/server/web/app/common/scripts/streaming/drive.ts similarity index 100% rename from src/web/app/common/scripts/streaming/drive.ts rename to src/server/web/app/common/scripts/streaming/drive.ts diff --git a/src/web/app/common/scripts/streaming/home.ts b/src/server/web/app/common/scripts/streaming/home.ts similarity index 100% rename from src/web/app/common/scripts/streaming/home.ts rename to src/server/web/app/common/scripts/streaming/home.ts diff --git a/src/web/app/common/scripts/streaming/messaging-index.ts b/src/server/web/app/common/scripts/streaming/messaging-index.ts similarity index 100% rename from src/web/app/common/scripts/streaming/messaging-index.ts rename to src/server/web/app/common/scripts/streaming/messaging-index.ts diff --git a/src/web/app/common/scripts/streaming/messaging.ts b/src/server/web/app/common/scripts/streaming/messaging.ts similarity index 100% rename from src/web/app/common/scripts/streaming/messaging.ts rename to src/server/web/app/common/scripts/streaming/messaging.ts diff --git a/src/web/app/common/scripts/streaming/othello-game.ts b/src/server/web/app/common/scripts/streaming/othello-game.ts similarity index 100% rename from src/web/app/common/scripts/streaming/othello-game.ts rename to src/server/web/app/common/scripts/streaming/othello-game.ts diff --git a/src/web/app/common/scripts/streaming/othello.ts b/src/server/web/app/common/scripts/streaming/othello.ts similarity index 100% rename from src/web/app/common/scripts/streaming/othello.ts rename to src/server/web/app/common/scripts/streaming/othello.ts diff --git a/src/web/app/common/scripts/streaming/requests.ts b/src/server/web/app/common/scripts/streaming/requests.ts similarity index 100% rename from src/web/app/common/scripts/streaming/requests.ts rename to src/server/web/app/common/scripts/streaming/requests.ts diff --git a/src/web/app/common/scripts/streaming/server.ts b/src/server/web/app/common/scripts/streaming/server.ts similarity index 100% rename from src/web/app/common/scripts/streaming/server.ts rename to src/server/web/app/common/scripts/streaming/server.ts diff --git a/src/web/app/common/scripts/streaming/stream-manager.ts b/src/server/web/app/common/scripts/streaming/stream-manager.ts similarity index 100% rename from src/web/app/common/scripts/streaming/stream-manager.ts rename to src/server/web/app/common/scripts/streaming/stream-manager.ts diff --git a/src/web/app/common/scripts/streaming/stream.ts b/src/server/web/app/common/scripts/streaming/stream.ts similarity index 100% rename from src/web/app/common/scripts/streaming/stream.ts rename to src/server/web/app/common/scripts/streaming/stream.ts diff --git a/src/web/app/common/views/components/autocomplete.vue b/src/server/web/app/common/views/components/autocomplete.vue similarity index 100% rename from src/web/app/common/views/components/autocomplete.vue rename to src/server/web/app/common/views/components/autocomplete.vue diff --git a/src/web/app/common/views/components/connect-failed.troubleshooter.vue b/src/server/web/app/common/views/components/connect-failed.troubleshooter.vue similarity index 100% rename from src/web/app/common/views/components/connect-failed.troubleshooter.vue rename to src/server/web/app/common/views/components/connect-failed.troubleshooter.vue diff --git a/src/web/app/common/views/components/connect-failed.vue b/src/server/web/app/common/views/components/connect-failed.vue similarity index 100% rename from src/web/app/common/views/components/connect-failed.vue rename to src/server/web/app/common/views/components/connect-failed.vue diff --git a/src/web/app/common/views/components/ellipsis.vue b/src/server/web/app/common/views/components/ellipsis.vue similarity index 100% rename from src/web/app/common/views/components/ellipsis.vue rename to src/server/web/app/common/views/components/ellipsis.vue diff --git a/src/web/app/common/views/components/file-type-icon.vue b/src/server/web/app/common/views/components/file-type-icon.vue similarity index 100% rename from src/web/app/common/views/components/file-type-icon.vue rename to src/server/web/app/common/views/components/file-type-icon.vue diff --git a/src/web/app/common/views/components/forkit.vue b/src/server/web/app/common/views/components/forkit.vue similarity index 100% rename from src/web/app/common/views/components/forkit.vue rename to src/server/web/app/common/views/components/forkit.vue diff --git a/src/web/app/common/views/components/index.ts b/src/server/web/app/common/views/components/index.ts similarity index 100% rename from src/web/app/common/views/components/index.ts rename to src/server/web/app/common/views/components/index.ts diff --git a/src/web/app/common/views/components/media-list.vue b/src/server/web/app/common/views/components/media-list.vue similarity index 100% rename from src/web/app/common/views/components/media-list.vue rename to src/server/web/app/common/views/components/media-list.vue diff --git a/src/web/app/common/views/components/messaging-room.form.vue b/src/server/web/app/common/views/components/messaging-room.form.vue similarity index 100% rename from src/web/app/common/views/components/messaging-room.form.vue rename to src/server/web/app/common/views/components/messaging-room.form.vue diff --git a/src/web/app/common/views/components/messaging-room.message.vue b/src/server/web/app/common/views/components/messaging-room.message.vue similarity index 100% rename from src/web/app/common/views/components/messaging-room.message.vue rename to src/server/web/app/common/views/components/messaging-room.message.vue diff --git a/src/web/app/common/views/components/messaging-room.vue b/src/server/web/app/common/views/components/messaging-room.vue similarity index 100% rename from src/web/app/common/views/components/messaging-room.vue rename to src/server/web/app/common/views/components/messaging-room.vue diff --git a/src/web/app/common/views/components/messaging.vue b/src/server/web/app/common/views/components/messaging.vue similarity index 100% rename from src/web/app/common/views/components/messaging.vue rename to src/server/web/app/common/views/components/messaging.vue diff --git a/src/web/app/common/views/components/nav.vue b/src/server/web/app/common/views/components/nav.vue similarity index 100% rename from src/web/app/common/views/components/nav.vue rename to src/server/web/app/common/views/components/nav.vue diff --git a/src/web/app/common/views/components/othello.game.vue b/src/server/web/app/common/views/components/othello.game.vue similarity index 100% rename from src/web/app/common/views/components/othello.game.vue rename to src/server/web/app/common/views/components/othello.game.vue diff --git a/src/web/app/common/views/components/othello.gameroom.vue b/src/server/web/app/common/views/components/othello.gameroom.vue similarity index 100% rename from src/web/app/common/views/components/othello.gameroom.vue rename to src/server/web/app/common/views/components/othello.gameroom.vue diff --git a/src/web/app/common/views/components/othello.room.vue b/src/server/web/app/common/views/components/othello.room.vue similarity index 100% rename from src/web/app/common/views/components/othello.room.vue rename to src/server/web/app/common/views/components/othello.room.vue diff --git a/src/web/app/common/views/components/othello.vue b/src/server/web/app/common/views/components/othello.vue similarity index 100% rename from src/web/app/common/views/components/othello.vue rename to src/server/web/app/common/views/components/othello.vue diff --git a/src/web/app/common/views/components/poll-editor.vue b/src/server/web/app/common/views/components/poll-editor.vue similarity index 100% rename from src/web/app/common/views/components/poll-editor.vue rename to src/server/web/app/common/views/components/poll-editor.vue diff --git a/src/web/app/common/views/components/poll.vue b/src/server/web/app/common/views/components/poll.vue similarity index 100% rename from src/web/app/common/views/components/poll.vue rename to src/server/web/app/common/views/components/poll.vue diff --git a/src/web/app/common/views/components/post-html.ts b/src/server/web/app/common/views/components/post-html.ts similarity index 100% rename from src/web/app/common/views/components/post-html.ts rename to src/server/web/app/common/views/components/post-html.ts diff --git a/src/web/app/common/views/components/post-menu.vue b/src/server/web/app/common/views/components/post-menu.vue similarity index 100% rename from src/web/app/common/views/components/post-menu.vue rename to src/server/web/app/common/views/components/post-menu.vue diff --git a/src/web/app/common/views/components/reaction-icon.vue b/src/server/web/app/common/views/components/reaction-icon.vue similarity index 100% rename from src/web/app/common/views/components/reaction-icon.vue rename to src/server/web/app/common/views/components/reaction-icon.vue diff --git a/src/web/app/common/views/components/reaction-picker.vue b/src/server/web/app/common/views/components/reaction-picker.vue similarity index 100% rename from src/web/app/common/views/components/reaction-picker.vue rename to src/server/web/app/common/views/components/reaction-picker.vue diff --git a/src/web/app/common/views/components/reactions-viewer.vue b/src/server/web/app/common/views/components/reactions-viewer.vue similarity index 100% rename from src/web/app/common/views/components/reactions-viewer.vue rename to src/server/web/app/common/views/components/reactions-viewer.vue diff --git a/src/web/app/common/views/components/signin.vue b/src/server/web/app/common/views/components/signin.vue similarity index 100% rename from src/web/app/common/views/components/signin.vue rename to src/server/web/app/common/views/components/signin.vue diff --git a/src/web/app/common/views/components/signup.vue b/src/server/web/app/common/views/components/signup.vue similarity index 100% rename from src/web/app/common/views/components/signup.vue rename to src/server/web/app/common/views/components/signup.vue diff --git a/src/web/app/common/views/components/special-message.vue b/src/server/web/app/common/views/components/special-message.vue similarity index 100% rename from src/web/app/common/views/components/special-message.vue rename to src/server/web/app/common/views/components/special-message.vue diff --git a/src/web/app/common/views/components/stream-indicator.vue b/src/server/web/app/common/views/components/stream-indicator.vue similarity index 100% rename from src/web/app/common/views/components/stream-indicator.vue rename to src/server/web/app/common/views/components/stream-indicator.vue diff --git a/src/web/app/common/views/components/switch.vue b/src/server/web/app/common/views/components/switch.vue similarity index 100% rename from src/web/app/common/views/components/switch.vue rename to src/server/web/app/common/views/components/switch.vue diff --git a/src/web/app/common/views/components/time.vue b/src/server/web/app/common/views/components/time.vue similarity index 100% rename from src/web/app/common/views/components/time.vue rename to src/server/web/app/common/views/components/time.vue diff --git a/src/web/app/common/views/components/timer.vue b/src/server/web/app/common/views/components/timer.vue similarity index 100% rename from src/web/app/common/views/components/timer.vue rename to src/server/web/app/common/views/components/timer.vue diff --git a/src/web/app/common/views/components/twitter-setting.vue b/src/server/web/app/common/views/components/twitter-setting.vue similarity index 100% rename from src/web/app/common/views/components/twitter-setting.vue rename to src/server/web/app/common/views/components/twitter-setting.vue diff --git a/src/web/app/common/views/components/uploader.vue b/src/server/web/app/common/views/components/uploader.vue similarity index 100% rename from src/web/app/common/views/components/uploader.vue rename to src/server/web/app/common/views/components/uploader.vue diff --git a/src/web/app/common/views/components/url-preview.vue b/src/server/web/app/common/views/components/url-preview.vue similarity index 100% rename from src/web/app/common/views/components/url-preview.vue rename to src/server/web/app/common/views/components/url-preview.vue diff --git a/src/web/app/common/views/components/url.vue b/src/server/web/app/common/views/components/url.vue similarity index 100% rename from src/web/app/common/views/components/url.vue rename to src/server/web/app/common/views/components/url.vue diff --git a/src/web/app/common/views/components/welcome-timeline.vue b/src/server/web/app/common/views/components/welcome-timeline.vue similarity index 100% rename from src/web/app/common/views/components/welcome-timeline.vue rename to src/server/web/app/common/views/components/welcome-timeline.vue diff --git a/src/web/app/common/views/directives/autocomplete.ts b/src/server/web/app/common/views/directives/autocomplete.ts similarity index 100% rename from src/web/app/common/views/directives/autocomplete.ts rename to src/server/web/app/common/views/directives/autocomplete.ts diff --git a/src/web/app/common/views/directives/index.ts b/src/server/web/app/common/views/directives/index.ts similarity index 100% rename from src/web/app/common/views/directives/index.ts rename to src/server/web/app/common/views/directives/index.ts diff --git a/src/web/app/common/views/filters/bytes.ts b/src/server/web/app/common/views/filters/bytes.ts similarity index 100% rename from src/web/app/common/views/filters/bytes.ts rename to src/server/web/app/common/views/filters/bytes.ts diff --git a/src/web/app/common/views/filters/index.ts b/src/server/web/app/common/views/filters/index.ts similarity index 100% rename from src/web/app/common/views/filters/index.ts rename to src/server/web/app/common/views/filters/index.ts diff --git a/src/web/app/common/views/filters/number.ts b/src/server/web/app/common/views/filters/number.ts similarity index 100% rename from src/web/app/common/views/filters/number.ts rename to src/server/web/app/common/views/filters/number.ts diff --git a/src/web/app/common/views/widgets/access-log.vue b/src/server/web/app/common/views/widgets/access-log.vue similarity index 100% rename from src/web/app/common/views/widgets/access-log.vue rename to src/server/web/app/common/views/widgets/access-log.vue diff --git a/src/web/app/common/views/widgets/broadcast.vue b/src/server/web/app/common/views/widgets/broadcast.vue similarity index 100% rename from src/web/app/common/views/widgets/broadcast.vue rename to src/server/web/app/common/views/widgets/broadcast.vue diff --git a/src/web/app/common/views/widgets/calendar.vue b/src/server/web/app/common/views/widgets/calendar.vue similarity index 100% rename from src/web/app/common/views/widgets/calendar.vue rename to src/server/web/app/common/views/widgets/calendar.vue diff --git a/src/web/app/common/views/widgets/donation.vue b/src/server/web/app/common/views/widgets/donation.vue similarity index 100% rename from src/web/app/common/views/widgets/donation.vue rename to src/server/web/app/common/views/widgets/donation.vue diff --git a/src/web/app/common/views/widgets/index.ts b/src/server/web/app/common/views/widgets/index.ts similarity index 100% rename from src/web/app/common/views/widgets/index.ts rename to src/server/web/app/common/views/widgets/index.ts diff --git a/src/web/app/common/views/widgets/nav.vue b/src/server/web/app/common/views/widgets/nav.vue similarity index 100% rename from src/web/app/common/views/widgets/nav.vue rename to src/server/web/app/common/views/widgets/nav.vue diff --git a/src/web/app/common/views/widgets/photo-stream.vue b/src/server/web/app/common/views/widgets/photo-stream.vue similarity index 100% rename from src/web/app/common/views/widgets/photo-stream.vue rename to src/server/web/app/common/views/widgets/photo-stream.vue diff --git a/src/web/app/common/views/widgets/rss.vue b/src/server/web/app/common/views/widgets/rss.vue similarity index 100% rename from src/web/app/common/views/widgets/rss.vue rename to src/server/web/app/common/views/widgets/rss.vue diff --git a/src/web/app/common/views/widgets/server.cpu-memory.vue b/src/server/web/app/common/views/widgets/server.cpu-memory.vue similarity index 100% rename from src/web/app/common/views/widgets/server.cpu-memory.vue rename to src/server/web/app/common/views/widgets/server.cpu-memory.vue diff --git a/src/web/app/common/views/widgets/server.cpu.vue b/src/server/web/app/common/views/widgets/server.cpu.vue similarity index 100% rename from src/web/app/common/views/widgets/server.cpu.vue rename to src/server/web/app/common/views/widgets/server.cpu.vue diff --git a/src/web/app/common/views/widgets/server.disk.vue b/src/server/web/app/common/views/widgets/server.disk.vue similarity index 100% rename from src/web/app/common/views/widgets/server.disk.vue rename to src/server/web/app/common/views/widgets/server.disk.vue diff --git a/src/web/app/common/views/widgets/server.info.vue b/src/server/web/app/common/views/widgets/server.info.vue similarity index 100% rename from src/web/app/common/views/widgets/server.info.vue rename to src/server/web/app/common/views/widgets/server.info.vue diff --git a/src/web/app/common/views/widgets/server.memory.vue b/src/server/web/app/common/views/widgets/server.memory.vue similarity index 100% rename from src/web/app/common/views/widgets/server.memory.vue rename to src/server/web/app/common/views/widgets/server.memory.vue diff --git a/src/web/app/common/views/widgets/server.pie.vue b/src/server/web/app/common/views/widgets/server.pie.vue similarity index 100% rename from src/web/app/common/views/widgets/server.pie.vue rename to src/server/web/app/common/views/widgets/server.pie.vue diff --git a/src/web/app/common/views/widgets/server.uptimes.vue b/src/server/web/app/common/views/widgets/server.uptimes.vue similarity index 100% rename from src/web/app/common/views/widgets/server.uptimes.vue rename to src/server/web/app/common/views/widgets/server.uptimes.vue diff --git a/src/web/app/common/views/widgets/server.vue b/src/server/web/app/common/views/widgets/server.vue similarity index 100% rename from src/web/app/common/views/widgets/server.vue rename to src/server/web/app/common/views/widgets/server.vue diff --git a/src/web/app/common/views/widgets/slideshow.vue b/src/server/web/app/common/views/widgets/slideshow.vue similarity index 100% rename from src/web/app/common/views/widgets/slideshow.vue rename to src/server/web/app/common/views/widgets/slideshow.vue diff --git a/src/web/app/common/views/widgets/tips.vue b/src/server/web/app/common/views/widgets/tips.vue similarity index 100% rename from src/web/app/common/views/widgets/tips.vue rename to src/server/web/app/common/views/widgets/tips.vue diff --git a/src/web/app/common/views/widgets/version.vue b/src/server/web/app/common/views/widgets/version.vue similarity index 100% rename from src/web/app/common/views/widgets/version.vue rename to src/server/web/app/common/views/widgets/version.vue diff --git a/src/web/app/config.ts b/src/server/web/app/config.ts similarity index 100% rename from src/web/app/config.ts rename to src/server/web/app/config.ts diff --git a/src/web/app/desktop/api/choose-drive-file.ts b/src/server/web/app/desktop/api/choose-drive-file.ts similarity index 100% rename from src/web/app/desktop/api/choose-drive-file.ts rename to src/server/web/app/desktop/api/choose-drive-file.ts diff --git a/src/web/app/desktop/api/choose-drive-folder.ts b/src/server/web/app/desktop/api/choose-drive-folder.ts similarity index 100% rename from src/web/app/desktop/api/choose-drive-folder.ts rename to src/server/web/app/desktop/api/choose-drive-folder.ts diff --git a/src/web/app/desktop/api/contextmenu.ts b/src/server/web/app/desktop/api/contextmenu.ts similarity index 100% rename from src/web/app/desktop/api/contextmenu.ts rename to src/server/web/app/desktop/api/contextmenu.ts diff --git a/src/web/app/desktop/api/dialog.ts b/src/server/web/app/desktop/api/dialog.ts similarity index 100% rename from src/web/app/desktop/api/dialog.ts rename to src/server/web/app/desktop/api/dialog.ts diff --git a/src/web/app/desktop/api/input.ts b/src/server/web/app/desktop/api/input.ts similarity index 100% rename from src/web/app/desktop/api/input.ts rename to src/server/web/app/desktop/api/input.ts diff --git a/src/web/app/desktop/api/notify.ts b/src/server/web/app/desktop/api/notify.ts similarity index 100% rename from src/web/app/desktop/api/notify.ts rename to src/server/web/app/desktop/api/notify.ts diff --git a/src/web/app/desktop/api/post.ts b/src/server/web/app/desktop/api/post.ts similarity index 100% rename from src/web/app/desktop/api/post.ts rename to src/server/web/app/desktop/api/post.ts diff --git a/src/web/app/desktop/api/update-avatar.ts b/src/server/web/app/desktop/api/update-avatar.ts similarity index 100% rename from src/web/app/desktop/api/update-avatar.ts rename to src/server/web/app/desktop/api/update-avatar.ts diff --git a/src/web/app/desktop/api/update-banner.ts b/src/server/web/app/desktop/api/update-banner.ts similarity index 100% rename from src/web/app/desktop/api/update-banner.ts rename to src/server/web/app/desktop/api/update-banner.ts diff --git a/src/web/app/desktop/assets/grid.svg b/src/server/web/app/desktop/assets/grid.svg similarity index 100% rename from src/web/app/desktop/assets/grid.svg rename to src/server/web/app/desktop/assets/grid.svg diff --git a/src/web/app/desktop/assets/header-logo-white.svg b/src/server/web/app/desktop/assets/header-logo-white.svg similarity index 100% rename from src/web/app/desktop/assets/header-logo-white.svg rename to src/server/web/app/desktop/assets/header-logo-white.svg diff --git a/src/web/app/desktop/assets/header-logo.svg b/src/server/web/app/desktop/assets/header-logo.svg similarity index 100% rename from src/web/app/desktop/assets/header-logo.svg rename to src/server/web/app/desktop/assets/header-logo.svg diff --git a/src/web/app/desktop/assets/index.jpg b/src/server/web/app/desktop/assets/index.jpg similarity index 100% rename from src/web/app/desktop/assets/index.jpg rename to src/server/web/app/desktop/assets/index.jpg diff --git a/src/web/app/desktop/assets/remove.png b/src/server/web/app/desktop/assets/remove.png similarity index 100% rename from src/web/app/desktop/assets/remove.png rename to src/server/web/app/desktop/assets/remove.png diff --git a/src/web/app/desktop/script.ts b/src/server/web/app/desktop/script.ts similarity index 100% rename from src/web/app/desktop/script.ts rename to src/server/web/app/desktop/script.ts diff --git a/src/web/app/desktop/style.styl b/src/server/web/app/desktop/style.styl similarity index 100% rename from src/web/app/desktop/style.styl rename to src/server/web/app/desktop/style.styl diff --git a/src/web/app/desktop/ui.styl b/src/server/web/app/desktop/ui.styl similarity index 100% rename from src/web/app/desktop/ui.styl rename to src/server/web/app/desktop/ui.styl diff --git a/src/web/app/desktop/views/components/activity.calendar.vue b/src/server/web/app/desktop/views/components/activity.calendar.vue similarity index 100% rename from src/web/app/desktop/views/components/activity.calendar.vue rename to src/server/web/app/desktop/views/components/activity.calendar.vue diff --git a/src/web/app/desktop/views/components/activity.chart.vue b/src/server/web/app/desktop/views/components/activity.chart.vue similarity index 100% rename from src/web/app/desktop/views/components/activity.chart.vue rename to src/server/web/app/desktop/views/components/activity.chart.vue diff --git a/src/web/app/desktop/views/components/activity.vue b/src/server/web/app/desktop/views/components/activity.vue similarity index 100% rename from src/web/app/desktop/views/components/activity.vue rename to src/server/web/app/desktop/views/components/activity.vue diff --git a/src/web/app/desktop/views/components/analog-clock.vue b/src/server/web/app/desktop/views/components/analog-clock.vue similarity index 100% rename from src/web/app/desktop/views/components/analog-clock.vue rename to src/server/web/app/desktop/views/components/analog-clock.vue diff --git a/src/web/app/desktop/views/components/calendar.vue b/src/server/web/app/desktop/views/components/calendar.vue similarity index 100% rename from src/web/app/desktop/views/components/calendar.vue rename to src/server/web/app/desktop/views/components/calendar.vue diff --git a/src/web/app/desktop/views/components/choose-file-from-drive-window.vue b/src/server/web/app/desktop/views/components/choose-file-from-drive-window.vue similarity index 100% rename from src/web/app/desktop/views/components/choose-file-from-drive-window.vue rename to src/server/web/app/desktop/views/components/choose-file-from-drive-window.vue diff --git a/src/web/app/desktop/views/components/choose-folder-from-drive-window.vue b/src/server/web/app/desktop/views/components/choose-folder-from-drive-window.vue similarity index 100% rename from src/web/app/desktop/views/components/choose-folder-from-drive-window.vue rename to src/server/web/app/desktop/views/components/choose-folder-from-drive-window.vue diff --git a/src/web/app/desktop/views/components/context-menu.menu.vue b/src/server/web/app/desktop/views/components/context-menu.menu.vue similarity index 100% rename from src/web/app/desktop/views/components/context-menu.menu.vue rename to src/server/web/app/desktop/views/components/context-menu.menu.vue diff --git a/src/web/app/desktop/views/components/context-menu.vue b/src/server/web/app/desktop/views/components/context-menu.vue similarity index 100% rename from src/web/app/desktop/views/components/context-menu.vue rename to src/server/web/app/desktop/views/components/context-menu.vue diff --git a/src/web/app/desktop/views/components/crop-window.vue b/src/server/web/app/desktop/views/components/crop-window.vue similarity index 100% rename from src/web/app/desktop/views/components/crop-window.vue rename to src/server/web/app/desktop/views/components/crop-window.vue diff --git a/src/web/app/desktop/views/components/dialog.vue b/src/server/web/app/desktop/views/components/dialog.vue similarity index 100% rename from src/web/app/desktop/views/components/dialog.vue rename to src/server/web/app/desktop/views/components/dialog.vue diff --git a/src/web/app/desktop/views/components/drive-window.vue b/src/server/web/app/desktop/views/components/drive-window.vue similarity index 100% rename from src/web/app/desktop/views/components/drive-window.vue rename to src/server/web/app/desktop/views/components/drive-window.vue diff --git a/src/web/app/desktop/views/components/drive.file.vue b/src/server/web/app/desktop/views/components/drive.file.vue similarity index 100% rename from src/web/app/desktop/views/components/drive.file.vue rename to src/server/web/app/desktop/views/components/drive.file.vue diff --git a/src/web/app/desktop/views/components/drive.folder.vue b/src/server/web/app/desktop/views/components/drive.folder.vue similarity index 100% rename from src/web/app/desktop/views/components/drive.folder.vue rename to src/server/web/app/desktop/views/components/drive.folder.vue diff --git a/src/web/app/desktop/views/components/drive.nav-folder.vue b/src/server/web/app/desktop/views/components/drive.nav-folder.vue similarity index 100% rename from src/web/app/desktop/views/components/drive.nav-folder.vue rename to src/server/web/app/desktop/views/components/drive.nav-folder.vue diff --git a/src/web/app/desktop/views/components/drive.vue b/src/server/web/app/desktop/views/components/drive.vue similarity index 100% rename from src/web/app/desktop/views/components/drive.vue rename to src/server/web/app/desktop/views/components/drive.vue diff --git a/src/web/app/desktop/views/components/ellipsis-icon.vue b/src/server/web/app/desktop/views/components/ellipsis-icon.vue similarity index 100% rename from src/web/app/desktop/views/components/ellipsis-icon.vue rename to src/server/web/app/desktop/views/components/ellipsis-icon.vue diff --git a/src/web/app/desktop/views/components/follow-button.vue b/src/server/web/app/desktop/views/components/follow-button.vue similarity index 100% rename from src/web/app/desktop/views/components/follow-button.vue rename to src/server/web/app/desktop/views/components/follow-button.vue diff --git a/src/web/app/desktop/views/components/followers-window.vue b/src/server/web/app/desktop/views/components/followers-window.vue similarity index 100% rename from src/web/app/desktop/views/components/followers-window.vue rename to src/server/web/app/desktop/views/components/followers-window.vue diff --git a/src/web/app/desktop/views/components/followers.vue b/src/server/web/app/desktop/views/components/followers.vue similarity index 100% rename from src/web/app/desktop/views/components/followers.vue rename to src/server/web/app/desktop/views/components/followers.vue diff --git a/src/web/app/desktop/views/components/following-window.vue b/src/server/web/app/desktop/views/components/following-window.vue similarity index 100% rename from src/web/app/desktop/views/components/following-window.vue rename to src/server/web/app/desktop/views/components/following-window.vue diff --git a/src/web/app/desktop/views/components/following.vue b/src/server/web/app/desktop/views/components/following.vue similarity index 100% rename from src/web/app/desktop/views/components/following.vue rename to src/server/web/app/desktop/views/components/following.vue diff --git a/src/web/app/desktop/views/components/friends-maker.vue b/src/server/web/app/desktop/views/components/friends-maker.vue similarity index 100% rename from src/web/app/desktop/views/components/friends-maker.vue rename to src/server/web/app/desktop/views/components/friends-maker.vue diff --git a/src/web/app/desktop/views/components/game-window.vue b/src/server/web/app/desktop/views/components/game-window.vue similarity index 100% rename from src/web/app/desktop/views/components/game-window.vue rename to src/server/web/app/desktop/views/components/game-window.vue diff --git a/src/web/app/desktop/views/components/home.vue b/src/server/web/app/desktop/views/components/home.vue similarity index 100% rename from src/web/app/desktop/views/components/home.vue rename to src/server/web/app/desktop/views/components/home.vue diff --git a/src/web/app/desktop/views/components/index.ts b/src/server/web/app/desktop/views/components/index.ts similarity index 100% rename from src/web/app/desktop/views/components/index.ts rename to src/server/web/app/desktop/views/components/index.ts diff --git a/src/web/app/desktop/views/components/input-dialog.vue b/src/server/web/app/desktop/views/components/input-dialog.vue similarity index 100% rename from src/web/app/desktop/views/components/input-dialog.vue rename to src/server/web/app/desktop/views/components/input-dialog.vue diff --git a/src/web/app/desktop/views/components/media-image-dialog.vue b/src/server/web/app/desktop/views/components/media-image-dialog.vue similarity index 100% rename from src/web/app/desktop/views/components/media-image-dialog.vue rename to src/server/web/app/desktop/views/components/media-image-dialog.vue diff --git a/src/web/app/desktop/views/components/media-image.vue b/src/server/web/app/desktop/views/components/media-image.vue similarity index 100% rename from src/web/app/desktop/views/components/media-image.vue rename to src/server/web/app/desktop/views/components/media-image.vue diff --git a/src/web/app/desktop/views/components/media-video-dialog.vue b/src/server/web/app/desktop/views/components/media-video-dialog.vue similarity index 100% rename from src/web/app/desktop/views/components/media-video-dialog.vue rename to src/server/web/app/desktop/views/components/media-video-dialog.vue diff --git a/src/web/app/desktop/views/components/media-video.vue b/src/server/web/app/desktop/views/components/media-video.vue similarity index 100% rename from src/web/app/desktop/views/components/media-video.vue rename to src/server/web/app/desktop/views/components/media-video.vue diff --git a/src/web/app/desktop/views/components/mentions.vue b/src/server/web/app/desktop/views/components/mentions.vue similarity index 100% rename from src/web/app/desktop/views/components/mentions.vue rename to src/server/web/app/desktop/views/components/mentions.vue diff --git a/src/web/app/desktop/views/components/messaging-room-window.vue b/src/server/web/app/desktop/views/components/messaging-room-window.vue similarity index 100% rename from src/web/app/desktop/views/components/messaging-room-window.vue rename to src/server/web/app/desktop/views/components/messaging-room-window.vue diff --git a/src/web/app/desktop/views/components/messaging-window.vue b/src/server/web/app/desktop/views/components/messaging-window.vue similarity index 100% rename from src/web/app/desktop/views/components/messaging-window.vue rename to src/server/web/app/desktop/views/components/messaging-window.vue diff --git a/src/web/app/desktop/views/components/notifications.vue b/src/server/web/app/desktop/views/components/notifications.vue similarity index 100% rename from src/web/app/desktop/views/components/notifications.vue rename to src/server/web/app/desktop/views/components/notifications.vue diff --git a/src/web/app/desktop/views/components/post-detail.sub.vue b/src/server/web/app/desktop/views/components/post-detail.sub.vue similarity index 100% rename from src/web/app/desktop/views/components/post-detail.sub.vue rename to src/server/web/app/desktop/views/components/post-detail.sub.vue diff --git a/src/web/app/desktop/views/components/post-detail.vue b/src/server/web/app/desktop/views/components/post-detail.vue similarity index 100% rename from src/web/app/desktop/views/components/post-detail.vue rename to src/server/web/app/desktop/views/components/post-detail.vue diff --git a/src/web/app/desktop/views/components/post-form-window.vue b/src/server/web/app/desktop/views/components/post-form-window.vue similarity index 100% rename from src/web/app/desktop/views/components/post-form-window.vue rename to src/server/web/app/desktop/views/components/post-form-window.vue diff --git a/src/web/app/desktop/views/components/post-form.vue b/src/server/web/app/desktop/views/components/post-form.vue similarity index 100% rename from src/web/app/desktop/views/components/post-form.vue rename to src/server/web/app/desktop/views/components/post-form.vue diff --git a/src/web/app/desktop/views/components/post-preview.vue b/src/server/web/app/desktop/views/components/post-preview.vue similarity index 100% rename from src/web/app/desktop/views/components/post-preview.vue rename to src/server/web/app/desktop/views/components/post-preview.vue diff --git a/src/web/app/desktop/views/components/posts.post.sub.vue b/src/server/web/app/desktop/views/components/posts.post.sub.vue similarity index 100% rename from src/web/app/desktop/views/components/posts.post.sub.vue rename to src/server/web/app/desktop/views/components/posts.post.sub.vue diff --git a/src/web/app/desktop/views/components/posts.post.vue b/src/server/web/app/desktop/views/components/posts.post.vue similarity index 100% rename from src/web/app/desktop/views/components/posts.post.vue rename to src/server/web/app/desktop/views/components/posts.post.vue diff --git a/src/web/app/desktop/views/components/posts.vue b/src/server/web/app/desktop/views/components/posts.vue similarity index 100% rename from src/web/app/desktop/views/components/posts.vue rename to src/server/web/app/desktop/views/components/posts.vue diff --git a/src/web/app/desktop/views/components/progress-dialog.vue b/src/server/web/app/desktop/views/components/progress-dialog.vue similarity index 100% rename from src/web/app/desktop/views/components/progress-dialog.vue rename to src/server/web/app/desktop/views/components/progress-dialog.vue diff --git a/src/web/app/desktop/views/components/repost-form-window.vue b/src/server/web/app/desktop/views/components/repost-form-window.vue similarity index 100% rename from src/web/app/desktop/views/components/repost-form-window.vue rename to src/server/web/app/desktop/views/components/repost-form-window.vue diff --git a/src/web/app/desktop/views/components/repost-form.vue b/src/server/web/app/desktop/views/components/repost-form.vue similarity index 100% rename from src/web/app/desktop/views/components/repost-form.vue rename to src/server/web/app/desktop/views/components/repost-form.vue diff --git a/src/web/app/desktop/views/components/settings-window.vue b/src/server/web/app/desktop/views/components/settings-window.vue similarity index 100% rename from src/web/app/desktop/views/components/settings-window.vue rename to src/server/web/app/desktop/views/components/settings-window.vue diff --git a/src/web/app/desktop/views/components/settings.2fa.vue b/src/server/web/app/desktop/views/components/settings.2fa.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.2fa.vue rename to src/server/web/app/desktop/views/components/settings.2fa.vue diff --git a/src/web/app/desktop/views/components/settings.api.vue b/src/server/web/app/desktop/views/components/settings.api.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.api.vue rename to src/server/web/app/desktop/views/components/settings.api.vue diff --git a/src/web/app/desktop/views/components/settings.apps.vue b/src/server/web/app/desktop/views/components/settings.apps.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.apps.vue rename to src/server/web/app/desktop/views/components/settings.apps.vue diff --git a/src/web/app/desktop/views/components/settings.drive.vue b/src/server/web/app/desktop/views/components/settings.drive.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.drive.vue rename to src/server/web/app/desktop/views/components/settings.drive.vue diff --git a/src/web/app/desktop/views/components/settings.mute.vue b/src/server/web/app/desktop/views/components/settings.mute.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.mute.vue rename to src/server/web/app/desktop/views/components/settings.mute.vue diff --git a/src/web/app/desktop/views/components/settings.password.vue b/src/server/web/app/desktop/views/components/settings.password.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.password.vue rename to src/server/web/app/desktop/views/components/settings.password.vue diff --git a/src/web/app/desktop/views/components/settings.profile.vue b/src/server/web/app/desktop/views/components/settings.profile.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.profile.vue rename to src/server/web/app/desktop/views/components/settings.profile.vue diff --git a/src/web/app/desktop/views/components/settings.signins.vue b/src/server/web/app/desktop/views/components/settings.signins.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.signins.vue rename to src/server/web/app/desktop/views/components/settings.signins.vue diff --git a/src/web/app/desktop/views/components/settings.vue b/src/server/web/app/desktop/views/components/settings.vue similarity index 100% rename from src/web/app/desktop/views/components/settings.vue rename to src/server/web/app/desktop/views/components/settings.vue diff --git a/src/web/app/desktop/views/components/sub-post-content.vue b/src/server/web/app/desktop/views/components/sub-post-content.vue similarity index 100% rename from src/web/app/desktop/views/components/sub-post-content.vue rename to src/server/web/app/desktop/views/components/sub-post-content.vue diff --git a/src/web/app/desktop/views/components/taskmanager.vue b/src/server/web/app/desktop/views/components/taskmanager.vue similarity index 100% rename from src/web/app/desktop/views/components/taskmanager.vue rename to src/server/web/app/desktop/views/components/taskmanager.vue diff --git a/src/web/app/desktop/views/components/timeline.vue b/src/server/web/app/desktop/views/components/timeline.vue similarity index 100% rename from src/web/app/desktop/views/components/timeline.vue rename to src/server/web/app/desktop/views/components/timeline.vue diff --git a/src/web/app/desktop/views/components/ui-notification.vue b/src/server/web/app/desktop/views/components/ui-notification.vue similarity index 100% rename from src/web/app/desktop/views/components/ui-notification.vue rename to src/server/web/app/desktop/views/components/ui-notification.vue diff --git a/src/web/app/desktop/views/components/ui.header.account.vue b/src/server/web/app/desktop/views/components/ui.header.account.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.header.account.vue rename to src/server/web/app/desktop/views/components/ui.header.account.vue diff --git a/src/web/app/desktop/views/components/ui.header.clock.vue b/src/server/web/app/desktop/views/components/ui.header.clock.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.header.clock.vue rename to src/server/web/app/desktop/views/components/ui.header.clock.vue diff --git a/src/web/app/desktop/views/components/ui.header.nav.vue b/src/server/web/app/desktop/views/components/ui.header.nav.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.header.nav.vue rename to src/server/web/app/desktop/views/components/ui.header.nav.vue diff --git a/src/web/app/desktop/views/components/ui.header.notifications.vue b/src/server/web/app/desktop/views/components/ui.header.notifications.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.header.notifications.vue rename to src/server/web/app/desktop/views/components/ui.header.notifications.vue diff --git a/src/web/app/desktop/views/components/ui.header.post.vue b/src/server/web/app/desktop/views/components/ui.header.post.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.header.post.vue rename to src/server/web/app/desktop/views/components/ui.header.post.vue diff --git a/src/web/app/desktop/views/components/ui.header.search.vue b/src/server/web/app/desktop/views/components/ui.header.search.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.header.search.vue rename to src/server/web/app/desktop/views/components/ui.header.search.vue diff --git a/src/web/app/desktop/views/components/ui.header.vue b/src/server/web/app/desktop/views/components/ui.header.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.header.vue rename to src/server/web/app/desktop/views/components/ui.header.vue diff --git a/src/web/app/desktop/views/components/ui.vue b/src/server/web/app/desktop/views/components/ui.vue similarity index 100% rename from src/web/app/desktop/views/components/ui.vue rename to src/server/web/app/desktop/views/components/ui.vue diff --git a/src/web/app/desktop/views/components/user-preview.vue b/src/server/web/app/desktop/views/components/user-preview.vue similarity index 100% rename from src/web/app/desktop/views/components/user-preview.vue rename to src/server/web/app/desktop/views/components/user-preview.vue diff --git a/src/web/app/desktop/views/components/users-list.item.vue b/src/server/web/app/desktop/views/components/users-list.item.vue similarity index 100% rename from src/web/app/desktop/views/components/users-list.item.vue rename to src/server/web/app/desktop/views/components/users-list.item.vue diff --git a/src/web/app/desktop/views/components/users-list.vue b/src/server/web/app/desktop/views/components/users-list.vue similarity index 100% rename from src/web/app/desktop/views/components/users-list.vue rename to src/server/web/app/desktop/views/components/users-list.vue diff --git a/src/web/app/desktop/views/components/widget-container.vue b/src/server/web/app/desktop/views/components/widget-container.vue similarity index 100% rename from src/web/app/desktop/views/components/widget-container.vue rename to src/server/web/app/desktop/views/components/widget-container.vue diff --git a/src/web/app/desktop/views/components/window.vue b/src/server/web/app/desktop/views/components/window.vue similarity index 100% rename from src/web/app/desktop/views/components/window.vue rename to src/server/web/app/desktop/views/components/window.vue diff --git a/src/web/app/desktop/views/directives/index.ts b/src/server/web/app/desktop/views/directives/index.ts similarity index 100% rename from src/web/app/desktop/views/directives/index.ts rename to src/server/web/app/desktop/views/directives/index.ts diff --git a/src/web/app/desktop/views/directives/user-preview.ts b/src/server/web/app/desktop/views/directives/user-preview.ts similarity index 100% rename from src/web/app/desktop/views/directives/user-preview.ts rename to src/server/web/app/desktop/views/directives/user-preview.ts diff --git a/src/web/app/desktop/views/pages/drive.vue b/src/server/web/app/desktop/views/pages/drive.vue similarity index 100% rename from src/web/app/desktop/views/pages/drive.vue rename to src/server/web/app/desktop/views/pages/drive.vue diff --git a/src/web/app/desktop/views/pages/home-customize.vue b/src/server/web/app/desktop/views/pages/home-customize.vue similarity index 100% rename from src/web/app/desktop/views/pages/home-customize.vue rename to src/server/web/app/desktop/views/pages/home-customize.vue diff --git a/src/web/app/desktop/views/pages/home.vue b/src/server/web/app/desktop/views/pages/home.vue similarity index 100% rename from src/web/app/desktop/views/pages/home.vue rename to src/server/web/app/desktop/views/pages/home.vue diff --git a/src/web/app/desktop/views/pages/index.vue b/src/server/web/app/desktop/views/pages/index.vue similarity index 100% rename from src/web/app/desktop/views/pages/index.vue rename to src/server/web/app/desktop/views/pages/index.vue diff --git a/src/web/app/desktop/views/pages/messaging-room.vue b/src/server/web/app/desktop/views/pages/messaging-room.vue similarity index 100% rename from src/web/app/desktop/views/pages/messaging-room.vue rename to src/server/web/app/desktop/views/pages/messaging-room.vue diff --git a/src/web/app/desktop/views/pages/othello.vue b/src/server/web/app/desktop/views/pages/othello.vue similarity index 100% rename from src/web/app/desktop/views/pages/othello.vue rename to src/server/web/app/desktop/views/pages/othello.vue diff --git a/src/web/app/desktop/views/pages/post.vue b/src/server/web/app/desktop/views/pages/post.vue similarity index 100% rename from src/web/app/desktop/views/pages/post.vue rename to src/server/web/app/desktop/views/pages/post.vue diff --git a/src/web/app/desktop/views/pages/search.vue b/src/server/web/app/desktop/views/pages/search.vue similarity index 100% rename from src/web/app/desktop/views/pages/search.vue rename to src/server/web/app/desktop/views/pages/search.vue diff --git a/src/web/app/desktop/views/pages/selectdrive.vue b/src/server/web/app/desktop/views/pages/selectdrive.vue similarity index 100% rename from src/web/app/desktop/views/pages/selectdrive.vue rename to src/server/web/app/desktop/views/pages/selectdrive.vue diff --git a/src/web/app/desktop/views/pages/user/user.followers-you-know.vue b/src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.followers-you-know.vue rename to src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue diff --git a/src/web/app/desktop/views/pages/user/user.friends.vue b/src/server/web/app/desktop/views/pages/user/user.friends.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.friends.vue rename to src/server/web/app/desktop/views/pages/user/user.friends.vue diff --git a/src/web/app/desktop/views/pages/user/user.header.vue b/src/server/web/app/desktop/views/pages/user/user.header.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.header.vue rename to src/server/web/app/desktop/views/pages/user/user.header.vue diff --git a/src/web/app/desktop/views/pages/user/user.home.vue b/src/server/web/app/desktop/views/pages/user/user.home.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.home.vue rename to src/server/web/app/desktop/views/pages/user/user.home.vue diff --git a/src/web/app/desktop/views/pages/user/user.photos.vue b/src/server/web/app/desktop/views/pages/user/user.photos.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.photos.vue rename to src/server/web/app/desktop/views/pages/user/user.photos.vue diff --git a/src/web/app/desktop/views/pages/user/user.profile.vue b/src/server/web/app/desktop/views/pages/user/user.profile.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.profile.vue rename to src/server/web/app/desktop/views/pages/user/user.profile.vue diff --git a/src/web/app/desktop/views/pages/user/user.timeline.vue b/src/server/web/app/desktop/views/pages/user/user.timeline.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.timeline.vue rename to src/server/web/app/desktop/views/pages/user/user.timeline.vue diff --git a/src/web/app/desktop/views/pages/user/user.vue b/src/server/web/app/desktop/views/pages/user/user.vue similarity index 100% rename from src/web/app/desktop/views/pages/user/user.vue rename to src/server/web/app/desktop/views/pages/user/user.vue diff --git a/src/web/app/desktop/views/pages/welcome.vue b/src/server/web/app/desktop/views/pages/welcome.vue similarity index 100% rename from src/web/app/desktop/views/pages/welcome.vue rename to src/server/web/app/desktop/views/pages/welcome.vue diff --git a/src/web/app/desktop/views/widgets/activity.vue b/src/server/web/app/desktop/views/widgets/activity.vue similarity index 100% rename from src/web/app/desktop/views/widgets/activity.vue rename to src/server/web/app/desktop/views/widgets/activity.vue diff --git a/src/web/app/desktop/views/widgets/channel.channel.form.vue b/src/server/web/app/desktop/views/widgets/channel.channel.form.vue similarity index 100% rename from src/web/app/desktop/views/widgets/channel.channel.form.vue rename to src/server/web/app/desktop/views/widgets/channel.channel.form.vue diff --git a/src/web/app/desktop/views/widgets/channel.channel.post.vue b/src/server/web/app/desktop/views/widgets/channel.channel.post.vue similarity index 100% rename from src/web/app/desktop/views/widgets/channel.channel.post.vue rename to src/server/web/app/desktop/views/widgets/channel.channel.post.vue diff --git a/src/web/app/desktop/views/widgets/channel.channel.vue b/src/server/web/app/desktop/views/widgets/channel.channel.vue similarity index 100% rename from src/web/app/desktop/views/widgets/channel.channel.vue rename to src/server/web/app/desktop/views/widgets/channel.channel.vue diff --git a/src/web/app/desktop/views/widgets/channel.vue b/src/server/web/app/desktop/views/widgets/channel.vue similarity index 100% rename from src/web/app/desktop/views/widgets/channel.vue rename to src/server/web/app/desktop/views/widgets/channel.vue diff --git a/src/web/app/desktop/views/widgets/index.ts b/src/server/web/app/desktop/views/widgets/index.ts similarity index 100% rename from src/web/app/desktop/views/widgets/index.ts rename to src/server/web/app/desktop/views/widgets/index.ts diff --git a/src/web/app/desktop/views/widgets/messaging.vue b/src/server/web/app/desktop/views/widgets/messaging.vue similarity index 100% rename from src/web/app/desktop/views/widgets/messaging.vue rename to src/server/web/app/desktop/views/widgets/messaging.vue diff --git a/src/web/app/desktop/views/widgets/notifications.vue b/src/server/web/app/desktop/views/widgets/notifications.vue similarity index 100% rename from src/web/app/desktop/views/widgets/notifications.vue rename to src/server/web/app/desktop/views/widgets/notifications.vue diff --git a/src/web/app/desktop/views/widgets/polls.vue b/src/server/web/app/desktop/views/widgets/polls.vue similarity index 100% rename from src/web/app/desktop/views/widgets/polls.vue rename to src/server/web/app/desktop/views/widgets/polls.vue diff --git a/src/web/app/desktop/views/widgets/post-form.vue b/src/server/web/app/desktop/views/widgets/post-form.vue similarity index 100% rename from src/web/app/desktop/views/widgets/post-form.vue rename to src/server/web/app/desktop/views/widgets/post-form.vue diff --git a/src/web/app/desktop/views/widgets/profile.vue b/src/server/web/app/desktop/views/widgets/profile.vue similarity index 100% rename from src/web/app/desktop/views/widgets/profile.vue rename to src/server/web/app/desktop/views/widgets/profile.vue diff --git a/src/web/app/desktop/views/widgets/timemachine.vue b/src/server/web/app/desktop/views/widgets/timemachine.vue similarity index 100% rename from src/web/app/desktop/views/widgets/timemachine.vue rename to src/server/web/app/desktop/views/widgets/timemachine.vue diff --git a/src/web/app/desktop/views/widgets/trends.vue b/src/server/web/app/desktop/views/widgets/trends.vue similarity index 100% rename from src/web/app/desktop/views/widgets/trends.vue rename to src/server/web/app/desktop/views/widgets/trends.vue diff --git a/src/web/app/desktop/views/widgets/users.vue b/src/server/web/app/desktop/views/widgets/users.vue similarity index 100% rename from src/web/app/desktop/views/widgets/users.vue rename to src/server/web/app/desktop/views/widgets/users.vue diff --git a/src/web/app/dev/script.ts b/src/server/web/app/dev/script.ts similarity index 100% rename from src/web/app/dev/script.ts rename to src/server/web/app/dev/script.ts diff --git a/src/web/app/dev/style.styl b/src/server/web/app/dev/style.styl similarity index 100% rename from src/web/app/dev/style.styl rename to src/server/web/app/dev/style.styl diff --git a/src/web/app/dev/views/app.vue b/src/server/web/app/dev/views/app.vue similarity index 100% rename from src/web/app/dev/views/app.vue rename to src/server/web/app/dev/views/app.vue diff --git a/src/web/app/dev/views/apps.vue b/src/server/web/app/dev/views/apps.vue similarity index 100% rename from src/web/app/dev/views/apps.vue rename to src/server/web/app/dev/views/apps.vue diff --git a/src/web/app/dev/views/index.vue b/src/server/web/app/dev/views/index.vue similarity index 100% rename from src/web/app/dev/views/index.vue rename to src/server/web/app/dev/views/index.vue diff --git a/src/web/app/dev/views/new-app.vue b/src/server/web/app/dev/views/new-app.vue similarity index 100% rename from src/web/app/dev/views/new-app.vue rename to src/server/web/app/dev/views/new-app.vue diff --git a/src/web/app/dev/views/ui.vue b/src/server/web/app/dev/views/ui.vue similarity index 100% rename from src/web/app/dev/views/ui.vue rename to src/server/web/app/dev/views/ui.vue diff --git a/src/web/app/init.css b/src/server/web/app/init.css similarity index 100% rename from src/web/app/init.css rename to src/server/web/app/init.css diff --git a/src/web/app/init.ts b/src/server/web/app/init.ts similarity index 100% rename from src/web/app/init.ts rename to src/server/web/app/init.ts diff --git a/src/web/app/mobile/api/choose-drive-file.ts b/src/server/web/app/mobile/api/choose-drive-file.ts similarity index 100% rename from src/web/app/mobile/api/choose-drive-file.ts rename to src/server/web/app/mobile/api/choose-drive-file.ts diff --git a/src/web/app/mobile/api/choose-drive-folder.ts b/src/server/web/app/mobile/api/choose-drive-folder.ts similarity index 100% rename from src/web/app/mobile/api/choose-drive-folder.ts rename to src/server/web/app/mobile/api/choose-drive-folder.ts diff --git a/src/web/app/mobile/api/dialog.ts b/src/server/web/app/mobile/api/dialog.ts similarity index 100% rename from src/web/app/mobile/api/dialog.ts rename to src/server/web/app/mobile/api/dialog.ts diff --git a/src/web/app/mobile/api/input.ts b/src/server/web/app/mobile/api/input.ts similarity index 100% rename from src/web/app/mobile/api/input.ts rename to src/server/web/app/mobile/api/input.ts diff --git a/src/web/app/mobile/api/notify.ts b/src/server/web/app/mobile/api/notify.ts similarity index 100% rename from src/web/app/mobile/api/notify.ts rename to src/server/web/app/mobile/api/notify.ts diff --git a/src/web/app/mobile/api/post.ts b/src/server/web/app/mobile/api/post.ts similarity index 100% rename from src/web/app/mobile/api/post.ts rename to src/server/web/app/mobile/api/post.ts diff --git a/src/web/app/mobile/script.ts b/src/server/web/app/mobile/script.ts similarity index 100% rename from src/web/app/mobile/script.ts rename to src/server/web/app/mobile/script.ts diff --git a/src/web/app/mobile/style.styl b/src/server/web/app/mobile/style.styl similarity index 100% rename from src/web/app/mobile/style.styl rename to src/server/web/app/mobile/style.styl diff --git a/src/web/app/mobile/views/components/activity.vue b/src/server/web/app/mobile/views/components/activity.vue similarity index 100% rename from src/web/app/mobile/views/components/activity.vue rename to src/server/web/app/mobile/views/components/activity.vue diff --git a/src/web/app/mobile/views/components/drive-file-chooser.vue b/src/server/web/app/mobile/views/components/drive-file-chooser.vue similarity index 100% rename from src/web/app/mobile/views/components/drive-file-chooser.vue rename to src/server/web/app/mobile/views/components/drive-file-chooser.vue diff --git a/src/web/app/mobile/views/components/drive-folder-chooser.vue b/src/server/web/app/mobile/views/components/drive-folder-chooser.vue similarity index 100% rename from src/web/app/mobile/views/components/drive-folder-chooser.vue rename to src/server/web/app/mobile/views/components/drive-folder-chooser.vue diff --git a/src/web/app/mobile/views/components/drive.file-detail.vue b/src/server/web/app/mobile/views/components/drive.file-detail.vue similarity index 100% rename from src/web/app/mobile/views/components/drive.file-detail.vue rename to src/server/web/app/mobile/views/components/drive.file-detail.vue diff --git a/src/web/app/mobile/views/components/drive.file.vue b/src/server/web/app/mobile/views/components/drive.file.vue similarity index 100% rename from src/web/app/mobile/views/components/drive.file.vue rename to src/server/web/app/mobile/views/components/drive.file.vue diff --git a/src/web/app/mobile/views/components/drive.folder.vue b/src/server/web/app/mobile/views/components/drive.folder.vue similarity index 100% rename from src/web/app/mobile/views/components/drive.folder.vue rename to src/server/web/app/mobile/views/components/drive.folder.vue diff --git a/src/web/app/mobile/views/components/drive.vue b/src/server/web/app/mobile/views/components/drive.vue similarity index 100% rename from src/web/app/mobile/views/components/drive.vue rename to src/server/web/app/mobile/views/components/drive.vue diff --git a/src/web/app/mobile/views/components/follow-button.vue b/src/server/web/app/mobile/views/components/follow-button.vue similarity index 100% rename from src/web/app/mobile/views/components/follow-button.vue rename to src/server/web/app/mobile/views/components/follow-button.vue diff --git a/src/web/app/mobile/views/components/friends-maker.vue b/src/server/web/app/mobile/views/components/friends-maker.vue similarity index 100% rename from src/web/app/mobile/views/components/friends-maker.vue rename to src/server/web/app/mobile/views/components/friends-maker.vue diff --git a/src/web/app/mobile/views/components/index.ts b/src/server/web/app/mobile/views/components/index.ts similarity index 100% rename from src/web/app/mobile/views/components/index.ts rename to src/server/web/app/mobile/views/components/index.ts diff --git a/src/web/app/mobile/views/components/media-image.vue b/src/server/web/app/mobile/views/components/media-image.vue similarity index 100% rename from src/web/app/mobile/views/components/media-image.vue rename to src/server/web/app/mobile/views/components/media-image.vue diff --git a/src/web/app/mobile/views/components/media-video.vue b/src/server/web/app/mobile/views/components/media-video.vue similarity index 100% rename from src/web/app/mobile/views/components/media-video.vue rename to src/server/web/app/mobile/views/components/media-video.vue diff --git a/src/web/app/mobile/views/components/notification-preview.vue b/src/server/web/app/mobile/views/components/notification-preview.vue similarity index 100% rename from src/web/app/mobile/views/components/notification-preview.vue rename to src/server/web/app/mobile/views/components/notification-preview.vue diff --git a/src/web/app/mobile/views/components/notification.vue b/src/server/web/app/mobile/views/components/notification.vue similarity index 100% rename from src/web/app/mobile/views/components/notification.vue rename to src/server/web/app/mobile/views/components/notification.vue diff --git a/src/web/app/mobile/views/components/notifications.vue b/src/server/web/app/mobile/views/components/notifications.vue similarity index 100% rename from src/web/app/mobile/views/components/notifications.vue rename to src/server/web/app/mobile/views/components/notifications.vue diff --git a/src/web/app/mobile/views/components/notify.vue b/src/server/web/app/mobile/views/components/notify.vue similarity index 100% rename from src/web/app/mobile/views/components/notify.vue rename to src/server/web/app/mobile/views/components/notify.vue diff --git a/src/web/app/mobile/views/components/post-card.vue b/src/server/web/app/mobile/views/components/post-card.vue similarity index 100% rename from src/web/app/mobile/views/components/post-card.vue rename to src/server/web/app/mobile/views/components/post-card.vue diff --git a/src/web/app/mobile/views/components/post-detail.sub.vue b/src/server/web/app/mobile/views/components/post-detail.sub.vue similarity index 100% rename from src/web/app/mobile/views/components/post-detail.sub.vue rename to src/server/web/app/mobile/views/components/post-detail.sub.vue diff --git a/src/web/app/mobile/views/components/post-detail.vue b/src/server/web/app/mobile/views/components/post-detail.vue similarity index 100% rename from src/web/app/mobile/views/components/post-detail.vue rename to src/server/web/app/mobile/views/components/post-detail.vue diff --git a/src/web/app/mobile/views/components/post-form.vue b/src/server/web/app/mobile/views/components/post-form.vue similarity index 100% rename from src/web/app/mobile/views/components/post-form.vue rename to src/server/web/app/mobile/views/components/post-form.vue diff --git a/src/web/app/mobile/views/components/post-preview.vue b/src/server/web/app/mobile/views/components/post-preview.vue similarity index 100% rename from src/web/app/mobile/views/components/post-preview.vue rename to src/server/web/app/mobile/views/components/post-preview.vue diff --git a/src/web/app/mobile/views/components/post.sub.vue b/src/server/web/app/mobile/views/components/post.sub.vue similarity index 100% rename from src/web/app/mobile/views/components/post.sub.vue rename to src/server/web/app/mobile/views/components/post.sub.vue diff --git a/src/web/app/mobile/views/components/post.vue b/src/server/web/app/mobile/views/components/post.vue similarity index 100% rename from src/web/app/mobile/views/components/post.vue rename to src/server/web/app/mobile/views/components/post.vue diff --git a/src/web/app/mobile/views/components/posts.vue b/src/server/web/app/mobile/views/components/posts.vue similarity index 100% rename from src/web/app/mobile/views/components/posts.vue rename to src/server/web/app/mobile/views/components/posts.vue diff --git a/src/web/app/mobile/views/components/sub-post-content.vue b/src/server/web/app/mobile/views/components/sub-post-content.vue similarity index 100% rename from src/web/app/mobile/views/components/sub-post-content.vue rename to src/server/web/app/mobile/views/components/sub-post-content.vue diff --git a/src/web/app/mobile/views/components/timeline.vue b/src/server/web/app/mobile/views/components/timeline.vue similarity index 100% rename from src/web/app/mobile/views/components/timeline.vue rename to src/server/web/app/mobile/views/components/timeline.vue diff --git a/src/web/app/mobile/views/components/ui.header.vue b/src/server/web/app/mobile/views/components/ui.header.vue similarity index 100% rename from src/web/app/mobile/views/components/ui.header.vue rename to src/server/web/app/mobile/views/components/ui.header.vue diff --git a/src/web/app/mobile/views/components/ui.nav.vue b/src/server/web/app/mobile/views/components/ui.nav.vue similarity index 100% rename from src/web/app/mobile/views/components/ui.nav.vue rename to src/server/web/app/mobile/views/components/ui.nav.vue diff --git a/src/web/app/mobile/views/components/ui.vue b/src/server/web/app/mobile/views/components/ui.vue similarity index 100% rename from src/web/app/mobile/views/components/ui.vue rename to src/server/web/app/mobile/views/components/ui.vue diff --git a/src/web/app/mobile/views/components/user-card.vue b/src/server/web/app/mobile/views/components/user-card.vue similarity index 100% rename from src/web/app/mobile/views/components/user-card.vue rename to src/server/web/app/mobile/views/components/user-card.vue diff --git a/src/web/app/mobile/views/components/user-preview.vue b/src/server/web/app/mobile/views/components/user-preview.vue similarity index 100% rename from src/web/app/mobile/views/components/user-preview.vue rename to src/server/web/app/mobile/views/components/user-preview.vue diff --git a/src/web/app/mobile/views/components/user-timeline.vue b/src/server/web/app/mobile/views/components/user-timeline.vue similarity index 100% rename from src/web/app/mobile/views/components/user-timeline.vue rename to src/server/web/app/mobile/views/components/user-timeline.vue diff --git a/src/web/app/mobile/views/components/users-list.vue b/src/server/web/app/mobile/views/components/users-list.vue similarity index 100% rename from src/web/app/mobile/views/components/users-list.vue rename to src/server/web/app/mobile/views/components/users-list.vue diff --git a/src/web/app/mobile/views/components/widget-container.vue b/src/server/web/app/mobile/views/components/widget-container.vue similarity index 100% rename from src/web/app/mobile/views/components/widget-container.vue rename to src/server/web/app/mobile/views/components/widget-container.vue diff --git a/src/web/app/mobile/views/directives/index.ts b/src/server/web/app/mobile/views/directives/index.ts similarity index 100% rename from src/web/app/mobile/views/directives/index.ts rename to src/server/web/app/mobile/views/directives/index.ts diff --git a/src/web/app/mobile/views/directives/user-preview.ts b/src/server/web/app/mobile/views/directives/user-preview.ts similarity index 100% rename from src/web/app/mobile/views/directives/user-preview.ts rename to src/server/web/app/mobile/views/directives/user-preview.ts diff --git a/src/web/app/mobile/views/pages/drive.vue b/src/server/web/app/mobile/views/pages/drive.vue similarity index 100% rename from src/web/app/mobile/views/pages/drive.vue rename to src/server/web/app/mobile/views/pages/drive.vue diff --git a/src/web/app/mobile/views/pages/followers.vue b/src/server/web/app/mobile/views/pages/followers.vue similarity index 100% rename from src/web/app/mobile/views/pages/followers.vue rename to src/server/web/app/mobile/views/pages/followers.vue diff --git a/src/web/app/mobile/views/pages/following.vue b/src/server/web/app/mobile/views/pages/following.vue similarity index 100% rename from src/web/app/mobile/views/pages/following.vue rename to src/server/web/app/mobile/views/pages/following.vue diff --git a/src/web/app/mobile/views/pages/home.vue b/src/server/web/app/mobile/views/pages/home.vue similarity index 100% rename from src/web/app/mobile/views/pages/home.vue rename to src/server/web/app/mobile/views/pages/home.vue diff --git a/src/web/app/mobile/views/pages/index.vue b/src/server/web/app/mobile/views/pages/index.vue similarity index 100% rename from src/web/app/mobile/views/pages/index.vue rename to src/server/web/app/mobile/views/pages/index.vue diff --git a/src/web/app/mobile/views/pages/messaging-room.vue b/src/server/web/app/mobile/views/pages/messaging-room.vue similarity index 100% rename from src/web/app/mobile/views/pages/messaging-room.vue rename to src/server/web/app/mobile/views/pages/messaging-room.vue diff --git a/src/web/app/mobile/views/pages/messaging.vue b/src/server/web/app/mobile/views/pages/messaging.vue similarity index 100% rename from src/web/app/mobile/views/pages/messaging.vue rename to src/server/web/app/mobile/views/pages/messaging.vue diff --git a/src/web/app/mobile/views/pages/notifications.vue b/src/server/web/app/mobile/views/pages/notifications.vue similarity index 100% rename from src/web/app/mobile/views/pages/notifications.vue rename to src/server/web/app/mobile/views/pages/notifications.vue diff --git a/src/web/app/mobile/views/pages/othello.vue b/src/server/web/app/mobile/views/pages/othello.vue similarity index 100% rename from src/web/app/mobile/views/pages/othello.vue rename to src/server/web/app/mobile/views/pages/othello.vue diff --git a/src/web/app/mobile/views/pages/post.vue b/src/server/web/app/mobile/views/pages/post.vue similarity index 100% rename from src/web/app/mobile/views/pages/post.vue rename to src/server/web/app/mobile/views/pages/post.vue diff --git a/src/web/app/mobile/views/pages/profile-setting.vue b/src/server/web/app/mobile/views/pages/profile-setting.vue similarity index 100% rename from src/web/app/mobile/views/pages/profile-setting.vue rename to src/server/web/app/mobile/views/pages/profile-setting.vue diff --git a/src/web/app/mobile/views/pages/search.vue b/src/server/web/app/mobile/views/pages/search.vue similarity index 100% rename from src/web/app/mobile/views/pages/search.vue rename to src/server/web/app/mobile/views/pages/search.vue diff --git a/src/web/app/mobile/views/pages/selectdrive.vue b/src/server/web/app/mobile/views/pages/selectdrive.vue similarity index 100% rename from src/web/app/mobile/views/pages/selectdrive.vue rename to src/server/web/app/mobile/views/pages/selectdrive.vue diff --git a/src/web/app/mobile/views/pages/settings.vue b/src/server/web/app/mobile/views/pages/settings.vue similarity index 100% rename from src/web/app/mobile/views/pages/settings.vue rename to src/server/web/app/mobile/views/pages/settings.vue diff --git a/src/web/app/mobile/views/pages/signup.vue b/src/server/web/app/mobile/views/pages/signup.vue similarity index 100% rename from src/web/app/mobile/views/pages/signup.vue rename to src/server/web/app/mobile/views/pages/signup.vue diff --git a/src/web/app/mobile/views/pages/user.vue b/src/server/web/app/mobile/views/pages/user.vue similarity index 100% rename from src/web/app/mobile/views/pages/user.vue rename to src/server/web/app/mobile/views/pages/user.vue diff --git a/src/web/app/mobile/views/pages/user/home.followers-you-know.vue b/src/server/web/app/mobile/views/pages/user/home.followers-you-know.vue similarity index 100% rename from src/web/app/mobile/views/pages/user/home.followers-you-know.vue rename to src/server/web/app/mobile/views/pages/user/home.followers-you-know.vue diff --git a/src/web/app/mobile/views/pages/user/home.friends.vue b/src/server/web/app/mobile/views/pages/user/home.friends.vue similarity index 100% rename from src/web/app/mobile/views/pages/user/home.friends.vue rename to src/server/web/app/mobile/views/pages/user/home.friends.vue diff --git a/src/web/app/mobile/views/pages/user/home.photos.vue b/src/server/web/app/mobile/views/pages/user/home.photos.vue similarity index 100% rename from src/web/app/mobile/views/pages/user/home.photos.vue rename to src/server/web/app/mobile/views/pages/user/home.photos.vue diff --git a/src/web/app/mobile/views/pages/user/home.posts.vue b/src/server/web/app/mobile/views/pages/user/home.posts.vue similarity index 100% rename from src/web/app/mobile/views/pages/user/home.posts.vue rename to src/server/web/app/mobile/views/pages/user/home.posts.vue diff --git a/src/web/app/mobile/views/pages/user/home.vue b/src/server/web/app/mobile/views/pages/user/home.vue similarity index 100% rename from src/web/app/mobile/views/pages/user/home.vue rename to src/server/web/app/mobile/views/pages/user/home.vue diff --git a/src/web/app/mobile/views/pages/welcome.vue b/src/server/web/app/mobile/views/pages/welcome.vue similarity index 100% rename from src/web/app/mobile/views/pages/welcome.vue rename to src/server/web/app/mobile/views/pages/welcome.vue diff --git a/src/web/app/mobile/views/widgets/activity.vue b/src/server/web/app/mobile/views/widgets/activity.vue similarity index 100% rename from src/web/app/mobile/views/widgets/activity.vue rename to src/server/web/app/mobile/views/widgets/activity.vue diff --git a/src/web/app/mobile/views/widgets/index.ts b/src/server/web/app/mobile/views/widgets/index.ts similarity index 100% rename from src/web/app/mobile/views/widgets/index.ts rename to src/server/web/app/mobile/views/widgets/index.ts diff --git a/src/web/app/mobile/views/widgets/profile.vue b/src/server/web/app/mobile/views/widgets/profile.vue similarity index 100% rename from src/web/app/mobile/views/widgets/profile.vue rename to src/server/web/app/mobile/views/widgets/profile.vue diff --git a/src/web/app/reset.styl b/src/server/web/app/reset.styl similarity index 100% rename from src/web/app/reset.styl rename to src/server/web/app/reset.styl diff --git a/src/web/app/safe.js b/src/server/web/app/safe.js similarity index 100% rename from src/web/app/safe.js rename to src/server/web/app/safe.js diff --git a/src/web/app/stats/style.styl b/src/server/web/app/stats/style.styl similarity index 100% rename from src/web/app/stats/style.styl rename to src/server/web/app/stats/style.styl diff --git a/src/web/app/stats/tags/index.tag b/src/server/web/app/stats/tags/index.tag similarity index 100% rename from src/web/app/stats/tags/index.tag rename to src/server/web/app/stats/tags/index.tag diff --git a/src/web/app/stats/tags/index.ts b/src/server/web/app/stats/tags/index.ts similarity index 100% rename from src/web/app/stats/tags/index.ts rename to src/server/web/app/stats/tags/index.ts diff --git a/src/web/app/status/style.styl b/src/server/web/app/status/style.styl similarity index 100% rename from src/web/app/status/style.styl rename to src/server/web/app/status/style.styl diff --git a/src/web/app/status/tags/index.tag b/src/server/web/app/status/tags/index.tag similarity index 100% rename from src/web/app/status/tags/index.tag rename to src/server/web/app/status/tags/index.tag diff --git a/src/web/app/status/tags/index.ts b/src/server/web/app/status/tags/index.ts similarity index 100% rename from src/web/app/status/tags/index.ts rename to src/server/web/app/status/tags/index.ts diff --git a/src/web/app/sw.js b/src/server/web/app/sw.js similarity index 100% rename from src/web/app/sw.js rename to src/server/web/app/sw.js diff --git a/src/web/app/tsconfig.json b/src/server/web/app/tsconfig.json similarity index 100% rename from src/web/app/tsconfig.json rename to src/server/web/app/tsconfig.json diff --git a/src/web/app/v.d.ts b/src/server/web/app/v.d.ts similarity index 100% rename from src/web/app/v.d.ts rename to src/server/web/app/v.d.ts diff --git a/src/web/assets/404.js b/src/server/web/assets/404.js similarity index 100% rename from src/web/assets/404.js rename to src/server/web/assets/404.js diff --git a/src/web/assets/code-highlight.css b/src/server/web/assets/code-highlight.css similarity index 100% rename from src/web/assets/code-highlight.css rename to src/server/web/assets/code-highlight.css diff --git a/src/web/assets/error.jpg b/src/server/web/assets/error.jpg similarity index 100% rename from src/web/assets/error.jpg rename to src/server/web/assets/error.jpg diff --git a/src/web/assets/favicon.ico b/src/server/web/assets/favicon.ico similarity index 100% rename from src/web/assets/favicon.ico rename to src/server/web/assets/favicon.ico diff --git a/src/web/assets/label.svg b/src/server/web/assets/label.svg similarity index 100% rename from src/web/assets/label.svg rename to src/server/web/assets/label.svg diff --git a/src/web/assets/manifest.json b/src/server/web/assets/manifest.json similarity index 100% rename from src/web/assets/manifest.json rename to src/server/web/assets/manifest.json diff --git a/src/web/assets/message.mp3 b/src/server/web/assets/message.mp3 similarity index 100% rename from src/web/assets/message.mp3 rename to src/server/web/assets/message.mp3 diff --git a/src/web/assets/othello-put-me.mp3 b/src/server/web/assets/othello-put-me.mp3 similarity index 100% rename from src/web/assets/othello-put-me.mp3 rename to src/server/web/assets/othello-put-me.mp3 diff --git a/src/web/assets/othello-put-you.mp3 b/src/server/web/assets/othello-put-you.mp3 similarity index 100% rename from src/web/assets/othello-put-you.mp3 rename to src/server/web/assets/othello-put-you.mp3 diff --git a/src/web/assets/post.mp3 b/src/server/web/assets/post.mp3 similarity index 100% rename from src/web/assets/post.mp3 rename to src/server/web/assets/post.mp3 diff --git a/src/web/assets/reactions/angry.png b/src/server/web/assets/reactions/angry.png similarity index 100% rename from src/web/assets/reactions/angry.png rename to src/server/web/assets/reactions/angry.png diff --git a/src/web/assets/reactions/confused.png b/src/server/web/assets/reactions/confused.png similarity index 100% rename from src/web/assets/reactions/confused.png rename to src/server/web/assets/reactions/confused.png diff --git a/src/web/assets/reactions/congrats.png b/src/server/web/assets/reactions/congrats.png similarity index 100% rename from src/web/assets/reactions/congrats.png rename to src/server/web/assets/reactions/congrats.png diff --git a/src/web/assets/reactions/hmm.png b/src/server/web/assets/reactions/hmm.png similarity index 100% rename from src/web/assets/reactions/hmm.png rename to src/server/web/assets/reactions/hmm.png diff --git a/src/web/assets/reactions/laugh.png b/src/server/web/assets/reactions/laugh.png similarity index 100% rename from src/web/assets/reactions/laugh.png rename to src/server/web/assets/reactions/laugh.png diff --git a/src/web/assets/reactions/like.png b/src/server/web/assets/reactions/like.png similarity index 100% rename from src/web/assets/reactions/like.png rename to src/server/web/assets/reactions/like.png diff --git a/src/web/assets/reactions/love.png b/src/server/web/assets/reactions/love.png similarity index 100% rename from src/web/assets/reactions/love.png rename to src/server/web/assets/reactions/love.png diff --git a/src/web/assets/reactions/pudding.png b/src/server/web/assets/reactions/pudding.png similarity index 100% rename from src/web/assets/reactions/pudding.png rename to src/server/web/assets/reactions/pudding.png diff --git a/src/web/assets/reactions/surprise.png b/src/server/web/assets/reactions/surprise.png similarity index 100% rename from src/web/assets/reactions/surprise.png rename to src/server/web/assets/reactions/surprise.png diff --git a/src/web/assets/recover.html b/src/server/web/assets/recover.html similarity index 100% rename from src/web/assets/recover.html rename to src/server/web/assets/recover.html diff --git a/src/web/assets/title.svg b/src/server/web/assets/title.svg similarity index 100% rename from src/web/assets/title.svg rename to src/server/web/assets/title.svg diff --git a/src/web/assets/unread.svg b/src/server/web/assets/unread.svg similarity index 100% rename from src/web/assets/unread.svg rename to src/server/web/assets/unread.svg diff --git a/src/web/assets/welcome-bg.svg b/src/server/web/assets/welcome-bg.svg similarity index 100% rename from src/web/assets/welcome-bg.svg rename to src/server/web/assets/welcome-bg.svg diff --git a/src/web/assets/welcome-fg.svg b/src/server/web/assets/welcome-fg.svg similarity index 100% rename from src/web/assets/welcome-fg.svg rename to src/server/web/assets/welcome-fg.svg diff --git a/src/web/const.styl b/src/server/web/const.styl similarity index 74% rename from src/web/const.styl rename to src/server/web/const.styl index b6560701d9..f16e077828 100644 --- a/src/web/const.styl +++ b/src/server/web/const.styl @@ -1,4 +1,4 @@ -json('../const.json') +json('../../const.json') $theme-color = themeColor $theme-color-foreground = themeColorForeground diff --git a/src/web/docs/about.en.pug b/src/server/web/docs/about.en.pug similarity index 100% rename from src/web/docs/about.en.pug rename to src/server/web/docs/about.en.pug diff --git a/src/web/docs/about.ja.pug b/src/server/web/docs/about.ja.pug similarity index 100% rename from src/web/docs/about.ja.pug rename to src/server/web/docs/about.ja.pug diff --git a/src/web/docs/api.ja.pug b/src/server/web/docs/api.ja.pug similarity index 100% rename from src/web/docs/api.ja.pug rename to src/server/web/docs/api.ja.pug diff --git a/src/web/docs/api/endpoints/posts/create.yaml b/src/server/web/docs/api/endpoints/posts/create.yaml similarity index 100% rename from src/web/docs/api/endpoints/posts/create.yaml rename to src/server/web/docs/api/endpoints/posts/create.yaml diff --git a/src/web/docs/api/endpoints/posts/timeline.yaml b/src/server/web/docs/api/endpoints/posts/timeline.yaml similarity index 100% rename from src/web/docs/api/endpoints/posts/timeline.yaml rename to src/server/web/docs/api/endpoints/posts/timeline.yaml diff --git a/src/web/docs/api/endpoints/style.styl b/src/server/web/docs/api/endpoints/style.styl similarity index 100% rename from src/web/docs/api/endpoints/style.styl rename to src/server/web/docs/api/endpoints/style.styl diff --git a/src/web/docs/api/endpoints/view.pug b/src/server/web/docs/api/endpoints/view.pug similarity index 100% rename from src/web/docs/api/endpoints/view.pug rename to src/server/web/docs/api/endpoints/view.pug diff --git a/src/web/docs/api/entities/drive-file.yaml b/src/server/web/docs/api/entities/drive-file.yaml similarity index 100% rename from src/web/docs/api/entities/drive-file.yaml rename to src/server/web/docs/api/entities/drive-file.yaml diff --git a/src/web/docs/api/entities/post.yaml b/src/server/web/docs/api/entities/post.yaml similarity index 100% rename from src/web/docs/api/entities/post.yaml rename to src/server/web/docs/api/entities/post.yaml diff --git a/src/web/docs/api/entities/style.styl b/src/server/web/docs/api/entities/style.styl similarity index 100% rename from src/web/docs/api/entities/style.styl rename to src/server/web/docs/api/entities/style.styl diff --git a/src/web/docs/api/entities/user.yaml b/src/server/web/docs/api/entities/user.yaml similarity index 100% rename from src/web/docs/api/entities/user.yaml rename to src/server/web/docs/api/entities/user.yaml diff --git a/src/web/docs/api/entities/view.pug b/src/server/web/docs/api/entities/view.pug similarity index 100% rename from src/web/docs/api/entities/view.pug rename to src/server/web/docs/api/entities/view.pug diff --git a/src/web/docs/api/gulpfile.ts b/src/server/web/docs/api/gulpfile.ts similarity index 80% rename from src/web/docs/api/gulpfile.ts rename to src/server/web/docs/api/gulpfile.ts index cd1bf15307..37935413de 100644 --- a/src/web/docs/api/gulpfile.ts +++ b/src/server/web/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 '../../../common/build/i18n'; -import fa from '../../../common/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/web/docs/api/endpoints/**/*.yaml', (globErr, files) => { + glob('./src/server/web/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/web/docs/api/endpoints/view.pug', Object.assign({}, vars, { + pug.renderFile('./src/server/web/docs/api/endpoints/view.pug', Object.assign({}, vars, { lang, title: ep.endpoint, - src: `https://github.com/syuilo/misskey/tree/master/src/web/docs/api/endpoints/${ep.endpoint}.yaml`, + src: `https://github.com/syuilo/misskey/tree/master/src/server/web/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/web/docs/${lang}/api/endpoints/${ep.endpoint}.html`; + const htmlPath = `./built/server/web/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/web/docs/api/entities/**/*.yaml', (globErr, files) => { + glob('./src/server/web/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/web/docs/api/entities/view.pug', Object.assign({}, vars, { + pug.renderFile('./src/server/web/docs/api/entities/view.pug', Object.assign({}, vars, { lang, title: entity.name, - src: `https://github.com/syuilo/misskey/tree/master/src/web/docs/api/entities/${kebab(entity.name)}.yaml`, + src: `https://github.com/syuilo/misskey/tree/master/src/server/web/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/web/docs/${lang}/api/entities/${kebab(entity.name)}.html`; + const htmlPath = `./built/server/web/docs/${lang}/api/entities/${kebab(entity.name)}.html`; mkdirp(path.dirname(htmlPath), (mkdirErr) => { if (mkdirErr) { console.error(mkdirErr); diff --git a/src/web/docs/api/mixins.pug b/src/server/web/docs/api/mixins.pug similarity index 100% rename from src/web/docs/api/mixins.pug rename to src/server/web/docs/api/mixins.pug diff --git a/src/web/docs/api/style.styl b/src/server/web/docs/api/style.styl similarity index 100% rename from src/web/docs/api/style.styl rename to src/server/web/docs/api/style.styl diff --git a/src/web/docs/gulpfile.ts b/src/server/web/docs/gulpfile.ts similarity index 74% rename from src/web/docs/gulpfile.ts rename to src/server/web/docs/gulpfile.ts index d5ddda108d..7b36cf6675 100644 --- a/src/web/docs/gulpfile.ts +++ b/src/server/web/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 '../../common/build/i18n'; -import fa from '../../common/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/web/docs/**/*.*.pug', (globErr, files) => { + glob('./src/server/web/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/web/docs/${name}.${lang}.pug`, + src: `https://github.com/syuilo/misskey/tree/master/src/server/web/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/web/docs/layout.pug', Object.assign({}, vars, { + pug.renderFile('./src/server/web/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/web/docs/${lang}/${name}.html`; + const htmlPath = `./built/server/web/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/web/docs/**/*.styl') + gulp.src('./src/server/web/docs/**/*.styl') .pipe(stylus()) .pipe((cssnano as any)()) - .pipe(gulp.dest('./built/web/docs/assets/')) + .pipe(gulp.dest('./built/server/web/docs/assets/')) ); diff --git a/src/web/docs/index.en.pug b/src/server/web/docs/index.en.pug similarity index 100% rename from src/web/docs/index.en.pug rename to src/server/web/docs/index.en.pug diff --git a/src/web/docs/index.ja.pug b/src/server/web/docs/index.ja.pug similarity index 100% rename from src/web/docs/index.ja.pug rename to src/server/web/docs/index.ja.pug diff --git a/src/web/docs/layout.pug b/src/server/web/docs/layout.pug similarity index 100% rename from src/web/docs/layout.pug rename to src/server/web/docs/layout.pug diff --git a/src/web/docs/license.en.pug b/src/server/web/docs/license.en.pug similarity index 100% rename from src/web/docs/license.en.pug rename to src/server/web/docs/license.en.pug diff --git a/src/web/docs/license.ja.pug b/src/server/web/docs/license.ja.pug similarity index 100% rename from src/web/docs/license.ja.pug rename to src/server/web/docs/license.ja.pug diff --git a/src/web/docs/mute.ja.pug b/src/server/web/docs/mute.ja.pug similarity index 100% rename from src/web/docs/mute.ja.pug rename to src/server/web/docs/mute.ja.pug diff --git a/src/web/docs/search.ja.pug b/src/server/web/docs/search.ja.pug similarity index 100% rename from src/web/docs/search.ja.pug rename to src/server/web/docs/search.ja.pug diff --git a/src/web/docs/server.ts b/src/server/web/docs/server.ts similarity index 100% rename from src/web/docs/server.ts rename to src/server/web/docs/server.ts diff --git a/src/web/docs/style.styl b/src/server/web/docs/style.styl similarity index 100% rename from src/web/docs/style.styl rename to src/server/web/docs/style.styl diff --git a/src/web/docs/tou.ja.pug b/src/server/web/docs/tou.ja.pug similarity index 100% rename from src/web/docs/tou.ja.pug rename to src/server/web/docs/tou.ja.pug diff --git a/src/web/docs/ui.styl b/src/server/web/docs/ui.styl similarity index 100% rename from src/web/docs/ui.styl rename to src/server/web/docs/ui.styl diff --git a/src/web/docs/vars.ts b/src/server/web/docs/vars.ts similarity index 76% rename from src/web/docs/vars.ts rename to src/server/web/docs/vars.ts index 6f713f21d0..5096a39c9e 100644 --- a/src/web/docs/vars.ts +++ b/src/server/web/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 '../../common/build/fa'; -import config from '../../conf'; -import { licenseHtml } from '../../common/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/web/docs/api/endpoints/**/*.yaml'); + const endpoints = glob.sync('./src/server/web/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/web/docs/api/entities/**/*.yaml'); + const entities = glob.sync('./src/server/web/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/web/docs/**/*.*.pug'); + const docs = glob.sync('./src/server/web/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/web/element.scss b/src/server/web/element.scss similarity index 91% rename from src/web/element.scss rename to src/server/web/element.scss index 917198e024..7e6d0e7099 100644 --- a/src/web/element.scss +++ b/src/server/web/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/web/server.ts b/src/server/web/server.ts similarity index 100% rename from src/web/server.ts rename to src/server/web/server.ts diff --git a/src/web/service/url-preview.ts b/src/server/web/service/url-preview.ts similarity index 100% rename from src/web/service/url-preview.ts rename to src/server/web/service/url-preview.ts diff --git a/src/web/style.styl b/src/server/web/style.styl similarity index 100% rename from src/web/style.styl rename to src/server/web/style.styl diff --git a/src/tools/analysis/core.ts b/src/tools/analysis/core.ts index 20e5fa6c51..839fffd3c8 100644 --- a/src/tools/analysis/core.ts +++ b/src/tools/analysis/core.ts @@ -1,7 +1,7 @@ const bayes = require('./naive-bayes.js'); const MeCab = require('./mecab'); -import Post from '../../api/models/post'; +import Post from '../../server/api/models/post'; /** * 投稿を学習したり与えられた投稿のカテゴリを予測します diff --git a/src/tools/analysis/extract-user-domains.ts b/src/tools/analysis/extract-user-domains.ts index bc120f5c17..ba472b89a2 100644 --- a/src/tools/analysis/extract-user-domains.ts +++ b/src/tools/analysis/extract-user-domains.ts @@ -1,8 +1,8 @@ import * as URL from 'url'; -import Post from '../../api/models/post'; -import User from '../../api/models/user'; -import parse from '../../api/common/text'; +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); diff --git a/src/tools/analysis/extract-user-keywords.ts b/src/tools/analysis/extract-user-keywords.ts index b99ca93211..4fa9b384ef 100644 --- a/src/tools/analysis/extract-user-keywords.ts +++ b/src/tools/analysis/extract-user-keywords.ts @@ -1,9 +1,9 @@ const moji = require('moji'); const MeCab = require('./mecab'); -import Post from '../../api/models/post'; -import User from '../../api/models/user'; -import parse from '../../api/common/text'; +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); diff --git a/src/tools/analysis/predict-all-post-category.ts b/src/tools/analysis/predict-all-post-category.ts index 058c4f99ef..8564fd1b10 100644 --- a/src/tools/analysis/predict-all-post-category.ts +++ b/src/tools/analysis/predict-all-post-category.ts @@ -1,4 +1,4 @@ -import Post from '../../api/models/post'; +import Post from '../../server/api/models/post'; import Core from './core'; const c = new Core(); diff --git a/src/tools/analysis/predict-user-interst.ts b/src/tools/analysis/predict-user-interst.ts index 99bdfa4206..6599fb2208 100644 --- a/src/tools/analysis/predict-user-interst.ts +++ b/src/tools/analysis/predict-user-interst.ts @@ -1,5 +1,5 @@ -import Post from '../../api/models/post'; -import User from '../../api/models/user'; +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} ...`); diff --git a/test/api.js b/test/api.js index b8b2aecc99..c2c08dd95d 100644 --- a/test/api.js +++ b/test/api.js @@ -17,7 +17,7 @@ const should = _chai.should(); _chai.use(chaiHttp); -const server = require('../built/api/server'); +const server = require('../built/server/api/server'); const db = require('../built/db/mongodb').default; const async = fn => (done) => { diff --git a/test/text.js b/test/text.js index 3b27aa23d4..4f739cc1b1 100644 --- a/test/text.js +++ b/test/text.js @@ -4,8 +4,8 @@ const assert = require('assert'); -const analyze = require('../built/api/common/text').default; -const syntaxhighlighter = require('../built/api/common/text/core/syntax-highlighter').default; +const analyze = require('../built/server/api/common/text').default; +const syntaxhighlighter = require('../built/server/api/common/text/core/syntax-highlighter').default; describe('Text', () => { it('can be analyzed', () => { diff --git a/tsconfig.json b/tsconfig.json index 47aa521bfe..574c11baca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,6 @@ "./src/**/*.ts" ], "exclude": [ - "./src/web/app/**/*.ts" + "./src/server/web/app/**/*.ts" ] } diff --git a/webpack.config.ts b/webpack.config.ts index 9a952c8ef3..6f16fcbfa3 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -11,11 +11,11 @@ const WebpackOnBuildPlugin = require('on-build-webpack'); //const HardSourceWebpackPlugin = require('hard-source-webpack-plugin'); const ProgressBarPlugin = require('progress-bar-webpack-plugin'); -import I18nReplacer from './src/common/build/i18n'; -import { pattern as faPattern, replacement as faReplacement } from './src/common/build/fa'; +import I18nReplacer from './src/build/i18n'; +import { pattern as faPattern, replacement as faReplacement } from './src/build/fa'; const constants = require('./src/const.json'); import config from './src/conf'; -import { licenseHtml } from './src/common/build/license'; +import { licenseHtml } from './src/build/license'; import locales from './locales'; const meta = require('./package.json'); @@ -33,7 +33,7 @@ global['collapseSpacesReplacement'] = html => { }; global['base64replacement'] = (_, key) => { - return fs.readFileSync(__dirname + '/src/web/' + key, 'base64'); + return fs.readFileSync(__dirname + '/src/server/web/' + key, 'base64'); }; //#endregion @@ -51,18 +51,18 @@ module.exports = entries.map(x => { // Entries const entry = { - desktop: './src/web/app/desktop/script.ts', - mobile: './src/web/app/mobile/script.ts', - //ch: './src/web/app/ch/script.ts', - //stats: './src/web/app/stats/script.ts', - //status: './src/web/app/status/script.ts', - dev: './src/web/app/dev/script.ts', - auth: './src/web/app/auth/script.ts', - sw: './src/web/app/sw.js' + 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' }; const output = { - path: __dirname + '/built/web/assets', + path: __dirname + '/built/server/web/assets', filename: `[name].${version}.${lang}.${isProduction ? 'min' : 'raw'}.js` }; @@ -206,7 +206,7 @@ module.exports = entries.map(x => { loader: 'ts-loader', options: { happyPackMode: true, - configFile: __dirname + '/../src/web/app/tsconfig.json', + configFile: __dirname + '/../src/server/web/app/tsconfig.json', appendTsSuffixTo: [/\.vue$/] } }, { @@ -231,7 +231,7 @@ module.exports = entries.map(x => { '.js', '.ts', '.json' ], alias: { - 'const.styl': __dirname + '/src/web/const.styl' + 'const.styl': __dirname + '/src/server/web/const.styl' } }, resolveLoader: {