Compare commits

...

3 Commits

Author SHA1 Message Date
Acid Chicken (硫酸鶏) bfde75dae6
Fix aliases 2019-08-11 08:51:53 +09:00
Acid Chicken (硫酸鶏) 1dc433b292
Apply aliasing in resolving module 2019-08-11 08:51:41 +09:00
Acid Chicken (硫酸鶏) 3eef84583d
Use `~` instead of `..` in resolving paths 2019-08-10 08:23:41 +09:00
499 changed files with 2094 additions and 2075 deletions

View File

@ -1 +1,2 @@
require('module-alias/register');
require('./built').default();

View File

@ -25,6 +25,11 @@
"test": "gulp test",
"format": "gulp format"
},
"_moduleAliases": {
"package.json": "package.json",
"~": "built",
"$": "locales"
},
"resolutions": {
"gulp-cssnano/cssnano/postcss-svgo/svgo/js-yaml": "^3.13.1",
"lodash": "^4.17.13"
@ -173,6 +178,7 @@
"lolex": "4.1.0",
"lookup-dns-cache": "2.1.0",
"mocha": "6.2.0",
"module-alias": "2.2.1",
"moji": "0.5.1",
"ms": "2.1.2",
"nested-property": "1.0.1",

View File

@ -1,4 +1,4 @@
declare module '*/package.json' {
declare module 'package.json' {
interface IRepository {
type: string;
url: string;

View File

@ -1,5 +1,5 @@
import * as program from 'commander';
import * as pkg from '../package.json';
import * as pkg from 'package.json';
program
.version(pkg.version)

View File

@ -2,8 +2,8 @@ import * as cluster from 'cluster';
import chalk from 'chalk';
import Xev from 'xev';
import Logger from '../services/logger';
import { program } from '../argv';
import Logger from '~/services/logger';
import { program } from '~/argv';
// for typeorm
import 'reflect-metadata';

View File

@ -4,14 +4,14 @@ import chalk from 'chalk';
import * as portscanner from 'portscanner';
import * as isRoot from 'is-root';
import Logger from '../services/logger';
import loadConfig from '../config/load';
import { Config } from '../config/types';
import { lessThan } from '../prelude/array';
import * as pkg from '../../package.json';
import { program } from '../argv';
import { showMachineInfo } from '../misc/show-machine-info';
import { initDb } from '../db/postgre';
import Logger from '~/services/logger';
import loadConfig from '~/config/load';
import { Config } from '~/config/types';
import { lessThan } from '~/prelude/array';
import * as pkg from 'package.json';
import { program } from '~/argv';
import { showMachineInfo } from '~/misc/show-machine-info';
import { initDb } from '~/db/postgre';
const logger = new Logger('core', 'cyan');
const bootLogger = logger.createSubLogger('boot', 'magenta', false);

View File

@ -1,5 +1,5 @@
import * as cluster from 'cluster';
import { initDb } from '../db/postgre';
import { initDb } from '~/db/postgre';
/**
* Init worker process

View File

@ -5,7 +5,7 @@
import * as fs from 'fs';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
import * as pkg from '../../package.json';
import * as pkg from 'package.json';
/**
* Path of configuration directory

View File

@ -1,5 +1,5 @@
const interval = 30 * 60 * 1000;
import { AttestationChallenges } from '../models';
import { AttestationChallenges } from '~/models';
import { LessThan } from 'typeorm';
/**

View File

@ -1,6 +1,6 @@
import { MoreThanOrEqual, getRepository } from 'typeorm';
import { Note } from '../models/entities/note';
import { initDb } from '../db/postgre';
import { Note } from '~/models/entities/note';
import { initDb } from '~/db/postgre';
const interval = 5000;

View File

@ -1,6 +1,6 @@
import * as Deque from 'double-ended-queue';
import Xev from 'xev';
import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '../queue';
import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '~/queue';
const ev = new Xev();

View File

@ -1,5 +1,5 @@
import * as elasticsearch from '@elastic/elasticsearch';
import config from '../config';
import config from '~/config';
const index = {
settings: {

View File

@ -1,3 +1,3 @@
import Logger from '../services/logger';
import Logger from '~/services/logger';
export const dbLogger = new Logger('db');

View File

@ -1,54 +1,54 @@
import { createConnection, Logger, getConnection } from 'typeorm';
import config from '../config';
import { entities as charts } from '../services/chart/entities';
import config from '~/config';
import { entities as charts } from '~/services/chart/entities';
import { dbLogger } from './logger';
import * as highlight from 'cli-highlight';
import { Log } from '../models/entities/log';
import { User } from '../models/entities/user';
import { DriveFile } from '../models/entities/drive-file';
import { DriveFolder } from '../models/entities/drive-folder';
import { AccessToken } from '../models/entities/access-token';
import { App } from '../models/entities/app';
import { PollVote } from '../models/entities/poll-vote';
import { Note } from '../models/entities/note';
import { NoteReaction } from '../models/entities/note-reaction';
import { NoteWatching } from '../models/entities/note-watching';
import { NoteUnread } from '../models/entities/note-unread';
import { Notification } from '../models/entities/notification';
import { Meta } from '../models/entities/meta';
import { Following } from '../models/entities/following';
import { Instance } from '../models/entities/instance';
import { Muting } from '../models/entities/muting';
import { SwSubscription } from '../models/entities/sw-subscription';
import { Blocking } from '../models/entities/blocking';
import { UserList } from '../models/entities/user-list';
import { UserListJoining } from '../models/entities/user-list-joining';
import { UserGroup } from '../models/entities/user-group';
import { UserGroupJoining } from '../models/entities/user-group-joining';
import { UserGroupInvite } from '../models/entities/user-group-invite';
import { Hashtag } from '../models/entities/hashtag';
import { NoteFavorite } from '../models/entities/note-favorite';
import { AbuseUserReport } from '../models/entities/abuse-user-report';
import { RegistrationTicket } from '../models/entities/registration-tickets';
import { MessagingMessage } from '../models/entities/messaging-message';
import { Signin } from '../models/entities/signin';
import { AuthSession } from '../models/entities/auth-session';
import { FollowRequest } from '../models/entities/follow-request';
import { Emoji } from '../models/entities/emoji';
import { ReversiGame } from '../models/entities/games/reversi/game';
import { ReversiMatching } from '../models/entities/games/reversi/matching';
import { UserNotePining } from '../models/entities/user-note-pinings';
import { Poll } from '../models/entities/poll';
import { UserKeypair } from '../models/entities/user-keypair';
import { UserPublickey } from '../models/entities/user-publickey';
import { UserProfile } from '../models/entities/user-profile';
import { UserSecurityKey } from '../models/entities/user-security-key';
import { AttestationChallenge } from '../models/entities/attestation-challenge';
import { Page } from '../models/entities/page';
import { PageLike } from '../models/entities/page-like';
import { ModerationLog } from '../models/entities/moderation-log';
import { UsedUsername } from '../models/entities/used-username';
import { Log } from '~/models/entities/log';
import { User } from '~/models/entities/user';
import { DriveFile } from '~/models/entities/drive-file';
import { DriveFolder } from '~/models/entities/drive-folder';
import { AccessToken } from '~/models/entities/access-token';
import { App } from '~/models/entities/app';
import { PollVote } from '~/models/entities/poll-vote';
import { Note } from '~/models/entities/note';
import { NoteReaction } from '~/models/entities/note-reaction';
import { NoteWatching } from '~/models/entities/note-watching';
import { NoteUnread } from '~/models/entities/note-unread';
import { Notification } from '~/models/entities/notification';
import { Meta } from '~/models/entities/meta';
import { Following } from '~/models/entities/following';
import { Instance } from '~/models/entities/instance';
import { Muting } from '~/models/entities/muting';
import { SwSubscription } from '~/models/entities/sw-subscription';
import { Blocking } from '~/models/entities/blocking';
import { UserList } from '~/models/entities/user-list';
import { UserListJoining } from '~/models/entities/user-list-joining';
import { UserGroup } from '~/models/entities/user-group';
import { UserGroupJoining } from '~/models/entities/user-group-joining';
import { UserGroupInvite } from '~/models/entities/user-group-invite';
import { Hashtag } from '~/models/entities/hashtag';
import { NoteFavorite } from '~/models/entities/note-favorite';
import { AbuseUserReport } from '~/models/entities/abuse-user-report';
import { RegistrationTicket } from '~/models/entities/registration-tickets';
import { MessagingMessage } from '~/models/entities/messaging-message';
import { Signin } from '~/models/entities/signin';
import { AuthSession } from '~/models/entities/auth-session';
import { FollowRequest } from '~/models/entities/follow-request';
import { Emoji } from '~/models/entities/emoji';
import { ReversiGame } from '~/models/entities/games/reversi/game';
import { ReversiMatching } from '~/models/entities/games/reversi/matching';
import { UserNotePining } from '~/models/entities/user-note-pinings';
import { Poll } from '~/models/entities/poll';
import { UserKeypair } from '~/models/entities/user-keypair';
import { UserPublickey } from '~/models/entities/user-publickey';
import { UserProfile } from '~/models/entities/user-profile';
import { UserSecurityKey } from '~/models/entities/user-security-key';
import { AttestationChallenge } from '~/models/entities/attestation-challenge';
import { Page } from '~/models/entities/page';
import { PageLike } from '~/models/entities/page-like';
import { ModerationLog } from '~/models/entities/moderation-log';
import { UsedUsername } from '~/models/entities/used-username';
const sqlLogger = dbLogger.createSubLogger('sql', 'white', false);

View File

@ -1,5 +1,5 @@
import * as redis from 'redis';
import config from '../config';
import config from '~/config';
export default redis.createClient(
config.redis.port,

View File

@ -1,4 +1,4 @@
import { count, concat } from '../../prelude/array';
import { count, concat } from '~/prelude/array';
// MISSKEY REVERSI ENGINE

View File

@ -6,7 +6,7 @@ Error.stackTraceLimit = Infinity;
require('events').EventEmitter.defaultMaxListeners = 128;
import boot from './boot';
import boot from '~/boot';
export default function() {
return boot();

View File

@ -1,9 +1,9 @@
import * as P from 'parsimmon';
import { createLeaf, createTree, urlRegex } from './prelude';
import { takeWhile, cumulativeSum } from '../prelude/array';
import parseAcct from '../misc/acct/parse';
import { takeWhile, cumulativeSum } from '~/prelude/array';
import parseAcct from '~/misc/acct/parse';
import { toUnicode } from 'punycode';
import { emojiRegex } from '../misc/emoji-regex';
import { emojiRegex } from '~/misc/emoji-regex';
export function removeOrphanedBrackets(s: string): string {
const openBrackets = ['(', '「', '['];

View File

@ -1,7 +1,7 @@
import * as A from '../prelude/array';
import * as S from '../prelude/string';
import * as A from '~/prelude/array';
import * as S from '~/prelude/string';
import { MfmForest, MfmTree } from './prelude';
import { createTree, createLeaf } from '../prelude/tree';
import { createTree, createLeaf } from '~/prelude/tree';
function isEmptyTextTree(t: MfmTree): boolean {
return t.node.type == 'text' && t.node.props.text === '';

View File

@ -1,5 +1,5 @@
import { Tree } from '../prelude/tree';
import * as T from '../prelude/tree';
import { Tree } from '~/prelude/tree';
import * as T from '~/prelude/tree';
type Node<T, P> = { type: T, props: P };

View File

@ -1,8 +1,8 @@
import { JSDOM } from 'jsdom';
import config from '../config';
import { intersperse } from '../prelude/array';
import config from '~/config';
import { intersperse } from '~/prelude/array';
import { MfmForest, MfmTree } from './prelude';
import { IMentionedRemoteUsers } from '../models/entities/note';
import { IMentionedRemoteUsers } from '~/models/entities/note';
export function toHtml(tokens: MfmForest | null, mentionedRemoteUsers: IMentionedRemoteUsers = []) {
if (tokens == null) {

View File

@ -1,4 +1,4 @@
import config from '../config';
import config from '~/config';
import { toASCII } from 'punycode';
export function getFullApAccount(username: string, host: string | null) {

View File

@ -1,6 +1,6 @@
import * as fs from 'fs';
import fileType = require('file-type');
import checkSvg from '../misc/check-svg';
import checkSvg from '~/misc/check-svg';
export async function detectMine(path: string) {
return new Promise<[string, string | null]>((res, rej) => {

View File

@ -1,8 +1,8 @@
import * as fs from 'fs';
import * as request from 'request';
import config from '../config';
import config from '~/config';
import chalk from 'chalk';
import Logger from '../services/logger';
import Logger from '~/services/logger';
export async function downloadUrl(url: string, path: string) {
const logger = new Logger('download');

View File

@ -1,6 +1,6 @@
import * as fs from 'fs';
import * as util from 'util';
import Logger from '../services/logger';
import Logger from '~/services/logger';
import { createTemp } from './create-temp';
import { downloadUrl } from './donwload-url';

View File

@ -1,6 +1,6 @@
import { EmojiNode, MfmForest } from '../mfm/prelude';
import { preorderF } from '../prelude/tree';
import { unique } from '../prelude/array';
import { EmojiNode, MfmForest } from '~/mfm/prelude';
import { preorderF } from '~/prelude/tree';
import { unique } from '~/prelude/array';
export default function(mfmForest: MfmForest): string[] {
const emojiNodes = preorderF(mfmForest).filter(x => x.type === 'emoji') as EmojiNode[];

View File

@ -1,6 +1,6 @@
import { HashtagNode, MfmForest } from '../mfm/prelude';
import { preorderF } from '../prelude/tree';
import { unique } from '../prelude/array';
import { HashtagNode, MfmForest } from '~/mfm/prelude';
import { preorderF } from '~/prelude/tree';
import { unique } from '~/prelude/array';
export default function(mfmForest: MfmForest): string[] {
const hashtagNodes = preorderF(mfmForest).filter(x => x.type === 'hashtag') as HashtagNode[];

View File

@ -1,7 +1,7 @@
// test is located in test/extract-mentions
import { MentionNode, MfmForest } from '../mfm/prelude';
import { preorderF } from '../prelude/tree';
import { MentionNode, MfmForest } from '~/mfm/prelude';
import { preorderF } from '~/prelude/tree';
export default function(mfmForest: MfmForest): MentionNode['props'][] {
// TODO: 重複を削除

View File

@ -1,4 +1,4 @@
import { Meta } from '../models/entities/meta';
import { Meta } from '~/models/entities/meta';
import { getConnection } from 'typeorm';
let cache: Meta;

View File

@ -1,7 +1,7 @@
import { fetchMeta } from './fetch-meta';
import { ILocalUser } from '../models/entities/user';
import { Users } from '../models';
import { ensure } from '../prelude/ensure';
import { ILocalUser } from '~/models/entities/user';
import { Users } from '~/models';
import { ensure } from '~/prelude/ensure';
export async function fetchProxyAccount(): Promise<ILocalUser> {
const meta = await fetchMeta();

View File

@ -3,7 +3,7 @@ import { genAid } from './id/aid';
import { genMeid } from './id/meid';
import { genMeidg } from './id/meidg';
import { genObjectId } from './id/object-id';
import config from '../config';
import config from '~/config';
const metohd = config.id.toLowerCase();

View File

@ -1,4 +1,4 @@
import { User } from '../models/entities/user';
import { User } from '~/models/entities/user';
export default function(user: User): string {
return user.name || user.username;

View File

@ -1,4 +1,4 @@
import { Note } from '../models/entities/note';
import { Note } from '~/models/entities/note';
export default function(note: Note): boolean {
return note.renoteId != null && (note.text != null || note.hasPoll || (note.fileIds != null && note.fileIds.length > 0));

View File

@ -1,6 +1,6 @@
import { emojiRegex } from './emoji-regex';
import { fetchMeta } from './fetch-meta';
import { Emojis } from '../models';
import { Emojis } from '~/models';
const basic10: Record<string, string> = {
'👍': 'like',

View File

@ -1,6 +1,6 @@
import * as os from 'os';
import * as sysUtils from 'systeminformation';
import Logger from '../services/logger';
import Logger from '~/services/logger';
export async function showMachineInfo(parentLogger: Logger) {
const logger = parentLogger.createSubLogger('machine');

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'reporterId'], { unique: true })

View File

@ -1,7 +1,7 @@
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
import { User } from './user';
import { App } from './app';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class AccessToken {

View File

@ -1,6 +1,6 @@
import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class App {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class AttestationChallenge {

View File

@ -1,7 +1,7 @@
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
import { User } from './user';
import { App } from './app';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class AuthSession {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['blockerId', 'blockeeId'], { unique: true })

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { DriveFolder } from './drive-folder';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class DriveFile {

View File

@ -1,6 +1,6 @@
import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class DriveFolder {

View File

@ -1,5 +1,5 @@
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['name', 'host'], { unique: true })

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['followerId', 'followeeId'], { unique: true })

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['followerId', 'followeeId'], { unique: true })

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from '../../user';
import { id } from '../../../id';
import { User } from '~/models/entities/user';
import { id } from '~/models/id';
@Entity()
export class ReversiGame {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from '../../user';
import { id } from '../../../id';
import { User } from '~/models/entities/user';
import { id } from '~/models/id';
@Entity()
export class ReversiMatching {

View File

@ -1,6 +1,6 @@
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class Hashtag {

View File

@ -1,5 +1,5 @@
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class Instance {

View File

@ -1,5 +1,5 @@
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class Log {

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { DriveFile } from './drive-file';
import { id } from '../id';
import { id } from '~/models/id';
import { UserGroup } from './user-group';
@Entity()

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class ModerationLog {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['muterId', 'muteeId'], { unique: true })

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { Note } from './note';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'noteId'], { unique: true })

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { Note } from './note';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'noteId'], { unique: true })

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { Note } from './note';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'noteId'], { unique: true })

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { Note } from './note';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'noteId'], { unique: true })

View File

@ -2,7 +2,7 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typ
import { User } from './user';
import { App } from './app';
import { DriveFile } from './drive-file';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class Note {

View File

@ -1,6 +1,6 @@
import { Entity, Index, JoinColumn, ManyToOne, Column, PrimaryColumn } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
import { Note } from './note';
@Entity()

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
import { Page } from './page';
@Entity()

View File

@ -1,6 +1,6 @@
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
import { DriveFile } from './drive-file';
@Entity()

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { Note } from './note';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'noteId', 'choice'], { unique: true })

View File

@ -1,5 +1,5 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
import { id } from '../id';
import { id } from '~/models/id';
import { Note } from './note';
import { User } from './user';

View File

@ -1,5 +1,5 @@
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class RegistrationTicket {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class Signin {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class SwSubscription {

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { UserGroup } from './user-group';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'userGroupId'], { unique: true })

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { UserGroup } from './user-group';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'userGroupId'], { unique: true })

View File

@ -1,6 +1,6 @@
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class UserGroup {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class UserKeypair {

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { UserList } from './user-list';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'userListId'], { unique: true })

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class UserList {

View File

@ -1,7 +1,7 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { Note } from './note';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['userId', 'noteId'], { unique: true })

View File

@ -1,5 +1,5 @@
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
import { id } from '../id';
import { id } from '~/models/id';
import { User } from './user';
import { Page } from './page';

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class UserPublickey {

View File

@ -1,6 +1,6 @@
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
import { User } from './user';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
export class UserSecurityKey {

View File

@ -1,6 +1,6 @@
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
import { DriveFile } from './drive-file';
import { id } from '../id';
import { id } from '~/models/id';
@Entity()
@Index(['usernameLower', 'host'], { unique: true })

View File

@ -1,8 +1,8 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users } from '..';
import { AbuseUserReport } from '../entities/abuse-user-report';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { Users } from '~/models';
import { AbuseUserReport } from '~/models/entities/abuse-user-report';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
@EntityRepository(AbuseUserReport)
export class AbuseUserReportRepository extends Repository<AbuseUserReport> {

View File

@ -1,8 +1,8 @@
import { EntityRepository, Repository } from 'typeorm';
import { App } from '../entities/app';
import { AccessTokens } from '..';
import { ensure } from '../../prelude/ensure';
import { SchemaType } from '../../misc/schema';
import { App } from '~/models/entities/app';
import { AccessTokens } from '~/models';
import { ensure } from '~/prelude/ensure';
import { SchemaType } from '~/misc/schema';
export type PackedApp = SchemaType<typeof packedAppSchema>;

View File

@ -1,8 +1,8 @@
import { EntityRepository, Repository } from 'typeorm';
import { Apps } from '..';
import { AuthSession } from '../entities/auth-session';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { Apps } from '~/models';
import { AuthSession } from '~/models/entities/auth-session';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
@EntityRepository(AuthSession)
export class AuthSessionRepository extends Repository<AuthSession> {

View File

@ -1,9 +1,9 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users } from '..';
import { Blocking } from '../entities/blocking';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { SchemaType } from '../../misc/schema';
import { Users } from '~/models';
import { Blocking } from '~/models/entities/blocking';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
import { SchemaType } from '~/misc/schema';
export type PackedBlocking = SchemaType<typeof packedBlockingSchema>;

View File

@ -1,11 +1,11 @@
import { EntityRepository, Repository } from 'typeorm';
import { DriveFile } from '../entities/drive-file';
import { Users, DriveFolders } from '..';
import { User } from '../entities/user';
import { toPuny } from '../../misc/convert-host';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { SchemaType } from '../../misc/schema';
import { DriveFile } from '~/models/entities/drive-file';
import { Users, DriveFolders } from '~/models';
import { User } from '~/models/entities/user';
import { toPuny } from '~/misc/convert-host';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
import { SchemaType } from '~/misc/schema';
export type PackedDriveFile = SchemaType<typeof packedDriveFileSchema>;

View File

@ -1,9 +1,9 @@
import { EntityRepository, Repository } from 'typeorm';
import { DriveFolders, DriveFiles } from '..';
import { DriveFolder } from '../entities/drive-folder';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { SchemaType } from '../../misc/schema';
import { DriveFolders, DriveFiles } from '~/models';
import { DriveFolder } from '~/models/entities/drive-folder';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
import { SchemaType } from '~/misc/schema';
export type PackedDriveFolder = SchemaType<typeof packedDriveFolderSchema>;

View File

@ -1,7 +1,7 @@
import { EntityRepository, Repository } from 'typeorm';
import { FollowRequest } from '../entities/follow-request';
import { Users } from '..';
import { ensure } from '../../prelude/ensure';
import { FollowRequest } from '~/models/entities/follow-request';
import { Users } from '~/models';
import { ensure } from '~/prelude/ensure';
@EntityRepository(FollowRequest)
export class FollowRequestRepository extends Repository<FollowRequest> {

View File

@ -1,9 +1,9 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users } from '..';
import { Following } from '../entities/following';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { SchemaType } from '../../misc/schema';
import { Users } from '~/models';
import { Following } from '~/models/entities/following';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
import { SchemaType } from '~/misc/schema';
type LocalFollowerFollowing = Following & {
followerHost: null;

View File

@ -1,7 +1,7 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users } from '../../..';
import { ReversiGame } from '../../../entities/games/reversi/game';
import { ensure } from '../../../../prelude/ensure';
import { Users } from '~/models';
import { ReversiGame } from '~/models/entities/games/reversi/game';
import { ensure } from '~/prelude/ensure';
@EntityRepository(ReversiGame)
export class ReversiGameRepository extends Repository<ReversiGame> {

View File

@ -1,8 +1,8 @@
import { EntityRepository, Repository } from 'typeorm';
import { ReversiMatching } from '../../../entities/games/reversi/matching';
import { Users } from '../../..';
import { ensure } from '../../../../prelude/ensure';
import { awaitAll } from '../../../../prelude/await-all';
import { ReversiMatching } from '~/models/entities/games/reversi/matching';
import { Users } from '~/models';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
@EntityRepository(ReversiMatching)
export class ReversiMatchingRepository extends Repository<ReversiMatching> {

View File

@ -1,6 +1,6 @@
import { EntityRepository, Repository } from 'typeorm';
import { Hashtag } from '../entities/hashtag';
import { SchemaType } from '../../misc/schema';
import { Hashtag } from '~/models/entities/hashtag';
import { SchemaType } from '~/misc/schema';
export type PackedHashtag = SchemaType<typeof packedHashtagSchema>;

View File

@ -1,8 +1,8 @@
import { EntityRepository, Repository } from 'typeorm';
import { MessagingMessage } from '../entities/messaging-message';
import { Users, DriveFiles, UserGroups } from '..';
import { ensure } from '../../prelude/ensure';
import { SchemaType } from '../../misc/schema';
import { MessagingMessage } from '~/models/entities/messaging-message';
import { Users, DriveFiles, UserGroups } from '~/models';
import { ensure } from '~/prelude/ensure';
import { SchemaType } from '~/misc/schema';
export type PackedMessagingMessage = SchemaType<typeof packedMessagingMessageSchema>;

View File

@ -1,8 +1,8 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users } from '..';
import { ModerationLog } from '../entities/moderation-log';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { Users } from '~/models';
import { ModerationLog } from '~/models/entities/moderation-log';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
@EntityRepository(ModerationLog)
export class ModerationLogRepository extends Repository<ModerationLog> {

View File

@ -1,9 +1,9 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users } from '..';
import { Muting } from '../entities/muting';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { SchemaType } from '../../misc/schema';
import { Users } from '~/models';
import { Muting } from '~/models/entities/muting';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
import { SchemaType } from '~/misc/schema';
export type PackedMuting = SchemaType<typeof packedMutingSchema>;

View File

@ -1,7 +1,7 @@
import { EntityRepository, Repository } from 'typeorm';
import { NoteFavorite } from '../entities/note-favorite';
import { Notes } from '..';
import { ensure } from '../../prelude/ensure';
import { NoteFavorite } from '~/models/entities/note-favorite';
import { Notes } from '~/models';
import { ensure } from '~/prelude/ensure';
@EntityRepository(NoteFavorite)
export class NoteFavoriteRepository extends Repository<NoteFavorite> {

View File

@ -1,8 +1,8 @@
import { EntityRepository, Repository } from 'typeorm';
import { NoteReaction } from '../entities/note-reaction';
import { Users } from '..';
import { ensure } from '../../prelude/ensure';
import { SchemaType } from '../../misc/schema';
import { NoteReaction } from '~/models/entities/note-reaction';
import { Users } from '~/models';
import { ensure } from '~/prelude/ensure';
import { SchemaType } from '~/misc/schema';
export type PackedNoteReaction = SchemaType<typeof packedNoteReactionSchema>;

View File

@ -1,12 +1,12 @@
import { EntityRepository, Repository, In } from 'typeorm';
import { Note } from '../entities/note';
import { User } from '../entities/user';
import { unique, concat } from '../../prelude/array';
import { nyaize } from '../../misc/nyaize';
import { Emojis, Users, Apps, PollVotes, DriveFiles, NoteReactions, Followings, Polls } from '..';
import { ensure } from '../../prelude/ensure';
import { SchemaType } from '../../misc/schema';
import { awaitAll } from '../../prelude/await-all';
import { Note } from '~/models/entities/note';
import { User } from '~/models/entities/user';
import { unique, concat } from '~/prelude/array';
import { nyaize } from '~/misc/nyaize';
import { Emojis, Users, Apps, PollVotes, DriveFiles, NoteReactions, Followings, Polls } from '~/models';
import { ensure } from '~/prelude/ensure';
import { SchemaType } from '~/misc/schema';
import { awaitAll } from '~/prelude/await-all';
export type PackedNote = SchemaType<typeof packedNoteSchema>;

View File

@ -1,9 +1,9 @@
import { EntityRepository, Repository } from 'typeorm';
import { Users, Notes } from '..';
import { Notification } from '../entities/notification';
import { ensure } from '../../prelude/ensure';
import { awaitAll } from '../../prelude/await-all';
import { SchemaType } from '../../misc/schema';
import { Users, Notes } from '~/models';
import { Notification } from '~/models/entities/notification';
import { ensure } from '~/prelude/ensure';
import { awaitAll } from '~/prelude/await-all';
import { SchemaType } from '~/misc/schema';
export type PackedNotification = SchemaType<typeof packedNotificationSchema>;

View File

@ -1,7 +1,7 @@
import { EntityRepository, Repository } from 'typeorm';
import { PageLike } from '../entities/page-like';
import { Pages } from '..';
import { ensure } from '../../prelude/ensure';
import { PageLike } from '~/models/entities/page-like';
import { Pages } from '~/models';
import { ensure } from '~/prelude/ensure';
@EntityRepository(PageLike)
export class PageLikeRepository extends Repository<PageLike> {

View File

@ -1,11 +1,11 @@
import { EntityRepository, Repository } from 'typeorm';
import { Page } from '../entities/page';
import { SchemaType } from '../../misc/schema';
import { Users, DriveFiles, PageLikes } from '..';
import { awaitAll } from '../../prelude/await-all';
import { DriveFile } from '../entities/drive-file';
import { User } from '../entities/user';
import { ensure } from '../../prelude/ensure';
import { Page } from '~/models/entities/page';
import { SchemaType } from '~/misc/schema';
import { Users, DriveFiles, PageLikes } from '~/models';
import { awaitAll } from '~/prelude/await-all';
import { DriveFile } from '~/models/entities/drive-file';
import { User } from '~/models/entities/user';
import { ensure } from '~/prelude/ensure';
export type PackedPage = SchemaType<typeof packedPageSchema>;

View File

@ -1,5 +1,5 @@
import { EntityRepository, Repository } from 'typeorm';
import { Signin } from '../entities/signin';
import { Signin } from '~/models/entities/signin';
@EntityRepository(Signin)
export class SigninRepository extends Repository<Signin> {

View File

@ -1,7 +1,7 @@
import { EntityRepository, Repository } from 'typeorm';
import { UserGroupInvite } from '../entities/user-group-invite';
import { UserGroups } from '..';
import { ensure } from '../../prelude/ensure';
import { UserGroupInvite } from '~/models/entities/user-group-invite';
import { UserGroups } from '~/models';
import { ensure } from '~/prelude/ensure';
@EntityRepository(UserGroupInvite)
export class UserGroupInviteRepository extends Repository<UserGroupInvite> {

Some files were not shown because too many files have changed in this diff Show More