mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 02:13:09 +02:00
refactor: use path alias to improve readability
This commit is contained in:
parent
6d881d4570
commit
97f2675d40
55 changed files with 92 additions and 92 deletions
|
@ -7,7 +7,7 @@ import { getConnection } from 'typeorm';
|
||||||
import Logger from '@/services/logger';
|
import Logger from '@/services/logger';
|
||||||
import loadConfig from '@/config/load';
|
import loadConfig from '@/config/load';
|
||||||
import { Config } from '@/config/types';
|
import { Config } from '@/config/types';
|
||||||
import { lessThan } from '../prelude/array';
|
import { lessThan } from '@/prelude/array';
|
||||||
import { program } from '../argv';
|
import { program } from '../argv';
|
||||||
import { showMachineInfo } from '@/misc/show-machine-info';
|
import { showMachineInfo } from '@/misc/show-machine-info';
|
||||||
import { initDb } from '../db/postgre';
|
import { initDb } from '../db/postgre';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { count, concat } from '../../prelude/array';
|
import { count, concat } from '@/prelude/array';
|
||||||
|
|
||||||
// MISSKEY REVERSI ENGINE
|
// MISSKEY REVERSI ENGINE
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { JSDOM } from 'jsdom';
|
import { JSDOM } from 'jsdom';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import { intersperse } from '../prelude/array';
|
import { intersperse } from '@/prelude/array';
|
||||||
import { IMentionedRemoteUsers } from '@/models/entities/note';
|
import { IMentionedRemoteUsers } from '@/models/entities/note';
|
||||||
import { wellKnownServices } from '../well-known-services';
|
import { wellKnownServices } from '../well-known-services';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { AbuseUserReport } from '../entities/abuse-user-report';
|
import { AbuseUserReport } from '@/models/entities/abuse-user-report';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
|
|
||||||
@EntityRepository(AbuseUserReport)
|
@EntityRepository(AbuseUserReport)
|
||||||
export class AbuseUserReportRepository extends Repository<AbuseUserReport> {
|
export class AbuseUserReportRepository extends Repository<AbuseUserReport> {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Antenna } from '../entities/antenna';
|
import { Antenna } from '@/models/entities/antenna';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { AntennaNotes, UserGroupJoinings } from '../index';
|
import { AntennaNotes, UserGroupJoinings } from '../index';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { App } from '../entities/app';
|
import { App } from '@/models/entities/app';
|
||||||
import { AccessTokens } from '../index';
|
import { AccessTokens } from '../index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Apps } from '../index';
|
import { Apps } from '../index';
|
||||||
import { AuthSession } from '../entities/auth-session';
|
import { AuthSession } from '@/models/entities/auth-session';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
@EntityRepository(AuthSession)
|
@EntityRepository(AuthSession)
|
||||||
export class AuthSessionRepository extends Repository<AuthSession> {
|
export class AuthSessionRepository extends Repository<AuthSession> {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { Blocking } from '../entities/blocking';
|
import { Blocking } from '@/models/entities/blocking';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export type PackedBlocking = SchemaType<typeof packedBlockingSchema>;
|
export type PackedBlocking = SchemaType<typeof packedBlockingSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Channel } from '../entities/channel';
|
import { Channel } from '@/models/entities/channel';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { DriveFiles, ChannelFollowings, NoteUnreads } from '../index';
|
import { DriveFiles, ChannelFollowings, NoteUnreads } from '../index';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export type PackedChannel = SchemaType<typeof packedChannelSchema>;
|
export type PackedChannel = SchemaType<typeof packedChannelSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Clip } from '../entities/clip';
|
import { Clip } from '@/models/entities/clip';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
|
|
||||||
export type PackedClip = SchemaType<typeof packedClipSchema>;
|
export type PackedClip = SchemaType<typeof packedClipSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { DriveFile } from '../entities/drive-file';
|
import { DriveFile } from '@/models/entities/drive-file';
|
||||||
import { Users, DriveFolders } from '../index';
|
import { Users, DriveFolders } from '../index';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
import { toPuny } from '@/misc/convert-host';
|
import { toPuny } from '@/misc/convert-host';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import { query, appendQuery } from '../../prelude/url';
|
import { query, appendQuery } from '@/prelude/url';
|
||||||
import { Meta } from '../entities/meta';
|
import { Meta } from '@/models/entities/meta';
|
||||||
import { fetchMeta } from '@/misc/fetch-meta';
|
import { fetchMeta } from '@/misc/fetch-meta';
|
||||||
|
|
||||||
export type PackedDriveFile = SchemaType<typeof packedDriveFileSchema>;
|
export type PackedDriveFile = SchemaType<typeof packedDriveFileSchema>;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { DriveFolders, DriveFiles } from '../index';
|
import { DriveFolders, DriveFiles } from '../index';
|
||||||
import { DriveFolder } from '../entities/drive-folder';
|
import { DriveFolder } from '@/models/entities/drive-folder';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
|
|
||||||
export type PackedDriveFolder = SchemaType<typeof packedDriveFolderSchema>;
|
export type PackedDriveFolder = SchemaType<typeof packedDriveFolderSchema>;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Emoji } from '../entities/emoji';
|
import { Emoji } from '@/models/entities/emoji';
|
||||||
|
|
||||||
@EntityRepository(Emoji)
|
@EntityRepository(Emoji)
|
||||||
export class EmojiRepository extends Repository<Emoji> {
|
export class EmojiRepository extends Repository<Emoji> {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { FollowRequest } from '../entities/follow-request';
|
import { FollowRequest } from '@/models/entities/follow-request';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
@EntityRepository(FollowRequest)
|
@EntityRepository(FollowRequest)
|
||||||
export class FollowRequestRepository extends Repository<FollowRequest> {
|
export class FollowRequestRepository extends Repository<FollowRequest> {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { Following } from '../entities/following';
|
import { Following } from '@/models/entities/following';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
type LocalFollowerFollowing = Following & {
|
type LocalFollowerFollowing = Following & {
|
||||||
followerHost: null;
|
followerHost: null;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { GalleryLike } from '../entities/gallery-like';
|
import { GalleryLike } from '@/models/entities/gallery-like';
|
||||||
import { GalleryPosts } from '../index';
|
import { GalleryPosts } from '../index';
|
||||||
|
|
||||||
@EntityRepository(GalleryLike)
|
@EntityRepository(GalleryLike)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { GalleryPost } from '../entities/gallery-post';
|
import { GalleryPost } from '@/models/entities/gallery-post';
|
||||||
import { SchemaType } from '../../misc/schema';
|
import { SchemaType } from '../../misc/schema';
|
||||||
import { Users, DriveFiles, GalleryLikes } from '../index';
|
import { Users, DriveFiles, GalleryLikes } from '../index';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export type PackedGalleryPost = SchemaType<typeof packedGalleryPostSchema>;
|
export type PackedGalleryPost = SchemaType<typeof packedGalleryPostSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { User } from '@/models/entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Users } from '../../../index';
|
import { Users } from '../../../index';
|
||||||
import { ReversiGame } from '../../../entities/games/reversi/game';
|
import { ReversiGame } from '@/models/entities/games/reversi/game';
|
||||||
|
|
||||||
@EntityRepository(ReversiGame)
|
@EntityRepository(ReversiGame)
|
||||||
export class ReversiGameRepository extends Repository<ReversiGame> {
|
export class ReversiGameRepository extends Repository<ReversiGame> {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { ReversiMatching } from '../../../entities/games/reversi/matching';
|
import { ReversiMatching } from '@/models/entities/games/reversi/matching';
|
||||||
import { Users } from '../../../index';
|
import { Users } from '../../../index';
|
||||||
import { awaitAll } from '../../../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { User } from '@/models/entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
@EntityRepository(ReversiMatching)
|
@EntityRepository(ReversiMatching)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Hashtag } from '../entities/hashtag';
|
import { Hashtag } from '@/models/entities/hashtag';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
|
|
||||||
export type PackedHashtag = SchemaType<typeof packedHashtagSchema>;
|
export type PackedHashtag = SchemaType<typeof packedHashtagSchema>;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { MessagingMessage } from '../entities/messaging-message';
|
import { MessagingMessage } from '@/models/entities/messaging-message';
|
||||||
import { Users, DriveFiles, UserGroups } from '../index';
|
import { Users, DriveFiles, UserGroups } from '../index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export type PackedMessagingMessage = SchemaType<typeof packedMessagingMessageSchema>;
|
export type PackedMessagingMessage = SchemaType<typeof packedMessagingMessageSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { ModerationLog } from '../entities/moderation-log';
|
import { ModerationLog } from '@/models/entities/moderation-log';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
|
|
||||||
@EntityRepository(ModerationLog)
|
@EntityRepository(ModerationLog)
|
||||||
export class ModerationLogRepository extends Repository<ModerationLog> {
|
export class ModerationLogRepository extends Repository<ModerationLog> {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { Muting } from '../entities/muting';
|
import { Muting } from '@/models/entities/muting';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export type PackedMuting = SchemaType<typeof packedMutingSchema>;
|
export type PackedMuting = SchemaType<typeof packedMutingSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { NoteFavorite } from '../entities/note-favorite';
|
import { NoteFavorite } from '@/models/entities/note-favorite';
|
||||||
import { Notes } from '../index';
|
import { Notes } from '../index';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
@EntityRepository(NoteFavorite)
|
@EntityRepository(NoteFavorite)
|
||||||
export class NoteFavoriteRepository extends Repository<NoteFavorite> {
|
export class NoteFavoriteRepository extends Repository<NoteFavorite> {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { NoteReaction } from '../entities/note-reaction';
|
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||||
import { Users } from '../index';
|
import { Users } from '../index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { convertLegacyReaction } from '@/misc/reaction-lib';
|
import { convertLegacyReaction } from '@/misc/reaction-lib';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export type PackedNoteReaction = SchemaType<typeof packedNoteReactionSchema>;
|
export type PackedNoteReaction = SchemaType<typeof packedNoteReactionSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { EntityRepository, Repository, In } from 'typeorm';
|
import { EntityRepository, Repository, In } from 'typeorm';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import { Note } from '../entities/note';
|
import { Note } from '@/models/entities/note';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index';
|
import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { nyaize } from '@/misc/nyaize';
|
import { nyaize } from '@/misc/nyaize';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib';
|
import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib';
|
||||||
import { NoteReaction } from '../entities/note-reaction';
|
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||||
import { aggregateNoteEmojis, populateEmojis, prefetchEmojis } from '@/misc/populate-emojis';
|
import { aggregateNoteEmojis, populateEmojis, prefetchEmojis } from '@/misc/populate-emojis';
|
||||||
|
|
||||||
export type PackedNote = SchemaType<typeof packedNoteSchema>;
|
export type PackedNote = SchemaType<typeof packedNoteSchema>;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { EntityRepository, In, Repository } from 'typeorm';
|
import { EntityRepository, In, Repository } from 'typeorm';
|
||||||
import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '../index';
|
import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '../index';
|
||||||
import { Notification } from '../entities/notification';
|
import { Notification } from '@/models/entities/notification';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { Note } from '../entities/note';
|
import { Note } from '@/models/entities/note';
|
||||||
import { NoteReaction } from '../entities/note-reaction';
|
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis';
|
import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis';
|
||||||
|
|
||||||
export type PackedNotification = SchemaType<typeof packedNotificationSchema>;
|
export type PackedNotification = SchemaType<typeof packedNotificationSchema>;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { PageLike } from '../entities/page-like';
|
import { PageLike } from '@/models/entities/page-like';
|
||||||
import { Pages } from '../index';
|
import { Pages } from '../index';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
@EntityRepository(PageLike)
|
@EntityRepository(PageLike)
|
||||||
export class PageLikeRepository extends Repository<PageLike> {
|
export class PageLikeRepository extends Repository<PageLike> {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Page } from '../entities/page';
|
import { Page } from '@/models/entities/page';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { Users, DriveFiles, PageLikes } from '../index';
|
import { Users, DriveFiles, PageLikes } from '../index';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { DriveFile } from '../entities/drive-file';
|
import { DriveFile } from '@/models/entities/drive-file';
|
||||||
import { User } from '../entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export type PackedPage = SchemaType<typeof packedPageSchema>;
|
export type PackedPage = SchemaType<typeof packedPageSchema>;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Relay } from '../entities/relay';
|
import { Relay } from '@/models/entities/relay';
|
||||||
|
|
||||||
@EntityRepository(Relay)
|
@EntityRepository(Relay)
|
||||||
export class RelayRepository extends Repository<Relay> {
|
export class RelayRepository extends Repository<Relay> {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Signin } from '../entities/signin';
|
import { Signin } from '@/models/entities/signin';
|
||||||
|
|
||||||
@EntityRepository(Signin)
|
@EntityRepository(Signin)
|
||||||
export class SigninRepository extends Repository<Signin> {
|
export class SigninRepository extends Repository<Signin> {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { UserGroupInvitation } from '../entities/user-group-invitation';
|
import { UserGroupInvitation } from '@/models/entities/user-group-invitation';
|
||||||
import { UserGroups } from '../index';
|
import { UserGroups } from '../index';
|
||||||
|
|
||||||
@EntityRepository(UserGroupInvitation)
|
@EntityRepository(UserGroupInvitation)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { UserGroup } from '../entities/user-group';
|
import { UserGroup } from '@/models/entities/user-group';
|
||||||
import { UserGroupJoinings } from '../index';
|
import { UserGroupJoinings } from '../index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { UserList } from '../entities/user-list';
|
import { UserList } from '@/models/entities/user-list';
|
||||||
import { UserListJoinings } from '../index';
|
import { UserListJoinings } from '../index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import { EntityRepository, Repository, In, Not } from 'typeorm';
|
import { EntityRepository, Repository, In, Not } from 'typeorm';
|
||||||
import { User, ILocalUser, IRemoteUser } from '../entities/user';
|
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user';
|
||||||
import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index';
|
import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { SchemaType } from '@/misc/schema';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { populateEmojis } from '@/misc/populate-emojis';
|
import { populateEmojis } from '@/misc/populate-emojis';
|
||||||
import { getAntennas } from '@/misc/antenna-cache';
|
import { getAntennas } from '@/misc/antenna-cache';
|
||||||
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const';
|
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ApObject, getApIds } from './type';
|
import { ApObject, getApIds } from './type';
|
||||||
import Resolver from './resolver';
|
import Resolver from './resolver';
|
||||||
import { resolvePerson } from './models/person';
|
import { resolvePerson } from './models/person';
|
||||||
import { unique, concat } from '../../prelude/array';
|
import { unique, concat } from '@/prelude/array';
|
||||||
import * as promiseLimit from 'promise-limit';
|
import * as promiseLimit from 'promise-limit';
|
||||||
import { User, IRemoteUser } from '@/models/entities/user';
|
import { User, IRemoteUser } from '@/models/entities/user';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { IRemoteUser } from '@/models/entities/user';
|
||||||
import createNote from './note';
|
import createNote from './note';
|
||||||
import { ICreate, getApId, isPost, getApType } from '../../type';
|
import { ICreate, getApId, isPost, getApType } from '../../type';
|
||||||
import { apLogger } from '../../logger';
|
import { apLogger } from '../../logger';
|
||||||
import { toArray, concat, unique } from '../../../../prelude/array';
|
import { toArray, concat, unique } from '@/prelude/array';
|
||||||
|
|
||||||
const logger = apLogger;
|
const logger = apLogger;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import deleteNote from './note';
|
import deleteNote from './note';
|
||||||
import { IRemoteUser } from '@/models/entities/user';
|
import { IRemoteUser } from '@/models/entities/user';
|
||||||
import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type';
|
import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type';
|
||||||
import { toSingle } from '../../../../prelude/array';
|
import { toSingle } from '@/prelude/array';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 削除アクティビティを捌きます
|
* 削除アクティビティを捌きます
|
||||||
|
|
|
@ -16,7 +16,7 @@ import block from './block/index';
|
||||||
import flag from './flag/index';
|
import flag from './flag/index';
|
||||||
import { apLogger } from '../logger';
|
import { apLogger } from '../logger';
|
||||||
import Resolver from '../resolver';
|
import Resolver from '../resolver';
|
||||||
import { toArray } from '../../../prelude/array';
|
import { toArray } from '@/prelude/array';
|
||||||
|
|
||||||
export async function performActivity(actor: IRemoteUser, activity: IObject) {
|
export async function performActivity(actor: IRemoteUser, activity: IObject) {
|
||||||
if (isCollectionOrOrderedCollection(activity)) {
|
if (isCollectionOrOrderedCollection(activity)) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { toArray, unique } from '../../../prelude/array';
|
import { toArray, unique } from '@/prelude/array';
|
||||||
import { IObject, isMention, IApMention } from '../type';
|
import { IObject, isMention, IApMention } from '../type';
|
||||||
import { resolvePerson } from './person';
|
import { resolvePerson } from './person';
|
||||||
import * as promiseLimit from 'promise-limit';
|
import * as promiseLimit from 'promise-limit';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { resolveImage } from './image';
|
||||||
import { IRemoteUser } from '@/models/entities/user';
|
import { IRemoteUser } from '@/models/entities/user';
|
||||||
import { htmlToMfm } from '../misc/html-to-mfm';
|
import { htmlToMfm } from '../misc/html-to-mfm';
|
||||||
import { extractApHashtags } from './tag';
|
import { extractApHashtags } from './tag';
|
||||||
import { unique, toArray, toSingle } from '../../../prelude/array';
|
import { unique, toArray, toSingle } from '@/prelude/array';
|
||||||
import { extractPollFromQuestion } from './question';
|
import { extractPollFromQuestion } from './question';
|
||||||
import vote from '@/services/note/polls/vote';
|
import vote from '@/services/note/polls/vote';
|
||||||
import { apLogger } from '../logger';
|
import { apLogger } from '../logger';
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
|
||||||
import { toPuny } from '@/misc/convert-host';
|
import { toPuny } from '@/misc/convert-host';
|
||||||
import { UserProfile } from '@/models/entities/user-profile';
|
import { UserProfile } from '@/models/entities/user-profile';
|
||||||
import { getConnection } from 'typeorm';
|
import { getConnection } from 'typeorm';
|
||||||
import { toArray } from '../../../prelude/array';
|
import { toArray } from '@/prelude/array';
|
||||||
import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata';
|
import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata';
|
||||||
import { normalizeForSearch } from '@/misc/normalize-for-search';
|
import { normalizeForSearch } from '@/misc/normalize-for-search';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { toArray } from '../../../prelude/array';
|
import { toArray } from '@/prelude/array';
|
||||||
import { IObject, isHashtag, IApHashtag } from '../type';
|
import { IObject, isHashtag, IApHashtag } from '../type';
|
||||||
|
|
||||||
export function extractApHashtags(tags: IObject | IObject[] | null | undefined) {
|
export function extractApHashtags(tags: IObject | IObject[] | null | undefined) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
import { getJson } from '@/misc/fetch';
|
import { getJson } from '@/misc/fetch';
|
||||||
import { query as urlQuery } from '../prelude/url';
|
import { query as urlQuery } from '@/prelude/url';
|
||||||
|
|
||||||
type ILink = {
|
type ILink = {
|
||||||
href: string;
|
href: string;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import * as Router from '@koa/router';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import { ID } from '@/misc/cafy-id';
|
import { ID } from '@/misc/cafy-id';
|
||||||
import * as url from '../../prelude/url';
|
import * as url from '@/prelude/url';
|
||||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||||
import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection';
|
import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection';
|
||||||
import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page';
|
import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import * as Router from '@koa/router';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import { ID } from '@/misc/cafy-id';
|
import { ID } from '@/misc/cafy-id';
|
||||||
import * as url from '../../prelude/url';
|
import * as url from '@/prelude/url';
|
||||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||||
import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection';
|
import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection';
|
||||||
import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page';
|
import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page';
|
||||||
|
|
|
@ -9,8 +9,8 @@ import { setResponseType } from '../activitypub';
|
||||||
import renderNote from '@/remote/activitypub/renderer/note';
|
import renderNote from '@/remote/activitypub/renderer/note';
|
||||||
import renderCreate from '@/remote/activitypub/renderer/create';
|
import renderCreate from '@/remote/activitypub/renderer/create';
|
||||||
import renderAnnounce from '@/remote/activitypub/renderer/announce';
|
import renderAnnounce from '@/remote/activitypub/renderer/announce';
|
||||||
import { countIf } from '../../prelude/array';
|
import { countIf } from '@/prelude/array';
|
||||||
import * as url from '../../prelude/url';
|
import * as url from '@/prelude/url';
|
||||||
import { Users, Notes } from '@/models/index';
|
import { Users, Notes } from '@/models/index';
|
||||||
import { makePaginationQuery } from '../api/common/make-pagination-query';
|
import { makePaginationQuery } from '../api/common/make-pagination-query';
|
||||||
import { Brackets } from 'typeorm';
|
import { Brackets } from 'typeorm';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { MessagingMessages, UserGroupJoinings, Users } from '@/models/index';
|
||||||
import { In } from 'typeorm';
|
import { In } from 'typeorm';
|
||||||
import { IdentifiableError } from '@/misc/identifiable-error';
|
import { IdentifiableError } from '@/misc/identifiable-error';
|
||||||
import { UserGroup } from '@/models/entities/user-group';
|
import { UserGroup } from '@/models/entities/user-group';
|
||||||
import { toArray } from '../../../prelude/array';
|
import { toArray } from '@/prelude/array';
|
||||||
import { renderReadActivity } from '@/remote/activitypub/renderer/read';
|
import { renderReadActivity } from '@/remote/activitypub/renderer/read';
|
||||||
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||||
import { deliver } from '@/queue/index';
|
import { deliver } from '@/queue/index';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import $ from 'cafy';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
import { Apps } from '@/models/index';
|
import { Apps } from '@/models/index';
|
||||||
import { genId } from '@/misc/gen-id';
|
import { genId } from '@/misc/gen-id';
|
||||||
import { unique } from '../../../../prelude/array';
|
import { unique } from '@/prelude/array';
|
||||||
import { secureRndstr } from '@/misc/secure-rndstr';
|
import { secureRndstr } from '@/misc/secure-rndstr';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import { ID } from '@/misc/cafy-id';
|
import { ID } from '@/misc/cafy-id';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
import { maximum } from '../../../../prelude/array';
|
import { maximum } from '@/prelude/array';
|
||||||
import { ApiError } from '../../error';
|
import { ApiError } from '../../error';
|
||||||
import { getUser } from '../../common/getters';
|
import { getUser } from '../../common/getters';
|
||||||
import { Not, In, IsNull } from 'typeorm';
|
import { Not, In, IsNull } from 'typeorm';
|
||||||
|
|
|
@ -18,7 +18,7 @@ import nodeinfo from './nodeinfo';
|
||||||
import wellKnown from './well-known';
|
import wellKnown from './well-known';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import apiServer from './api/index';
|
import apiServer from './api/index';
|
||||||
import { sum } from '../prelude/array';
|
import { sum } from '@/prelude/array';
|
||||||
import Logger from '@/services/logger';
|
import Logger from '@/services/logger';
|
||||||
import { program } from '../argv';
|
import { program } from '../argv';
|
||||||
import { UserProfiles, Users } from '@/models/index';
|
import { UserProfiles, Users } from '@/models/index';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import summaly from 'summaly';
|
||||||
import { fetchMeta } from '@/misc/fetch-meta';
|
import { fetchMeta } from '@/misc/fetch-meta';
|
||||||
import Logger from '@/services/logger';
|
import Logger from '@/services/logger';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import { query } from '../../prelude/url';
|
import { query } from '@/prelude/url';
|
||||||
import { getJson } from '@/misc/fetch';
|
import { getJson } from '@/misc/fetch';
|
||||||
|
|
||||||
const logger = new Logger('url-preview');
|
const logger = new Logger('url-preview');
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as Router from '@koa/router';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import { parseAcct, Acct } from '@/misc/acct';
|
import { parseAcct, Acct } from '@/misc/acct';
|
||||||
import { links } from './nodeinfo';
|
import { links } from './nodeinfo';
|
||||||
import { escapeAttribute, escapeValue } from '../prelude/xml';
|
import { escapeAttribute, escapeValue } from '@/prelude/xml';
|
||||||
import { Users } from '@/models/index';
|
import { Users } from '@/models/index';
|
||||||
import { User } from '@/models/entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import autobind from 'autobind-decorator';
|
||||||
import Logger from '../logger';
|
import Logger from '../logger';
|
||||||
import { Schema } from '@/misc/schema';
|
import { Schema } from '@/misc/schema';
|
||||||
import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm';
|
import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm';
|
||||||
import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time';
|
import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '@/prelude/time';
|
||||||
import { getChartInsertLock } from '@/misc/app-lock';
|
import { getChartInsertLock } from '@/misc/app-lock';
|
||||||
|
|
||||||
const logger = new Logger('chart', 'white', process.env.NODE_ENV !== 'test');
|
const logger = new Logger('chart', 'white', process.env.NODE_ENV !== 'test');
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { renderActivity } from '@/remote/activitypub/renderer/index';
|
||||||
import { resolveUser } from '@/remote/resolve-user';
|
import { resolveUser } from '@/remote/resolve-user';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import { updateHashtags } from '../update-hashtag';
|
import { updateHashtags } from '../update-hashtag';
|
||||||
import { concat } from '../../prelude/array';
|
import { concat } from '@/prelude/array';
|
||||||
import insertNoteUnread from './unread';
|
import insertNoteUnread from './unread';
|
||||||
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc';
|
import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc';
|
||||||
import { extractMentions } from '@/misc/extract-mentions';
|
import { extractMentions } from '@/misc/extract-mentions';
|
||||||
|
|
Loading…
Reference in a new issue