Abolish common and misc directories

This commit is contained in:
Akihiko Odaki
2018-04-02 12:58:53 +09:00
parent a0f8b4e940
commit 5b9f3701f5
111 changed files with 133 additions and 133 deletions

View File

@ -3,10 +3,10 @@ import * as bcrypt from 'bcryptjs';
import User, { IUser, init as initUser, ILocalUser } from '../../../models/user';
import getPostSummary from '../../../misc/get-post-summary';
import getUserSummary from '../../../misc/user/get-summary';
import parseAcct from '../../../misc/user/parse-acct';
import getNotificationSummary from '../../../misc/get-notification-summary';
import getPostSummary from '../../../get-post-summary';
import getUserSummary from '../../../user/get-summary';
import parseAcct from '../../../user/parse-acct';
import getNotificationSummary from '../../../get-notification-summary';
const hmm = [
'',

View File

@ -7,9 +7,9 @@ import config from '../../../../conf';
import BotCore from '../core';
import _redis from '../../../../db/redis';
import prominence = require('prominence');
import getAcct from '../../../../misc/user/get-acct';
import parseAcct from '../../../../misc/user/parse-acct';
import getPostSummary from '../../../../misc/get-post-summary';
import getAcct from '../../../../user/get-acct';
import parseAcct from '../../../../user/parse-acct';
import getPostSummary from '../../../../get-post-summary';
const redis = prominence(_redis);

View File

@ -1,9 +1,9 @@
import * as mongo from 'mongodb';
import Message from '../../../models/messaging-message';
import { IMessagingMessage as IMessage } from '../../../models/messaging-message';
import publishUserStream from '../../../common/event';
import { publishMessagingStream } from '../../../common/event';
import { publishMessagingIndexStream } from '../../../common/event';
import publishUserStream from '../../../event';
import { publishMessagingStream } from '../../../event';
import { publishMessagingIndexStream } from '../../../event';
/**
* Mark as read message(s)

View File

@ -1,6 +1,6 @@
import * as mongo from 'mongodb';
import { default as Notification, INotification } from '../../../models/notification';
import publishUserStream from '../../../common/event';
import publishUserStream from '../../../event';
/**
* Mark as read notification(s)

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import { validateFileName, pack } from '../../../../../models/drive-file';
import create from '../../../../../common/drive/add-file';
import create from '../../../../../drive/add-file';
/**
* Create a file

View File

@ -4,7 +4,7 @@
import $ from 'cafy';
import DriveFolder from '../../../../../models/drive-folder';
import DriveFile, { validateFileName, pack } from '../../../../../models/drive-file';
import { publishDriveStream } from '../../../../../common/event';
import { publishDriveStream } from '../../../../../event';
/**
* Update a file

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import { pack } from '../../../../../models/drive-file';
import uploadFromUrl from '../../../../../common/drive/upload-from-url';
import uploadFromUrl from '../../../../../drive/upload-from-url';
/**
* Create a file from a URL

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import DriveFolder, { isValidFolderName, pack } from '../../../../../models/drive-folder';
import { publishDriveStream } from '../../../../../common/event';
import { publishDriveStream } from '../../../../../event';
/**
* Create drive folder

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import DriveFolder, { isValidFolderName, pack } from '../../../../../models/drive-folder';
import { publishDriveStream } from '../../../../../common/event';
import { publishDriveStream } from '../../../../../event';
/**
* Update a folder

View File

@ -4,7 +4,7 @@
import $ from 'cafy';
import User, { pack as packUser } from '../../../../models/user';
import Following from '../../../../models/following';
import event from '../../../../common/event';
import event from '../../../../event';
/**
* Unfollow a user

View File

@ -4,7 +4,7 @@
import $ from 'cafy';
import * as bcrypt from 'bcryptjs';
import User from '../../../../models/user';
import event from '../../../../common/event';
import event from '../../../../event';
import generateUserToken from '../../common/generate-native-user-token';
/**

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import User, { isValidName, isValidDescription, isValidLocation, isValidBirthday, pack } from '../../../../models/user';
import event from '../../../../common/event';
import event from '../../../../event';
import config from '../../../../conf';
/**

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import User, { pack } from '../../../../models/user';
import event from '../../../../common/event';
import event from '../../../../event';
/**
* Update myself

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import User from '../../../../models/user';
import event from '../../../../common/event';
import event from '../../../../event';
module.exports = async (params, user) => new Promise(async (res, rej) => {
// Get 'home' parameter

View File

@ -3,7 +3,7 @@
*/
import $ from 'cafy';
import User from '../../../../models/user';
import event from '../../../../common/event';
import event from '../../../../event';
module.exports = async (params, user) => new Promise(async (res, rej) => {
// Get 'home' parameter

View File

@ -9,10 +9,10 @@ import User from '../../../../../models/user';
import Mute from '../../../../../models/mute';
import DriveFile from '../../../../../models/drive-file';
import { pack } from '../../../../../models/messaging-message';
import publishUserStream from '../../../../../common/event';
import { publishMessagingStream, publishMessagingIndexStream, pushSw } from '../../../../../common/event';
import html from '../../../../../common/text/html';
import parse from '../../../../../common/text/parse';
import publishUserStream from '../../../../../event';
import { publishMessagingStream, publishMessagingIndexStream, pushSw } from '../../../../../event';
import html from '../../../../../text/html';
import parse from '../../../../../text/parse';
import config from '../../../../../conf';
/**

View File

@ -2,7 +2,7 @@
* Module dependencies
*/
import Notification from '../../../../models/notification';
import event from '../../../../common/event';
import event from '../../../../event';
/**
* Mark as read all notifications

View File

@ -1,6 +1,6 @@
import $ from 'cafy';
import OthelloGame, { pack } from '../../../../../models/othello-game';
import Othello from '../../../../../misc/othello/core';
import Othello from '../../../../../othello/core';
module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'gameId' parameter

View File

@ -2,8 +2,8 @@ import $ from 'cafy';
import Matching, { pack as packMatching } from '../../../../models/othello-matching';
import OthelloGame, { pack as packGame } from '../../../../models/othello-game';
import User from '../../../../models/user';
import publishUserStream, { publishOthelloStream } from '../../../../common/event';
import { eighteight } from '../../../../misc/othello/maps';
import publishUserStream, { publishOthelloStream } from '../../../../event';
import { eighteight } from '../../../../othello/maps';
module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'userId' parameter

View File

@ -3,8 +3,8 @@
*/
import $ from 'cafy';
import deepEqual = require('deep-equal');
import html from '../../../../common/text/html';
import parse from '../../../../common/text/parse';
import html from '../../../../text/html';
import parse from '../../../../text/parse';
import Post, { IPost, isValidText, isValidCw } from '../../../../models/post';
import User, { ILocalUser } from '../../../../models/user';
import Channel, { IChannel } from '../../../../models/channel';
@ -15,10 +15,10 @@ import Watching from '../../../../models/post-watching';
import ChannelWatching from '../../../../models/channel-watching';
import { pack } from '../../../../models/post';
import watch from '../../common/watch-post';
import event, { pushSw, publishChannelStream } from '../../../../common/event';
import notify from '../../../../common/notify';
import getAcct from '../../../../misc/user/get-acct';
import parseAcct from '../../../../misc/user/parse-acct';
import event, { pushSw, publishChannelStream } from '../../../../event';
import notify from '../../../../notify';
import getAcct from '../../../../user/get-acct';
import parseAcct from '../../../../user/parse-acct';
import config from '../../../../conf';
/**

View File

@ -6,8 +6,8 @@ import Vote from '../../../../../models/poll-vote';
import Post from '../../../../../models/post';
import Watching from '../../../../../models/post-watching';
import watch from '../../../common/watch-post';
import { publishPostStream } from '../../../../../common/event';
import notify from '../../../../../common/notify';
import { publishPostStream } from '../../../../../event';
import notify from '../../../../../notify';
/**
* Vote poll of a post

View File

@ -7,8 +7,8 @@ import Post, { pack as packPost } from '../../../../../models/post';
import { pack as packUser } from '../../../../../models/user';
import Watching from '../../../../../models/post-watching';
import watch from '../../../common/watch-post';
import { publishPostStream, pushSw } from '../../../../../common/event';
import notify from '../../../../../common/notify';
import { publishPostStream, pushSw } from '../../../../../event';
import notify from '../../../../../notify';
/**
* React to a post

View File

@ -3,7 +3,7 @@ import * as debug from 'debug';
import limiterDB from '../../db/redis';
import { Endpoint } from './endpoints';
import { IAuthContext } from './authenticate';
import getAcct from '../../misc/user/get-acct';
import getAcct from '../../user/get-acct';
const log = debug('misskey:limitter');

View File

@ -3,7 +3,7 @@ import * as bcrypt from 'bcryptjs';
import * as speakeasy from 'speakeasy';
import User, { ILocalUser } from '../../../models/user';
import Signin, { pack } from '../../../models/signin';
import event from '../../../common/event';
import event from '../../../event';
import signin from '../common/signin';
import config from '../../../conf';

View File

@ -6,7 +6,7 @@ import * as uuid from 'uuid';
import autwh from 'autwh';
import redis from '../../../db/redis';
import User, { pack } from '../../../models/user';
import event from '../../../common/event';
import event from '../../../event';
import config from '../../../conf';
import signin from '../common/signin';

View File

@ -2,9 +2,9 @@ import * as websocket from 'websocket';
import * as redis from 'redis';
import * as CRC32 from 'crc-32';
import OthelloGame, { pack } from '../../../models/othello-game';
import { publishOthelloGameStream } from '../../../common/event';
import Othello from '../../../misc/othello/core';
import * as maps from '../../../misc/othello/maps';
import { publishOthelloGameStream } from '../../../event';
import Othello from '../../../othello/core';
import * as maps from '../../../othello/maps';
import { ParsedUrlQuery } from 'querystring';
export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user?: any): void {

View File

@ -2,7 +2,7 @@ import * as mongo from 'mongodb';
import * as websocket from 'websocket';
import * as redis from 'redis';
import Matching, { pack } from '../../../models/othello-matching';
import publishUserStream from '../../../common/event';
import publishUserStream from '../../../event';
export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user: any): void {
// Subscribe othello stream