refactor: use path alias to improve readability

This commit is contained in:
syuilo
2021-08-19 22:04:15 +09:00
parent 6d881d4570
commit 97f2675d40
55 changed files with 92 additions and 92 deletions

View File

@ -1,7 +1,7 @@
import { ApObject, getApIds } from './type';
import Resolver from './resolver';
import { resolvePerson } from './models/person';
import { unique, concat } from '../../prelude/array';
import { unique, concat } from '@/prelude/array';
import * as promiseLimit from 'promise-limit';
import { User, IRemoteUser } from '@/models/entities/user';

View File

@ -3,7 +3,7 @@ import { IRemoteUser } from '@/models/entities/user';
import createNote from './note';
import { ICreate, getApId, isPost, getApType } from '../../type';
import { apLogger } from '../../logger';
import { toArray, concat, unique } from '../../../../prelude/array';
import { toArray, concat, unique } from '@/prelude/array';
const logger = apLogger;

View File

@ -1,7 +1,7 @@
import deleteNote from './note';
import { IRemoteUser } from '@/models/entities/user';
import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type';
import { toSingle } from '../../../../prelude/array';
import { toSingle } from '@/prelude/array';
/**
* 削除アクティビティを捌きます

View File

@ -16,7 +16,7 @@ import block from './block/index';
import flag from './flag/index';
import { apLogger } from '../logger';
import Resolver from '../resolver';
import { toArray } from '../../../prelude/array';
import { toArray } from '@/prelude/array';
export async function performActivity(actor: IRemoteUser, activity: IObject) {
if (isCollectionOrOrderedCollection(activity)) {

View File

@ -1,4 +1,4 @@
import { toArray, unique } from '../../../prelude/array';
import { toArray, unique } from '@/prelude/array';
import { IObject, isMention, IApMention } from '../type';
import { resolvePerson } from './person';
import * as promiseLimit from 'promise-limit';

View File

@ -8,7 +8,7 @@ import { resolveImage } from './image';
import { IRemoteUser } from '@/models/entities/user';
import { htmlToMfm } from '../misc/html-to-mfm';
import { extractApHashtags } from './tag';
import { unique, toArray, toSingle } from '../../../prelude/array';
import { unique, toArray, toSingle } from '@/prelude/array';
import { extractPollFromQuestion } from './question';
import vote from '@/services/note/polls/vote';
import { apLogger } from '../logger';

View File

@ -25,7 +25,7 @@ import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error';
import { toPuny } from '@/misc/convert-host';
import { UserProfile } from '@/models/entities/user-profile';
import { getConnection } from 'typeorm';
import { toArray } from '../../../prelude/array';
import { toArray } from '@/prelude/array';
import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata';
import { normalizeForSearch } from '@/misc/normalize-for-search';

View File

@ -1,4 +1,4 @@
import { toArray } from '../../../prelude/array';
import { toArray } from '@/prelude/array';
import { IObject, isHashtag, IApHashtag } from '../type';
export function extractApHashtags(tags: IObject | IObject[] | null | undefined) {

View File

@ -1,6 +1,6 @@
import { URL } from 'url';
import { getJson } from '@/misc/fetch';
import { query as urlQuery } from '../prelude/url';
import { query as urlQuery } from '@/prelude/url';
type ILink = {
href: string;