Refactoring: Move chart dir into services dir

This commit is contained in:
syuilo 2019-02-08 04:31:33 +09:00
parent e6612f610c
commit aba85b977d
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
41 changed files with 53 additions and 53 deletions

View file

@ -9,7 +9,7 @@ import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type'
import { IDriveFile } from '../../../models/drive-file';
import Meta from '../../../models/meta';
import { fromHtml } from '../../../mfm/fromHtml';
import usersChart from '../../../chart/users';
import usersChart from '../../../services/chart/users';
import { URL } from 'url';
import { resolveNote, extractEmojis } from './note';
import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc';

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../define';
import activeUsersChart from '../../../../chart/active-users';
import activeUsersChart from '../../../../services/chart/active-users';
export const meta = {
stability: 'stable',

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../define';
import driveChart from '../../../../chart/drive';
import driveChart from '../../../../services/chart/drive';
export const meta = {
stability: 'stable',

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../define';
import federationChart from '../../../../chart/federation';
import federationChart from '../../../../services/chart/federation';
export const meta = {
stability: 'stable',

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../define';
import hashtagChart from '../../../../chart/hashtag';
import hashtagChart from '../../../../services/chart/hashtag';
export const meta = {
stability: 'stable',

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../define';
import networkChart from '../../../../chart/network';
import networkChart from '../../../../services/chart/network';
export const meta = {
stability: 'stable',

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../define';
import notesChart from '../../../../chart/notes';
import notesChart from '../../../../services/chart/notes';
export const meta = {
stability: 'stable',

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../../define';
import perUserDriveChart from '../../../../../chart/per-user-drive';
import perUserDriveChart from '../../../../../services/chart/per-user-drive';
import ID, { transform } from '../../../../../misc/cafy-id';
export const meta = {

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../../define';
import perUserFollowingChart from '../../../../../chart/per-user-following';
import perUserFollowingChart from '../../../../../services/chart/per-user-following';
import ID, { transform } from '../../../../../misc/cafy-id';
export const meta = {

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../../define';
import perUserNotesChart from '../../../../../chart/per-user-notes';
import perUserNotesChart from '../../../../../services/chart/per-user-notes';
import ID, { transform } from '../../../../../misc/cafy-id';
export const meta = {

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../../define';
import perUserReactionsChart from '../../../../../chart/per-user-reactions';
import perUserReactionsChart from '../../../../../services/chart/per-user-reactions';
import ID, { transform } from '../../../../../misc/cafy-id';
export const meta = {

View file

@ -1,6 +1,6 @@
import $ from 'cafy';
import define from '../../define';
import usersChart from '../../../../chart/users';
import usersChart from '../../../../services/chart/users';
export const meta = {
stability: 'stable',

View file

@ -6,7 +6,7 @@ import { packMany } from '../../../../models/note';
import define from '../../define';
import { countIf } from '../../../../prelude/array';
import fetchMeta from '../../../../misc/fetch-meta';
import activeUsersChart from '../../../../chart/active-users';
import activeUsersChart from '../../../../services/chart/active-users';
import { getHideUserIds } from '../../common/get-hide-users';
export const meta = {

View file

@ -5,7 +5,7 @@ import { packMany } from '../../../../models/note';
import define from '../../define';
import { countIf } from '../../../../prelude/array';
import fetchMeta from '../../../../misc/fetch-meta';
import activeUsersChart from '../../../../chart/active-users';
import activeUsersChart from '../../../../services/chart/active-users';
import { getHideUserIds } from '../../common/get-hide-users';
export const meta = {

View file

@ -5,7 +5,7 @@ import { getFriends } from '../../common/get-friends';
import { packMany } from '../../../../models/note';
import define from '../../define';
import { countIf } from '../../../../prelude/array';
import activeUsersChart from '../../../../chart/active-users';
import activeUsersChart from '../../../../services/chart/active-users';
import { getHideUserIds } from '../../common/get-hide-users';
export const meta = {

View file

@ -1,6 +1,6 @@
import define from '../define';
import driveChart from '../../../chart/drive';
import federationChart from '../../../chart/federation';
import driveChart from '../../../services/chart/drive';
import federationChart from '../../../services/chart/federation';
import fetchMeta from '../../../misc/fetch-meta';
export const meta = {

View file

@ -6,7 +6,7 @@ import generateUserToken from '../common/generate-native-user-token';
import config from '../../../config';
import Meta from '../../../models/meta';
import RegistrationTicket from '../../../models/registration-tickets';
import usersChart from '../../../chart/users';
import usersChart from '../../../services/chart/users';
import fetchMeta from '../../../misc/fetch-meta';
import * as recaptcha from 'recaptcha-promise';

View file

@ -19,7 +19,7 @@ import activityPub from './activitypub';
import nodeinfo from './nodeinfo';
import wellKnown from './well-known';
import config from '../config';
import networkChart from '../chart/network';
import networkChart from '../services/chart/network';
import apiServer from './api';
import { sum } from '../prelude/array';
import User from '../models/user';

View file

@ -8,7 +8,7 @@ import renderUndo from '../../remote/activitypub/renderer/undo';
import renderBlock from '../../remote/activitypub/renderer/block';
import { deliver } from '../../queue';
import renderReject from '../../remote/activitypub/renderer/reject';
import perUserFollowingChart from '../../chart/per-user-following';
import perUserFollowingChart from '../../services/chart/per-user-following';
import Blocking from '../../models/blocking';
export default async function(blocker: IUser, blockee: IUser) {

View file

@ -1,6 +1,6 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from '.';
import { IUser, isLocalUser } from '../models/user';
import { IUser, isLocalUser } from '../../models/user';
/**
*

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import DriveFile, { IDriveFile } from '../models/drive-file';
import { isLocalUser } from '../models/user';
import DriveFile, { IDriveFile } from '../../models/drive-file';
import { isLocalUser } from '../../models/user';
/**
*

View file

@ -1,6 +1,6 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from '.';
import Instance from '../models/instance';
import Instance from '../../models/instance';
/**
*

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import { IUser, isLocalUser } from '../models/user';
import db from '../db/mongodb';
import { IUser, isLocalUser } from '../../models/user';
import db from '../../db/mongodb';
/**
*

View file

@ -6,9 +6,9 @@ import * as moment from 'moment';
import * as nestedProperty from 'nested-property';
import autobind from 'autobind-decorator';
import * as mongo from 'mongodb';
import db from '../db/mongodb';
import db from '../../db/mongodb';
import { ICollection } from 'monk';
import Logger from '../misc/logger';
import Logger from '../../misc/logger';
const logger = new Logger('chart');

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from '.';
import Note, { INote } from '../models/note';
import { isLocalUser } from '../models/user';
import Note, { INote } from '../../models/note';
import { isLocalUser } from '../../models/user';
/**
* 稿

View file

@ -1,6 +1,6 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import DriveFile, { IDriveFile } from '../models/drive-file';
import DriveFile, { IDriveFile } from '../../models/drive-file';
/**
*

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import Following from '../models/following';
import { IUser, isLocalUser } from '../models/user';
import Following from '../../models/following';
import { IUser, isLocalUser } from '../../models/user';
/**
*

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import Note, { INote } from '../models/note';
import { IUser } from '../models/user';
import Note, { INote } from '../../models/note';
import { IUser } from '../../models/user';
/**
* 稿

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Chart from './';
import { IUser, isLocalUser } from '../models/user';
import { INote } from '../models/note';
import { IUser, isLocalUser } from '../../models/user';
import { INote } from '../../models/note';
/**
*

View file

@ -1,6 +1,6 @@
import autobind from 'autobind-decorator';
import Chart, { Obj } from './';
import User, { IUser, isLocalUser } from '../models/user';
import User, { IUser, isLocalUser } from '../../models/user';
/**
*

View file

@ -18,8 +18,8 @@ import delFile from './delete-file';
import config from '../../config';
import { getDriveFileWebpublicBucket } from '../../models/drive-file-webpublic';
import { getDriveFileThumbnailBucket } from '../../models/drive-file-thumbnail';
import driveChart from '../../chart/drive';
import perUserDriveChart from '../../chart/per-user-drive';
import driveChart from '../../services/chart/drive';
import perUserDriveChart from '../../services/chart/per-user-drive';
import fetchMeta from '../../misc/fetch-meta';
import { GenerateVideoThumbnail } from './generate-video-thumbnail';
import { driveLogger } from './logger';

View file

@ -2,8 +2,8 @@ import * as Minio from 'minio';
import DriveFile, { DriveFileChunk, IDriveFile } from '../../models/drive-file';
import DriveFileThumbnail, { DriveFileThumbnailChunk } from '../../models/drive-file-thumbnail';
import config from '../../config';
import driveChart from '../../chart/drive';
import perUserDriveChart from '../../chart/per-user-drive';
import driveChart from '../../services/chart/drive';
import perUserDriveChart from '../../services/chart/per-user-drive';
import DriveFileWebpublic, { DriveFileWebpublicChunk } from '../../models/drive-file-webpublic';
export default async function(file: IDriveFile, isExpired = false) {

View file

@ -9,7 +9,7 @@ import renderAccept from '../../remote/activitypub/renderer/accept';
import renderReject from '../../remote/activitypub/renderer/reject';
import { deliver } from '../../queue';
import createFollowRequest from './requests/create';
import perUserFollowingChart from '../../chart/per-user-following';
import perUserFollowingChart from '../../services/chart/per-user-following';
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc';
import Instance from '../../models/instance';

View file

@ -5,7 +5,7 @@ import { renderActivity } from '../../remote/activitypub/renderer';
import renderFollow from '../../remote/activitypub/renderer/follow';
import renderUndo from '../../remote/activitypub/renderer/undo';
import { deliver } from '../../queue';
import perUserFollowingChart from '../../chart/per-user-following';
import perUserFollowingChart from '../../services/chart/per-user-following';
import Logger from '../../misc/logger';
const logger = new Logger('following/delete');

View file

@ -6,7 +6,7 @@ import renderAccept from '../../../remote/activitypub/renderer/accept';
import { deliver } from '../../../queue';
import Following from '../../../models/following';
import { publishMainStream } from '../../stream';
import perUserFollowingChart from '../../../chart/per-user-following';
import perUserFollowingChart from '../../../services/chart/per-user-following';
import Logger from '../../../misc/logger';
const logger = new Logger('following/requests/accept');

View file

@ -21,9 +21,9 @@ import Meta from '../../models/meta';
import config from '../../config';
import registerHashtag from '../register-hashtag';
import isQuote from '../../misc/is-quote';
import notesChart from '../../chart/notes';
import perUserNotesChart from '../../chart/per-user-notes';
import activeUsersChart from '../../chart/active-users';
import notesChart from '../../services/chart/notes';
import perUserNotesChart from '../../services/chart/per-user-notes';
import activeUsersChart from '../../services/chart/active-users';
import { erase, concat } from '../../prelude/array';
import insertNoteUnread from './unread';

View file

@ -6,8 +6,8 @@ import { renderActivity } from '../../remote/activitypub/renderer';
import { deliver } from '../../queue';
import Following from '../../models/following';
import renderTombstone from '../../remote/activitypub/renderer/tombstone';
import notesChart from '../../chart/notes';
import perUserNotesChart from '../../chart/per-user-notes';
import notesChart from '../../services/chart/notes';
import perUserNotesChart from '../../services/chart/per-user-notes';
import config from '../../config';
import NoteUnread from '../../models/note-unread';
import read from './read';

View file

@ -8,7 +8,7 @@ import watch from '../watch';
import renderLike from '../../../remote/activitypub/renderer/like';
import { deliver } from '../../../queue';
import { renderActivity } from '../../../remote/activitypub/renderer';
import perUserReactionsChart from '../../../chart/per-user-reactions';
import perUserReactionsChart from '../../../services/chart/per-user-reactions';
export default async (user: IUser, note: INote, reaction: string) => new Promise(async (res, rej) => {
// Myself

View file

@ -1,6 +1,6 @@
import { IUser } from '../models/user';
import Hashtag from '../models/hashtag';
import hashtagChart from '../chart/hashtag';
import hashtagChart from '../services/chart/hashtag';
export default async function(user: IUser, tag: string) {
tag = tag.toLowerCase();

View file

@ -1,5 +1,5 @@
import Instance, { IInstance } from '../models/instance';
import federationChart from '../chart/federation';
import federationChart from '../services/chart/federation';
export async function registerOrFetchInstanceDoc(host: string): Promise<IInstance> {
if (host == null) return null;