fix: mochaが動かないため拡張子なしに戻した
This commit is contained in:
parent
e9f34a0f09
commit
42cc93dd0f
|
@ -1,5 +1,5 @@
|
||||||
import { Command } from 'commander';
|
import { Command } from 'commander';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
|
|
||||||
const program = new Command();
|
const program = new Command();
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@ import * as cluster from 'cluster';
|
||||||
import * as chalk from 'chalk';
|
import * as chalk from 'chalk';
|
||||||
import Xev from 'xev';
|
import Xev from 'xev';
|
||||||
|
|
||||||
import Logger from '@/services/logger.js';
|
import Logger from '@/services/logger';
|
||||||
import { program } from '../argv.js';
|
import { program } from '../argv';
|
||||||
|
|
||||||
// for typeorm
|
// for typeorm
|
||||||
import 'reflect-metadata';
|
import 'reflect-metadata';
|
||||||
import { masterMain } from './master.js';
|
import { masterMain } from './master';
|
||||||
import { workerMain } from './worker.js';
|
import { workerMain } from './worker';
|
||||||
|
|
||||||
const logger = new Logger('core', 'cyan');
|
const logger = new Logger('core', 'cyan');
|
||||||
const clusterLogger = logger.createSubLogger('cluster', 'orange', false);
|
const clusterLogger = logger.createSubLogger('cluster', 'orange', false);
|
||||||
|
|
|
@ -4,13 +4,13 @@ import * as chalk from 'chalk';
|
||||||
import * as portscanner from 'portscanner';
|
import * as portscanner from 'portscanner';
|
||||||
import { getConnection } from 'typeorm';
|
import { getConnection } from 'typeorm';
|
||||||
|
|
||||||
import Logger from '@/services/logger.js';
|
import Logger from '@/services/logger';
|
||||||
import loadConfig from '@/config/load.js';
|
import loadConfig from '@/config/load';
|
||||||
import { Config } from '@/config/types.js';
|
import { Config } from '@/config/types';
|
||||||
import { lessThan } from '../prelude/array.js';
|
import { lessThan } from '../prelude/array';
|
||||||
import { program } from '../argv.js';
|
import { program } from '../argv';
|
||||||
import { showMachineInfo } from '@/misc/show-machine-info.js';
|
import { showMachineInfo } from '@/misc/show-machine-info';
|
||||||
import { initDb } from '../db/postgre.js';
|
import { initDb } from '../db/postgre';
|
||||||
import * as meta from '../meta.json';
|
import * as meta from '../meta.json';
|
||||||
|
|
||||||
const logger = new Logger('core', 'cyan');
|
const logger = new Logger('core', 'cyan');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as cluster from 'cluster';
|
import * as cluster from 'cluster';
|
||||||
import { initDb } from '../db/postgre.js';
|
import { initDb } from '../db/postgre';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init worker process
|
* Init worker process
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import load from './load.js';
|
import load from './load';
|
||||||
|
|
||||||
export default load();
|
export default load();
|
||||||
|
|
|
@ -6,7 +6,7 @@ import * as fs from 'fs';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
import { dirname } from 'path';
|
import { dirname } from 'path';
|
||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
import { Source, Mixin } from './types.js';
|
import { Source, Mixin } from './types';
|
||||||
import * as meta from '../meta.json';
|
import * as meta from '../meta.json';
|
||||||
|
|
||||||
//const _filename = fileURLToPath(import.meta.url);
|
//const _filename = fileURLToPath(import.meta.url);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// TODO: 消したい
|
// TODO: 消したい
|
||||||
|
|
||||||
const interval = 30 * 60 * 1000;
|
const interval = 30 * 60 * 1000;
|
||||||
import { AttestationChallenges } from '@/models/index.js';
|
import { AttestationChallenges } from '@/models/index';
|
||||||
import { LessThan } from 'typeorm';
|
import { LessThan } from 'typeorm';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Xev from 'xev';
|
import Xev from 'xev';
|
||||||
import { deliverQueue, inboxQueue } from '../queue/queues.js';
|
import { deliverQueue, inboxQueue } from '../queue/queues';
|
||||||
|
|
||||||
const ev = new Xev();
|
const ev = new Xev();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as elasticsearch from '@elastic/elasticsearch';
|
import * as elasticsearch from '@elastic/elasticsearch';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
|
|
||||||
const index = {
|
const index = {
|
||||||
settings: {
|
settings: {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import Logger from '@/services/logger.js';
|
import Logger from '@/services/logger';
|
||||||
|
|
||||||
export const dbLogger = new Logger('db');
|
export const dbLogger = new Logger('db');
|
||||||
|
|
|
@ -3,75 +3,75 @@ const types = require('pg').types;
|
||||||
types.setTypeParser(20, Number);
|
types.setTypeParser(20, Number);
|
||||||
|
|
||||||
import { createConnection, Logger, getConnection } from 'typeorm';
|
import { createConnection, Logger, getConnection } from 'typeorm';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
import { entities as charts } from '@/services/chart/entities.js';
|
import { entities as charts } from '@/services/chart/entities';
|
||||||
import { dbLogger } from './logger.js';
|
import { dbLogger } from './logger';
|
||||||
import * as highlight from 'cli-highlight';
|
import * as highlight from 'cli-highlight';
|
||||||
|
|
||||||
import { Log } from '@/models/entities/log.js';
|
import { Log } from '@/models/entities/log';
|
||||||
import { User } from '@/models/entities/user.js';
|
import { User } from '@/models/entities/user';
|
||||||
import { DriveFile } from '@/models/entities/drive-file.js';
|
import { DriveFile } from '@/models/entities/drive-file';
|
||||||
import { DriveFolder } from '@/models/entities/drive-folder.js';
|
import { DriveFolder } from '@/models/entities/drive-folder';
|
||||||
import { AccessToken } from '@/models/entities/access-token.js';
|
import { AccessToken } from '@/models/entities/access-token';
|
||||||
import { App } from '@/models/entities/app.js';
|
import { App } from '@/models/entities/app';
|
||||||
import { PollVote } from '@/models/entities/poll-vote.js';
|
import { PollVote } from '@/models/entities/poll-vote';
|
||||||
import { Note } from '@/models/entities/note.js';
|
import { Note } from '@/models/entities/note';
|
||||||
import { NoteReaction } from '@/models/entities/note-reaction.js';
|
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||||
import { NoteWatching } from '@/models/entities/note-watching.js';
|
import { NoteWatching } from '@/models/entities/note-watching';
|
||||||
import { NoteUnread } from '@/models/entities/note-unread.js';
|
import { NoteUnread } from '@/models/entities/note-unread';
|
||||||
import { Notification } from '@/models/entities/notification.js';
|
import { Notification } from '@/models/entities/notification';
|
||||||
import { Meta } from '@/models/entities/meta.js';
|
import { Meta } from '@/models/entities/meta';
|
||||||
import { Following } from '@/models/entities/following.js';
|
import { Following } from '@/models/entities/following';
|
||||||
import { Instance } from '@/models/entities/instance.js';
|
import { Instance } from '@/models/entities/instance';
|
||||||
import { Muting } from '@/models/entities/muting.js';
|
import { Muting } from '@/models/entities/muting';
|
||||||
import { SwSubscription } from '@/models/entities/sw-subscription.js';
|
import { SwSubscription } from '@/models/entities/sw-subscription';
|
||||||
import { Blocking } from '@/models/entities/blocking.js';
|
import { Blocking } from '@/models/entities/blocking';
|
||||||
import { UserList } from '@/models/entities/user-list.js';
|
import { UserList } from '@/models/entities/user-list';
|
||||||
import { UserListJoining } from '@/models/entities/user-list-joining.js';
|
import { UserListJoining } from '@/models/entities/user-list-joining';
|
||||||
import { UserGroup } from '@/models/entities/user-group.js';
|
import { UserGroup } from '@/models/entities/user-group';
|
||||||
import { UserGroupJoining } from '@/models/entities/user-group-joining.js';
|
import { UserGroupJoining } from '@/models/entities/user-group-joining';
|
||||||
import { UserGroupInvitation } from '@/models/entities/user-group-invitation.js';
|
import { UserGroupInvitation } from '@/models/entities/user-group-invitation';
|
||||||
import { Hashtag } from '@/models/entities/hashtag.js';
|
import { Hashtag } from '@/models/entities/hashtag';
|
||||||
import { NoteFavorite } from '@/models/entities/note-favorite.js';
|
import { NoteFavorite } from '@/models/entities/note-favorite';
|
||||||
import { AbuseUserReport } from '@/models/entities/abuse-user-report.js';
|
import { AbuseUserReport } from '@/models/entities/abuse-user-report';
|
||||||
import { RegistrationTicket } from '@/models/entities/registration-tickets.js';
|
import { RegistrationTicket } from '@/models/entities/registration-tickets';
|
||||||
import { MessagingMessage } from '@/models/entities/messaging-message.js';
|
import { MessagingMessage } from '@/models/entities/messaging-message';
|
||||||
import { Signin } from '@/models/entities/signin.js';
|
import { Signin } from '@/models/entities/signin';
|
||||||
import { AuthSession } from '@/models/entities/auth-session.js';
|
import { AuthSession } from '@/models/entities/auth-session';
|
||||||
import { FollowRequest } from '@/models/entities/follow-request.js';
|
import { FollowRequest } from '@/models/entities/follow-request';
|
||||||
import { Emoji } from '@/models/entities/emoji.js';
|
import { Emoji } from '@/models/entities/emoji';
|
||||||
import { ReversiGame } from '@/models/entities/games/reversi/game.js';
|
import { ReversiGame } from '@/models/entities/games/reversi/game';
|
||||||
import { ReversiMatching } from '@/models/entities/games/reversi/matching.js';
|
import { ReversiMatching } from '@/models/entities/games/reversi/matching';
|
||||||
import { UserNotePining } from '@/models/entities/user-note-pining.js';
|
import { UserNotePining } from '@/models/entities/user-note-pining';
|
||||||
import { Poll } from '@/models/entities/poll.js';
|
import { Poll } from '@/models/entities/poll';
|
||||||
import { UserKeypair } from '@/models/entities/user-keypair.js';
|
import { UserKeypair } from '@/models/entities/user-keypair';
|
||||||
import { UserPublickey } from '@/models/entities/user-publickey.js';
|
import { UserPublickey } from '@/models/entities/user-publickey';
|
||||||
import { UserProfile } from '@/models/entities/user-profile.js';
|
import { UserProfile } from '@/models/entities/user-profile';
|
||||||
import { UserSecurityKey } from '@/models/entities/user-security-key.js';
|
import { UserSecurityKey } from '@/models/entities/user-security-key';
|
||||||
import { AttestationChallenge } from '@/models/entities/attestation-challenge.js';
|
import { AttestationChallenge } from '@/models/entities/attestation-challenge';
|
||||||
import { Page } from '@/models/entities/page.js';
|
import { Page } from '@/models/entities/page';
|
||||||
import { PageLike } from '@/models/entities/page-like.js';
|
import { PageLike } from '@/models/entities/page-like';
|
||||||
import { GalleryPost } from '@/models/entities/gallery-post.js';
|
import { GalleryPost } from '@/models/entities/gallery-post';
|
||||||
import { GalleryLike } from '@/models/entities/gallery-like.js';
|
import { GalleryLike } from '@/models/entities/gallery-like';
|
||||||
import { ModerationLog } from '@/models/entities/moderation-log.js';
|
import { ModerationLog } from '@/models/entities/moderation-log';
|
||||||
import { UsedUsername } from '@/models/entities/used-username.js';
|
import { UsedUsername } from '@/models/entities/used-username';
|
||||||
import { Announcement } from '@/models/entities/announcement.js';
|
import { Announcement } from '@/models/entities/announcement';
|
||||||
import { AnnouncementRead } from '@/models/entities/announcement-read.js';
|
import { AnnouncementRead } from '@/models/entities/announcement-read';
|
||||||
import { Clip } from '@/models/entities/clip.js';
|
import { Clip } from '@/models/entities/clip';
|
||||||
import { ClipNote } from '@/models/entities/clip-note.js';
|
import { ClipNote } from '@/models/entities/clip-note';
|
||||||
import { Antenna } from '@/models/entities/antenna.js';
|
import { Antenna } from '@/models/entities/antenna';
|
||||||
import { AntennaNote } from '@/models/entities/antenna-note.js';
|
import { AntennaNote } from '@/models/entities/antenna-note';
|
||||||
import { PromoNote } from '@/models/entities/promo-note.js';
|
import { PromoNote } from '@/models/entities/promo-note';
|
||||||
import { PromoRead } from '@/models/entities/promo-read.js';
|
import { PromoRead } from '@/models/entities/promo-read';
|
||||||
import { program } from '../argv.js';
|
import { program } from '../argv';
|
||||||
import { Relay } from '@/models/entities/relay.js';
|
import { Relay } from '@/models/entities/relay';
|
||||||
import { MutedNote } from '@/models/entities/muted-note.js';
|
import { MutedNote } from '@/models/entities/muted-note';
|
||||||
import { Channel } from '@/models/entities/channel.js';
|
import { Channel } from '@/models/entities/channel';
|
||||||
import { ChannelFollowing } from '@/models/entities/channel-following.js';
|
import { ChannelFollowing } from '@/models/entities/channel-following';
|
||||||
import { ChannelNotePining } from '@/models/entities/channel-note-pining.js';
|
import { ChannelNotePining } from '@/models/entities/channel-note-pining';
|
||||||
import { RegistryItem } from '@/models/entities/registry-item.js';
|
import { RegistryItem } from '@/models/entities/registry-item';
|
||||||
import { Ad } from '@/models/entities/ad.js';
|
import { Ad } from '@/models/entities/ad';
|
||||||
import { PasswordResetRequest } from '@/models/entities/password-reset-request.js';
|
import { PasswordResetRequest } from '@/models/entities/password-reset-request';
|
||||||
|
|
||||||
const sqlLogger = dbLogger.createSubLogger('sql', 'white', false);
|
const sqlLogger = dbLogger.createSubLogger('sql', 'white', false);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as redis from 'redis';
|
import * as redis from 'redis';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
|
|
||||||
export function createConnection() {
|
export function createConnection() {
|
||||||
return redis.createClient(
|
return redis.createClient(
|
||||||
|
|
|
@ -6,7 +6,7 @@ Error.stackTraceLimit = Infinity;
|
||||||
|
|
||||||
require('events').EventEmitter.defaultMaxListeners = 128;
|
require('events').EventEmitter.defaultMaxListeners = 128;
|
||||||
|
|
||||||
import boot from './boot/index.js';
|
import boot from './boot/index';
|
||||||
|
|
||||||
export default function() {
|
export default function() {
|
||||||
return boot();
|
return boot();
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
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.js';
|
import config from '@/config/index';
|
||||||
import { intersperse } from '../prelude/array.js';
|
import { intersperse } from '../prelude/array';
|
||||||
import { IMentionedRemoteUsers } from '@/models/entities/note.js';
|
import { IMentionedRemoteUsers } from '@/models/entities/note';
|
||||||
import { wellKnownServices } from '../well-known-services.js';
|
import { wellKnownServices } from '../well-known-services';
|
||||||
|
|
||||||
export function toHtml(nodes: mfm.MfmNode[] | null, mentionedRemoteUsers: IMentionedRemoteUsers = []) {
|
export function toHtml(nodes: mfm.MfmNode[] | null, mentionedRemoteUsers: IMentionedRemoteUsers = []) {
|
||||||
if (nodes == null) {
|
if (nodes == null) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Antennas } from '@/models/index.js';
|
import { Antennas } from '@/models/index';
|
||||||
import { Antenna } from '@/models/entities/antenna.js';
|
import { Antenna } from '@/models/entities/antenna';
|
||||||
import { subsdcriber } from '../db/redis.js';
|
import { subsdcriber } from '../db/redis';
|
||||||
|
|
||||||
let antennasFetched = false;
|
let antennasFetched = false;
|
||||||
let antennas: Antenna[] = [];
|
let antennas: Antenna[] = [];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { redisClient } from '../db/redis.js';
|
import { redisClient } from '../db/redis';
|
||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
import * as redisLock from 'redis-lock';
|
import * as redisLock from 'redis-lock';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { URLSearchParams } from 'url';
|
import { URLSearchParams } from 'url';
|
||||||
import { getAgentByUrl } from './fetch.js';
|
import { getAgentByUrl } from './fetch';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
|
|
||||||
export async function verifyRecaptcha(secret: string, response: string) {
|
export async function verifyRecaptcha(secret: string, response: string) {
|
||||||
const result = await getCaptchaResponse('https://www.recaptcha.net/recaptcha/api/siteverify', secret, response).catch(e => {
|
const result = await getCaptchaResponse('https://www.recaptcha.net/recaptcha/api/siteverify', secret, response).catch(e => {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Antenna } from '@/models/entities/antenna.js';
|
import { Antenna } from '@/models/entities/antenna';
|
||||||
import { Note } from '@/models/entities/note.js';
|
import { Note } from '@/models/entities/note';
|
||||||
import { User } from '@/models/entities/user.js';
|
import { User } from '@/models/entities/user';
|
||||||
import { UserListJoinings, UserGroupJoinings } from '@/models/index.js';
|
import { UserListJoinings, UserGroupJoinings } from '@/models/index';
|
||||||
import { getFullApAccount } from './convert-host.js';
|
import { getFullApAccount } from './convert-host';
|
||||||
import { PackedNote } from '../models/repositories/note.js';
|
import { PackedNote } from '../models/repositories/note';
|
||||||
import { parseAcct } from '@/misc/acct.js';
|
import { parseAcct } from '@/misc/acct';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* noteUserFollowers / antennaUserFollowing はどちらか一方が指定されていればよい
|
* noteUserFollowers / antennaUserFollowing はどちらか一方が指定されていればよい
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const RE2 = require('re2');
|
const RE2 = require('re2');
|
||||||
import { Note } from '@/models/entities/note.js';
|
import { Note } from '@/models/entities/note';
|
||||||
import { User } from '@/models/entities/user.js';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
type NoteLike = {
|
type NoteLike = {
|
||||||
userId: Note['userId'];
|
userId: Note['userId'];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
import { toASCII } from 'punycode/';
|
import { toASCII } from 'punycode/';
|
||||||
|
|
||||||
export function getFullApAccount(username: string, host: string | null) {
|
export function getFullApAccount(username: string, host: string | null) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Notes } from '@/models/index.js';
|
import { Notes } from '@/models/index';
|
||||||
|
|
||||||
export async function countSameRenotes(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise<number> {
|
export async function countSameRenotes(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise<number> {
|
||||||
// 指定したユーザーの指定したノートのリノートがいくつあるか数える
|
// 指定したユーザーの指定したノートのリノートがいくつあるか数える
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { createTemp } from './create-temp.js';
|
import { createTemp } from './create-temp';
|
||||||
import { downloadUrl } from './download-url.js';
|
import { downloadUrl } from './download-url';
|
||||||
import { detectType } from './get-file-info.js';
|
import { detectType } from './get-file-info';
|
||||||
|
|
||||||
export async function detectUrlMime(url: string) {
|
export async function detectUrlMime(url: string) {
|
||||||
const [path, cleanup] = await createTemp();
|
const [path, cleanup] = await createTemp();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as util from 'util';
|
import * as util from 'util';
|
||||||
import Logger from '@/services/logger.js';
|
import Logger from '@/services/logger';
|
||||||
import { createTemp } from './create-temp.js';
|
import { createTemp } from './create-temp';
|
||||||
import { downloadUrl } from './download-url.js';
|
import { downloadUrl } from './download-url';
|
||||||
|
|
||||||
const logger = new Logger('download-text-file');
|
const logger = new Logger('download-text-file');
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,11 @@ import * as stream from 'stream';
|
||||||
import * as util from 'util';
|
import * as util from 'util';
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { getAgentByUrl } from './fetch.js';
|
import { getAgentByUrl } from './fetch';
|
||||||
import { AbortController } from 'abort-controller';
|
import { AbortController } from 'abort-controller';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
import * as chalk from 'chalk';
|
import * as chalk from 'chalk';
|
||||||
import Logger from '@/services/logger.js';
|
import Logger from '@/services/logger';
|
||||||
|
|
||||||
const pipeline = util.promisify(stream.pipeline);
|
const pipeline = util.promisify(stream.pipeline);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import { unique } from '@/prelude/array.js';
|
import { unique } from '@/prelude/array';
|
||||||
|
|
||||||
export function extractCustomEmojisFromMfm(nodes: mfm.MfmNode[]): string[] {
|
export function extractCustomEmojisFromMfm(nodes: mfm.MfmNode[]): string[] {
|
||||||
const emojiNodes = mfm.extract(nodes, (node) => {
|
const emojiNodes = mfm.extract(nodes, (node) => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import { unique } from '@/prelude/array.js';
|
import { unique } from '@/prelude/array';
|
||||||
|
|
||||||
export function extractHashtags(nodes: mfm.MfmNode[]): string[] {
|
export function extractHashtags(nodes: mfm.MfmNode[]): string[] {
|
||||||
const hashtagNodes = mfm.extract(nodes, (node) => node.type === 'hashtag');
|
const hashtagNodes = mfm.extract(nodes, (node) => node.type === 'hashtag');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Meta } from '@/models/entities/meta.js';
|
import { Meta } from '@/models/entities/meta';
|
||||||
import { getConnection } from 'typeorm';
|
import { getConnection } from 'typeorm';
|
||||||
|
|
||||||
let cache: Meta;
|
let cache: Meta;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { fetchMeta } from './fetch-meta.js';
|
import { fetchMeta } from './fetch-meta';
|
||||||
import { ILocalUser } from '@/models/entities/user.js';
|
import { ILocalUser } from '@/models/entities/user';
|
||||||
import { Users } from '@/models/index.js';
|
import { Users } from '@/models/index';
|
||||||
|
|
||||||
export async function fetchProxyAccount(): Promise<ILocalUser | null> {
|
export async function fetchProxyAccount(): Promise<ILocalUser | null> {
|
||||||
const meta = await fetchMeta();
|
const meta = await fetchMeta();
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as https from 'https';
|
||||||
import CacheableLookup from 'cacheable-lookup';
|
import CacheableLookup from 'cacheable-lookup';
|
||||||
import fetch, { HeadersInit } from 'node-fetch';
|
import fetch, { HeadersInit } from 'node-fetch';
|
||||||
import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent';
|
import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
|
|
||||||
export async function getJson(url: string, accept = 'application/json, */*', timeout = 10000, headers?: HeadersInit) {
|
export async function getJson(url: string, accept = 'application/json, */*', timeout = 10000, headers?: HeadersInit) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { ulid } from 'ulid';
|
import { ulid } from 'ulid';
|
||||||
import { genAid } from './id/aid.js';
|
import { genAid } from './id/aid';
|
||||||
import { genMeid } from './id/meid.js';
|
import { genMeid } from './id/meid';
|
||||||
import { genMeidg } from './id/meidg.js';
|
import { genMeidg } from './id/meidg';
|
||||||
import { genObjectId } from './id/object-id.js';
|
import { genObjectId } from './id/object-id';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
|
|
||||||
const metohd = config.id.toLowerCase();
|
const metohd = config.id.toLowerCase();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { User } from '@/models/entities/user.js';
|
import { User } from '@/models/entities/user';
|
||||||
|
|
||||||
export default function(user: User): string {
|
export default function(user: User): string {
|
||||||
return user.name || user.username;
|
return user.name || user.username;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Note } from '@/models/entities/note.js';
|
import { Note } from '@/models/entities/note';
|
||||||
|
|
||||||
export default function(note: Note): boolean {
|
export default function(note: Note): boolean {
|
||||||
return note.renoteId != null && (note.text != null || note.hasPoll || (note.fileIds != null && note.fileIds.length > 0));
|
return note.renoteId != null && (note.text != null || note.hasPoll || (note.fileIds != null && note.fileIds.length > 0));
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { UserKeypairs } from '@/models/index.js';
|
import { UserKeypairs } from '@/models/index';
|
||||||
import { User } from '@/models/entities/user.js';
|
import { User } from '@/models/entities/user';
|
||||||
import { UserKeypair } from '@/models/entities/user-keypair.js';
|
import { UserKeypair } from '@/models/entities/user-keypair';
|
||||||
import { Cache } from './cache.js';
|
import { Cache } from './cache';
|
||||||
|
|
||||||
const cache = new Cache<UserKeypair>(Infinity);
|
const cache = new Cache<UserKeypair>(Infinity);
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { In } from 'typeorm';
|
import { In } from 'typeorm';
|
||||||
import { Emojis } from '@/models/index.js';
|
import { Emojis } from '@/models/index';
|
||||||
import { Emoji } from '@/models/entities/emoji.js';
|
import { Emoji } from '@/models/entities/emoji';
|
||||||
import { Note } from '@/models/entities/note.js';
|
import { Note } from '@/models/entities/note';
|
||||||
import { Cache } from './cache.js';
|
import { Cache } from './cache';
|
||||||
import { isSelfHost, toPunyNullable } from './convert-host.js';
|
import { isSelfHost, toPunyNullable } from './convert-host';
|
||||||
import { decodeReaction } from './reaction-lib.js';
|
import { decodeReaction } from './reaction-lib';
|
||||||
import config from '@/config/index.js';
|
import config from '@/config/index';
|
||||||
import { query } from '@/prelude/url.js';
|
import { query } from '@/prelude/url';
|
||||||
|
|
||||||
const cache = new Cache<Emoji | null>(1000 * 60 * 60 * 12);
|
const cache = new Cache<Emoji | null>(1000 * 60 * 60 * 12);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { emojiRegex } from './emoji-regex.js';
|
import { emojiRegex } from './emoji-regex';
|
||||||
import { fetchMeta } from './fetch-meta.js';
|
import { fetchMeta } from './fetch-meta';
|
||||||
import { Emojis } from '@/models/index.js';
|
import { Emojis } from '@/models/index';
|
||||||
import { toPunyNullable } from './convert-host.js';
|
import { toPunyNullable } from './convert-host';
|
||||||
|
|
||||||
const legacies: Record<string, string> = {
|
const legacies: Record<string, string> = {
|
||||||
'like': '👍',
|
'like': '👍',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as sysUtils from 'systeminformation';
|
import * as sysUtils from 'systeminformation';
|
||||||
import Logger from '@/services/logger.js';
|
import Logger from '@/services/logger';
|
||||||
|
|
||||||
export async function showMachineInfo(parentLogger: Logger) {
|
export async function showMachineInfo(parentLogger: Logger) {
|
||||||
const logger = parentLogger.createSubLogger('machine');
|
const logger = parentLogger.createSubLogger('machine');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AbuseUserReport {
|
export class AbuseUserReport {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { App } from './app.js';
|
import { App } from './app';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AccessToken {
|
export class AccessToken {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Entity, Index, Column, PrimaryColumn } from 'typeorm';
|
import { Entity, Index, Column, PrimaryColumn } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Ad {
|
export class Ad {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { Announcement } from './announcement.js';
|
import { Announcement } from './announcement';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'announcementId'], { unique: true })
|
@Index(['userId', 'announcementId'], { unique: true })
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Entity, Index, Column, PrimaryColumn } from 'typeorm';
|
import { Entity, Index, Column, PrimaryColumn } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Announcement {
|
export class Announcement {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { Antenna } from './antenna.js';
|
import { Antenna } from './antenna';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['noteId', 'antennaId'], { unique: true })
|
@Index(['noteId', 'antennaId'], { unique: true })
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { UserList } from './user-list.js';
|
import { UserList } from './user-list';
|
||||||
import { UserGroupJoining } from './user-group-joining.js';
|
import { UserGroupJoining } from './user-group-joining';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Antenna {
|
export class Antenna {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm';
|
import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class App {
|
export class App {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
|
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AttestationChallenge {
|
export class AttestationChallenge {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { App } from './app.js';
|
import { App } from './app';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AuthSession {
|
export class AuthSession {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['blockerId', 'blockeeId'], { unique: true })
|
@Index(['blockerId', 'blockeeId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { Channel } from './channel.js';
|
import { Channel } from './channel';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['followerId', 'followeeId'], { unique: true })
|
@Index(['followerId', 'followeeId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { Channel } from './channel.js';
|
import { Channel } from './channel';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['channelId', 'noteId'], { unique: true })
|
@Index(['channelId', 'noteId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { DriveFile } from './drive-file.js';
|
import { DriveFile } from './drive-file';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Channel {
|
export class Channel {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { Clip } from './clip.js';
|
import { Clip } from './clip';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['noteId', 'clipId'], { unique: true })
|
@Index(['noteId', 'clipId'], { unique: true })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Clip {
|
export class Clip {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { DriveFolder } from './drive-folder.js';
|
import { DriveFolder } from './drive-folder';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'folderId', 'id'])
|
@Index(['userId', 'folderId', 'id'])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class DriveFolder {
|
export class DriveFolder {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['name', 'host'], { unique: true })
|
@Index(['name', 'host'], { unique: true })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['followerId', 'followeeId'], { unique: true })
|
@Index(['followerId', 'followeeId'], { unique: true })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['followerId', 'followeeId'], { unique: true })
|
@Index(['followerId', 'followeeId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { GalleryPost } from './gallery-post.js';
|
import { GalleryPost } from './gallery-post';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'postId'], { unique: true })
|
@Index(['userId', 'postId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { DriveFile } from './drive-file.js';
|
import { DriveFile } from './drive-file';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class GalleryPost {
|
export class GalleryPost {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from '../../user.js';
|
import { User } from '../../user';
|
||||||
import { id } from '../../../id.js';
|
import { id } from '../../../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class ReversiGame {
|
export class ReversiGame {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from '../../user.js';
|
import { User } from '../../user';
|
||||||
import { id } from '../../../id.js';
|
import { id } from '../../../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class ReversiMatching {
|
export class ReversiMatching {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Hashtag {
|
export class Hashtag {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Instance {
|
export class Instance {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Log {
|
export class Log {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { DriveFile } from './drive-file.js';
|
import { DriveFile } from './drive-file';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { UserGroup } from './user-group.js';
|
import { UserGroup } from './user-group';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class MessagingMessage {
|
export class MessagingMessage {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
|
import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { Clip } from './clip.js';
|
import { Clip } from './clip';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Meta {
|
export class Meta {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class ModerationLog {
|
export class ModerationLog {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { mutedNoteReasons } from '../../types.js';
|
import { mutedNoteReasons } from '../../types';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['noteId', 'userId'], { unique: true })
|
@Index(['noteId', 'userId'], { unique: true })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['muterId', 'muteeId'], { unique: true })
|
@Index(['muterId', 'muteeId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(['userId', 'noteId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(['userId', 'noteId'], { unique: true })
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { Channel } from './channel.js';
|
import { Channel } from './channel';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(['userId', 'noteId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(['userId', 'noteId'], { unique: true })
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { DriveFile } from './drive-file.js';
|
import { DriveFile } from './drive-file';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { noteVisibilities } from '../../types.js';
|
import { noteVisibilities } from '../../types';
|
||||||
import { Channel } from './channel.js';
|
import { Channel } from './channel';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index('IDX_NOTE_TAGS', { synchronize: false })
|
@Index('IDX_NOTE_TAGS', { synchronize: false })
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { Entity, Index, JoinColumn, ManyToOne, Column, PrimaryColumn } from 'typeorm';
|
import { Entity, Index, JoinColumn, ManyToOne, Column, PrimaryColumn } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { FollowRequest } from './follow-request.js';
|
import { FollowRequest } from './follow-request';
|
||||||
import { UserGroupInvitation } from './user-group-invitation.js';
|
import { UserGroupInvitation } from './user-group-invitation';
|
||||||
import { AccessToken } from './access-token.js';
|
import { AccessToken } from './access-token';
|
||||||
import { notificationTypes } from '../../types.js';
|
import { notificationTypes } from '../../types';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Notification {
|
export class Notification {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { Page } from './page.js';
|
import { Page } from './page';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'pageId'], { unique: true })
|
@Index(['userId', 'pageId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { DriveFile } from './drive-file.js';
|
import { DriveFile } from './drive-file';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'name'], { unique: true })
|
@Index(['userId', 'name'], { unique: true })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class PasswordResetRequest {
|
export class PasswordResetRequest {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId', 'choice'], { unique: true })
|
@Index(['userId', 'noteId', 'choice'], { unique: true })
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { noteVisibilities } from '../../types.js';
|
import { noteVisibilities } from '../../types';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Poll {
|
export class Poll {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class PromoNote {
|
export class PromoNote {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(['userId', 'noteId'], { unique: true })
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class RegistrationTicket {
|
export class RegistrationTicket {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
// TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい
|
// TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Relay {
|
export class Relay {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Signin {
|
export class Signin {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class SwSubscription {
|
export class SwSubscription {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { UserGroup } from './user-group.js';
|
import { UserGroup } from './user-group';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'userGroupId'], { unique: true })
|
@Index(['userId', 'userGroupId'], { unique: true })
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { UserGroup } from './user-group.js';
|
import { UserGroup } from './user-group';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'userGroupId'], { unique: true })
|
@Index(['userId', 'userGroupId'], { unique: true })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserGroup {
|
export class UserGroup {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserKeypair {
|
export class UserKeypair {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { UserList } from './user-list.js';
|
import { UserList } from './user-list';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'userListId'], { unique: true })
|
@Index(['userId', 'userListId'], { unique: true })
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserList {
|
export class UserList {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||||
import { Note } from './note.js';
|
import { Note } from './note';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(['userId', 'noteId'], { unique: true })
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
|
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { Page } from './page.js';
|
import { Page } from './page';
|
||||||
import { notificationTypes } from '../../types.js';
|
import { notificationTypes } from '../../types';
|
||||||
|
|
||||||
// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
|
// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
|
||||||
// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
|
// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserPublickey {
|
export class UserPublickey {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
|
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
|
||||||
import { User } from './user.js';
|
import { User } from './user';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserSecurityKey {
|
export class UserSecurityKey {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
|
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
|
||||||
import { DriveFile } from './drive-file.js';
|
import { DriveFile } from './drive-file';
|
||||||
import { id } from '../id.js';
|
import { id } from '../id';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['usernameLower', 'host'], { unique: true })
|
@Index(['usernameLower', 'host'], { unique: true })
|
||||||
|
|
|
@ -1,67 +1,67 @@
|
||||||
import { getRepository, getCustomRepository } from 'typeorm';
|
import { getRepository, getCustomRepository } from 'typeorm';
|
||||||
import { Announcement } from './entities/announcement.js';
|
import { Announcement } from './entities/announcement';
|
||||||
import { AnnouncementRead } from './entities/announcement-read.js';
|
import { AnnouncementRead } from './entities/announcement-read';
|
||||||
import { Instance } from './entities/instance.js';
|
import { Instance } from './entities/instance';
|
||||||
import { Poll } from './entities/poll.js';
|
import { Poll } from './entities/poll';
|
||||||
import { PollVote } from './entities/poll-vote.js';
|
import { PollVote } from './entities/poll-vote';
|
||||||
import { Meta } from './entities/meta.js';
|
import { Meta } from './entities/meta';
|
||||||
import { SwSubscription } from './entities/sw-subscription.js';
|
import { SwSubscription } from './entities/sw-subscription';
|
||||||
import { NoteWatching } from './entities/note-watching.js';
|
import { NoteWatching } from './entities/note-watching';
|
||||||
import { NoteUnread } from './entities/note-unread.js';
|
import { NoteUnread } from './entities/note-unread';
|
||||||
import { RegistrationTicket } from './entities/registration-tickets.js';
|
import { RegistrationTicket } from './entities/registration-tickets';
|
||||||
import { UserRepository } from './repositories/user.js';
|
import { UserRepository } from './repositories/user';
|
||||||
import { NoteRepository } from './repositories/note.js';
|
import { NoteRepository } from './repositories/note';
|
||||||
import { DriveFileRepository } from './repositories/drive-file.js';
|
import { DriveFileRepository } from './repositories/drive-file';
|
||||||
import { DriveFolderRepository } from './repositories/drive-folder.js';
|
import { DriveFolderRepository } from './repositories/drive-folder';
|
||||||
import { Log } from './entities/log.js';
|
import { Log } from './entities/log';
|
||||||
import { AccessToken } from './entities/access-token.js';
|
import { AccessToken } from './entities/access-token';
|
||||||
import { UserNotePining } from './entities/user-note-pining.js';
|
import { UserNotePining } from './entities/user-note-pining';
|
||||||
import { SigninRepository } from './repositories/signin.js';
|
import { SigninRepository } from './repositories/signin';
|
||||||
import { MessagingMessageRepository } from './repositories/messaging-message.js';
|
import { MessagingMessageRepository } from './repositories/messaging-message';
|
||||||
import { ReversiGameRepository } from './repositories/games/reversi/game.js';
|
import { ReversiGameRepository } from './repositories/games/reversi/game';
|
||||||
import { UserListRepository } from './repositories/user-list.js';
|
import { UserListRepository } from './repositories/user-list';
|
||||||
import { UserListJoining } from './entities/user-list-joining.js';
|
import { UserListJoining } from './entities/user-list-joining';
|
||||||
import { UserGroupRepository } from './repositories/user-group.js';
|
import { UserGroupRepository } from './repositories/user-group';
|
||||||
import { UserGroupJoining } from './entities/user-group-joining.js';
|
import { UserGroupJoining } from './entities/user-group-joining';
|
||||||
import { UserGroupInvitationRepository } from './repositories/user-group-invitation.js';
|
import { UserGroupInvitationRepository } from './repositories/user-group-invitation';
|
||||||
import { FollowRequestRepository } from './repositories/follow-request.js';
|
import { FollowRequestRepository } from './repositories/follow-request';
|
||||||
import { MutingRepository } from './repositories/muting.js';
|
import { MutingRepository } from './repositories/muting';
|
||||||
import { BlockingRepository } from './repositories/blocking.js';
|
import { BlockingRepository } from './repositories/blocking';
|
||||||
import { NoteReactionRepository } from './repositories/note-reaction.js';
|
import { NoteReactionRepository } from './repositories/note-reaction';
|
||||||
import { NotificationRepository } from './repositories/notification.js';
|
import { NotificationRepository } from './repositories/notification';
|
||||||
import { NoteFavoriteRepository } from './repositories/note-favorite.js';
|
import { NoteFavoriteRepository } from './repositories/note-favorite';
|
||||||
import { ReversiMatchingRepository } from './repositories/games/reversi/matching.js';
|
import { ReversiMatchingRepository } from './repositories/games/reversi/matching';
|
||||||
import { UserPublickey } from './entities/user-publickey.js';
|
import { UserPublickey } from './entities/user-publickey';
|
||||||
import { UserKeypair } from './entities/user-keypair.js';
|
import { UserKeypair } from './entities/user-keypair';
|
||||||
import { AppRepository } from './repositories/app.js';
|
import { AppRepository } from './repositories/app';
|
||||||
import { FollowingRepository } from './repositories/following.js';
|
import { FollowingRepository } from './repositories/following';
|
||||||
import { AbuseUserReportRepository } from './repositories/abuse-user-report.js';
|
import { AbuseUserReportRepository } from './repositories/abuse-user-report';
|
||||||
import { AuthSessionRepository } from './repositories/auth-session.js';
|
import { AuthSessionRepository } from './repositories/auth-session';
|
||||||
import { UserProfile } from './entities/user-profile.js';
|
import { UserProfile } from './entities/user-profile';
|
||||||
import { AttestationChallenge } from './entities/attestation-challenge.js';
|
import { AttestationChallenge } from './entities/attestation-challenge';
|
||||||
import { UserSecurityKey } from './entities/user-security-key.js';
|
import { UserSecurityKey } from './entities/user-security-key';
|
||||||
import { HashtagRepository } from './repositories/hashtag.js';
|
import { HashtagRepository } from './repositories/hashtag';
|
||||||
import { PageRepository } from './repositories/page.js';
|
import { PageRepository } from './repositories/page';
|
||||||
import { PageLikeRepository } from './repositories/page-like.js';
|
import { PageLikeRepository } from './repositories/page-like';
|
||||||
import { GalleryPostRepository } from './repositories/gallery-post.js';
|
import { GalleryPostRepository } from './repositories/gallery-post';
|
||||||
import { GalleryLikeRepository } from './repositories/gallery-like.js';
|
import { GalleryLikeRepository } from './repositories/gallery-like';
|
||||||
import { ModerationLogRepository } from './repositories/moderation-logs.js';
|
import { ModerationLogRepository } from './repositories/moderation-logs';
|
||||||
import { UsedUsername } from './entities/used-username.js';
|
import { UsedUsername } from './entities/used-username';
|
||||||
import { ClipRepository } from './repositories/clip.js';
|
import { ClipRepository } from './repositories/clip';
|
||||||
import { ClipNote } from './entities/clip-note.js';
|
import { ClipNote } from './entities/clip-note';
|
||||||
import { AntennaRepository } from './repositories/antenna.js';
|
import { AntennaRepository } from './repositories/antenna';
|
||||||
import { AntennaNote } from './entities/antenna-note.js';
|
import { AntennaNote } from './entities/antenna-note';
|
||||||
import { PromoNote } from './entities/promo-note.js';
|
import { PromoNote } from './entities/promo-note';
|
||||||
import { PromoRead } from './entities/promo-read.js';
|
import { PromoRead } from './entities/promo-read';
|
||||||
import { EmojiRepository } from './repositories/emoji.js';
|
import { EmojiRepository } from './repositories/emoji';
|
||||||
import { RelayRepository } from './repositories/relay.js';
|
import { RelayRepository } from './repositories/relay';
|
||||||
import { ChannelRepository } from './repositories/channel.js';
|
import { ChannelRepository } from './repositories/channel';
|
||||||
import { MutedNote } from './entities/muted-note.js';
|
import { MutedNote } from './entities/muted-note';
|
||||||
import { ChannelFollowing } from './entities/channel-following.js';
|
import { ChannelFollowing } from './entities/channel-following';
|
||||||
import { ChannelNotePining } from './entities/channel-note-pining.js';
|
import { ChannelNotePining } from './entities/channel-note-pining';
|
||||||
import { RegistryItem } from './entities/registry-item.js';
|
import { RegistryItem } from './entities/registry-item';
|
||||||
import { Ad } from './entities/ad.js';
|
import { Ad } from './entities/ad';
|
||||||
import { PasswordResetRequest } from './entities/password-reset-request.js';
|
import { PasswordResetRequest } from './entities/password-reset-request';
|
||||||
|
|
||||||
export const Announcements = getRepository(Announcement);
|
export const Announcements = getRepository(Announcement);
|
||||||
export const AnnouncementReads = getRepository(AnnouncementRead);
|
export const AnnouncementReads = getRepository(AnnouncementRead);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Users } from '../index.js';
|
import { Users } from '../index';
|
||||||
import { AbuseUserReport } from '../entities/abuse-user-report.js';
|
import { AbuseUserReport } from '../entities/abuse-user-report';
|
||||||
import { awaitAll } from '../../prelude/await-all.js';
|
import { awaitAll } from '../../prelude/await-all';
|
||||||
|
|
||||||
@EntityRepository(AbuseUserReport)
|
@EntityRepository(AbuseUserReport)
|
||||||
export class AbuseUserReportRepository extends Repository<AbuseUserReport> {
|
export class AbuseUserReportRepository extends Repository<AbuseUserReport> {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue