mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 04:03:49 +01:00
Refactoring: Move chart dir into services dir
This commit is contained in:
parent
dd0871dd59
commit
308bcef08a
@ -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';
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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',
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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) {
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
* アクティブユーザーに関するチャート
|
@ -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';
|
||||
|
||||
/**
|
||||
* ドライブに関するチャート
|
@ -1,6 +1,6 @@
|
||||
import autobind from 'autobind-decorator';
|
||||
import Chart, { Obj } from '.';
|
||||
import Instance from '../models/instance';
|
||||
import Instance from '../../models/instance';
|
||||
|
||||
/**
|
||||
* フェデレーションに関するチャート
|
@ -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';
|
||||
|
||||
/**
|
||||
* ハッシュタグに関するチャート
|
@ -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');
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
* 投稿に関するチャート
|
@ -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';
|
||||
|
||||
/**
|
||||
* ユーザーごとのドライブに関するチャート
|
@ -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';
|
||||
|
||||
/**
|
||||
* ユーザーごとのフォローに関するチャート
|
@ -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';
|
||||
|
||||
/**
|
||||
* ユーザーごとの投稿に関するチャート
|
@ -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';
|
||||
|
||||
/**
|
||||
* ユーザーごとのリアクションに関するチャート
|
@ -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';
|
||||
|
||||
/**
|
||||
* ユーザーに関するチャート
|
@ -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';
|
||||
|
@ -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) {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user