mirror of
https://example.com
synced 2024-11-22 21:36:39 +09:00
chore: unsafe linting
This commit is contained in:
parent
1b517b584a
commit
7dfc52b681
688 changed files with 2873 additions and 2869 deletions
|
@ -5,11 +5,11 @@ import Xev from "xev";
|
||||||
import Logger from "@/services/logger.js";
|
import Logger from "@/services/logger.js";
|
||||||
import { envOption } from "../env.js";
|
import { envOption } from "../env.js";
|
||||||
|
|
||||||
|
import os from "node:os";
|
||||||
// for typeorm
|
// for typeorm
|
||||||
import "reflect-metadata";
|
import "reflect-metadata";
|
||||||
import { masterMain } from "./master.js";
|
import { masterMain } from "./master.js";
|
||||||
import { workerMain } from "./worker.js";
|
import { workerMain } from "./worker.js";
|
||||||
import os from "node:os";
|
|
||||||
|
|
||||||
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);
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import * as fs from "node:fs";
|
|
||||||
import { fileURLToPath } from "node:url";
|
|
||||||
import { dirname } from "node:path";
|
|
||||||
import * as os from "node:os";
|
|
||||||
import cluster from "node:cluster";
|
import cluster from "node:cluster";
|
||||||
|
import * as fs from "node:fs";
|
||||||
|
import * as os from "node:os";
|
||||||
|
import { dirname } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import chalkTemplate from "chalk-template";
|
import chalkTemplate from "chalk-template";
|
||||||
import semver from "semver";
|
import semver from "semver";
|
||||||
|
|
||||||
import Logger from "@/services/logger.js";
|
|
||||||
import loadConfig from "@/config/load.js";
|
import loadConfig from "@/config/load.js";
|
||||||
import type { Config } from "@/config/types.js";
|
import type { Config } from "@/config/types.js";
|
||||||
|
import { db, initDb } from "@/db/postgre.js";
|
||||||
import { envOption } from "@/env.js";
|
import { envOption } from "@/env.js";
|
||||||
import { showMachineInfo } from "@/misc/show-machine-info.js";
|
import { showMachineInfo } from "@/misc/show-machine-info.js";
|
||||||
import { db, initDb } from "@/db/postgre.js";
|
import Logger from "@/services/logger.js";
|
||||||
|
|
||||||
const _filename = fileURLToPath(import.meta.url);
|
const _filename = fileURLToPath(import.meta.url);
|
||||||
const _dirname = dirname(_filename);
|
const _dirname = dirname(_filename);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cluster from "node:cluster";
|
import cluster from "node:cluster";
|
||||||
import { initDb } from "@/db/postgre.js";
|
|
||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
|
import { initDb } from "@/db/postgre.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init worker process
|
* Init worker process
|
||||||
|
@ -25,6 +25,6 @@ export async function workerMain() {
|
||||||
|
|
||||||
if (cluster.isWorker) {
|
if (cluster.isWorker) {
|
||||||
// Send a 'ready' message to parent process
|
// Send a 'ready' message to parent process
|
||||||
process.send!("ready");
|
process.send?.("ready");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
import { fileURLToPath } from "node:url";
|
|
||||||
import { dirname } from "node:path";
|
import { dirname } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
import * as yaml from "js-yaml";
|
import * as yaml from "js-yaml";
|
||||||
import type { Source, Mixin } from "./types.js";
|
import type { Mixin, Source } from "./types.js";
|
||||||
|
|
||||||
const _filename = fileURLToPath(import.meta.url);
|
const _filename = fileURLToPath(import.meta.url);
|
||||||
const _dirname = dirname(_filename);
|
const _dirname = dirname(_filename);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Xev from "xev";
|
|
||||||
import { deliverQueue, inboxQueue } from "@/queue/queues.js";
|
import { deliverQueue, inboxQueue } from "@/queue/queues.js";
|
||||||
|
import Xev from "xev";
|
||||||
|
|
||||||
const ev = new Xev();
|
const ev = new Xev();
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import meilisearch from "@/db/meilisearch.js";
|
||||||
|
import { fetchMeta } from "@/misc/fetch-meta.js";
|
||||||
|
import * as osUtils from "os-utils";
|
||||||
import si from "systeminformation";
|
import si from "systeminformation";
|
||||||
import Xev from "xev";
|
import Xev from "xev";
|
||||||
import * as osUtils from "os-utils";
|
|
||||||
import { fetchMeta } from "@/misc/fetch-meta.js";
|
|
||||||
import meilisearch from "@/db/meilisearch.js";
|
|
||||||
|
|
||||||
const ev = new Xev();
|
const ev = new Xev();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as elasticsearch from "@elastic/elasticsearch";
|
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
|
import * as elasticsearch from "@elastic/elasticsearch";
|
||||||
|
|
||||||
const index = {
|
const index = {
|
||||||
settings: {
|
settings: {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Health, Index, MeiliSearch, Stats } from "meilisearch";
|
import { Health, Index, MeiliSearch, Stats } from "meilisearch";
|
||||||
import { dbLogger } from "./logger.js";
|
import { dbLogger } from "./logger.js";
|
||||||
|
|
||||||
|
import * as url from "url";
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
import { Note } from "@/models/entities/note.js";
|
import { Note } from "@/models/entities/note.js";
|
||||||
import * as url from "url";
|
|
||||||
import { ILocalUser } from "@/models/entities/user.js";
|
import { ILocalUser } from "@/models/entities/user.js";
|
||||||
import { Followings, Users } from "@/models/index.js";
|
import { Followings, Users } from "@/models/index.js";
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ function timestampToUnix(timestamp: string) {
|
||||||
if (unix === 0) {
|
if (unix === 0) {
|
||||||
// Try to parse the timestamp as JavaScript Date
|
// Try to parse the timestamp as JavaScript Date
|
||||||
const date = Date.parse(timestamp);
|
const date = Date.parse(timestamp);
|
||||||
if (isNaN(date)) return 0;
|
if (Number.isNaN(date)) return 0;
|
||||||
unix = date / 1000;
|
unix = date / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ export default hasConfig
|
||||||
return {
|
return {
|
||||||
health: health.status,
|
health: health.status,
|
||||||
size: stats.databaseSize,
|
size: stats.databaseSize,
|
||||||
indexed_count: stats.indexes["posts"].numberOfDocuments,
|
indexed_count: stats.indexes.posts.numberOfDocuments,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
deleteNotes: async (note: Note | Note[] | string | string[]) => {
|
deleteNotes: async (note: Note | Note[] | string | string[]) => {
|
||||||
|
|
|
@ -2,76 +2,76 @@
|
||||||
import pg from "pg";
|
import pg from "pg";
|
||||||
pg.types.setTypeParser(20, Number);
|
pg.types.setTypeParser(20, Number);
|
||||||
|
|
||||||
|
import config from "@/config/index.js";
|
||||||
|
import * as highlight from "cli-highlight";
|
||||||
import type { Logger } from "typeorm";
|
import type { Logger } from "typeorm";
|
||||||
import { DataSource } from "typeorm";
|
import { DataSource } from "typeorm";
|
||||||
import * as highlight from "cli-highlight";
|
|
||||||
import config from "@/config/index.js";
|
|
||||||
|
|
||||||
import { User } from "@/models/entities/user.js";
|
|
||||||
import { DriveFile } from "@/models/entities/drive-file.js";
|
|
||||||
import { DriveFolder } from "@/models/entities/drive-folder.js";
|
|
||||||
import { AccessToken } from "@/models/entities/access-token.js";
|
|
||||||
import { App } from "@/models/entities/app.js";
|
|
||||||
import { PollVote } from "@/models/entities/poll-vote.js";
|
|
||||||
import { Note } from "@/models/entities/note.js";
|
|
||||||
import { NoteReaction } from "@/models/entities/note-reaction.js";
|
|
||||||
import { NoteWatching } from "@/models/entities/note-watching.js";
|
|
||||||
import { NoteThreadMuting } from "@/models/entities/note-thread-muting.js";
|
|
||||||
import { NoteUnread } from "@/models/entities/note-unread.js";
|
|
||||||
import { Notification } from "@/models/entities/notification.js";
|
|
||||||
import { Meta } from "@/models/entities/meta.js";
|
|
||||||
import { Following } from "@/models/entities/following.js";
|
|
||||||
import { Instance } from "@/models/entities/instance.js";
|
|
||||||
import { Muting } from "@/models/entities/muting.js";
|
|
||||||
import { RenoteMuting } from "@/models/entities/renote-muting.js";
|
|
||||||
import { SwSubscription } from "@/models/entities/sw-subscription.js";
|
|
||||||
import { Blocking } from "@/models/entities/blocking.js";
|
|
||||||
import { UserList } from "@/models/entities/user-list.js";
|
|
||||||
import { UserListJoining } from "@/models/entities/user-list-joining.js";
|
|
||||||
import { UserGroup } from "@/models/entities/user-group.js";
|
|
||||||
import { UserGroupJoining } from "@/models/entities/user-group-joining.js";
|
|
||||||
import { UserGroupInvitation } from "@/models/entities/user-group-invitation.js";
|
|
||||||
import { Hashtag } from "@/models/entities/hashtag.js";
|
|
||||||
import { NoteFavorite } from "@/models/entities/note-favorite.js";
|
|
||||||
import { AbuseUserReport } from "@/models/entities/abuse-user-report.js";
|
import { AbuseUserReport } from "@/models/entities/abuse-user-report.js";
|
||||||
import { RegistrationTicket } from "@/models/entities/registration-tickets.js";
|
import { AccessToken } from "@/models/entities/access-token.js";
|
||||||
import { MessagingMessage } from "@/models/entities/messaging-message.js";
|
import { Ad } from "@/models/entities/ad.js";
|
||||||
import { Signin } from "@/models/entities/signin.js";
|
|
||||||
import { AuthSession } from "@/models/entities/auth-session.js";
|
|
||||||
import { FollowRequest } from "@/models/entities/follow-request.js";
|
|
||||||
import { Emoji } from "@/models/entities/emoji.js";
|
|
||||||
import { UserNotePining } from "@/models/entities/user-note-pining.js";
|
|
||||||
import { Poll } from "@/models/entities/poll.js";
|
|
||||||
import { UserKeypair } from "@/models/entities/user-keypair.js";
|
|
||||||
import { UserPublickey } from "@/models/entities/user-publickey.js";
|
|
||||||
import { UserProfile } from "@/models/entities/user-profile.js";
|
|
||||||
import { UserSecurityKey } from "@/models/entities/user-security-key.js";
|
|
||||||
import { AttestationChallenge } from "@/models/entities/attestation-challenge.js";
|
|
||||||
import { Page } from "@/models/entities/page.js";
|
|
||||||
import { PageLike } from "@/models/entities/page-like.js";
|
|
||||||
import { GalleryPost } from "@/models/entities/gallery-post.js";
|
|
||||||
import { GalleryLike } from "@/models/entities/gallery-like.js";
|
|
||||||
import { ModerationLog } from "@/models/entities/moderation-log.js";
|
|
||||||
import { UsedUsername } from "@/models/entities/used-username.js";
|
|
||||||
import { Announcement } from "@/models/entities/announcement.js";
|
|
||||||
import { AnnouncementRead } from "@/models/entities/announcement-read.js";
|
import { AnnouncementRead } from "@/models/entities/announcement-read.js";
|
||||||
import { Clip } from "@/models/entities/clip.js";
|
import { Announcement } from "@/models/entities/announcement.js";
|
||||||
import { ClipNote } from "@/models/entities/clip-note.js";
|
|
||||||
import { Antenna } from "@/models/entities/antenna.js";
|
import { Antenna } from "@/models/entities/antenna.js";
|
||||||
import { PromoNote } from "@/models/entities/promo-note.js";
|
import { App } from "@/models/entities/app.js";
|
||||||
import { PromoRead } from "@/models/entities/promo-read.js";
|
import { AttestationChallenge } from "@/models/entities/attestation-challenge.js";
|
||||||
import { Relay } from "@/models/entities/relay.js";
|
import { AuthSession } from "@/models/entities/auth-session.js";
|
||||||
import { MutedNote } from "@/models/entities/muted-note.js";
|
import { Blocking } from "@/models/entities/blocking.js";
|
||||||
import { Channel } from "@/models/entities/channel.js";
|
|
||||||
import { ChannelFollowing } from "@/models/entities/channel-following.js";
|
import { ChannelFollowing } from "@/models/entities/channel-following.js";
|
||||||
import { ChannelNotePining } from "@/models/entities/channel-note-pining.js";
|
import { ChannelNotePining } from "@/models/entities/channel-note-pining.js";
|
||||||
import { RegistryItem } from "@/models/entities/registry-item.js";
|
import { Channel } from "@/models/entities/channel.js";
|
||||||
import { Ad } from "@/models/entities/ad.js";
|
import { ClipNote } from "@/models/entities/clip-note.js";
|
||||||
import { PasswordResetRequest } from "@/models/entities/password-reset-request.js";
|
import { Clip } from "@/models/entities/clip.js";
|
||||||
import { UserPending } from "@/models/entities/user-pending.js";
|
import { DriveFile } from "@/models/entities/drive-file.js";
|
||||||
import { Webhook } from "@/models/entities/webhook.js";
|
import { DriveFolder } from "@/models/entities/drive-folder.js";
|
||||||
import { UserIp } from "@/models/entities/user-ip.js";
|
import { Emoji } from "@/models/entities/emoji.js";
|
||||||
|
import { FollowRequest } from "@/models/entities/follow-request.js";
|
||||||
|
import { Following } from "@/models/entities/following.js";
|
||||||
|
import { GalleryLike } from "@/models/entities/gallery-like.js";
|
||||||
|
import { GalleryPost } from "@/models/entities/gallery-post.js";
|
||||||
|
import { Hashtag } from "@/models/entities/hashtag.js";
|
||||||
|
import { Instance } from "@/models/entities/instance.js";
|
||||||
|
import { MessagingMessage } from "@/models/entities/messaging-message.js";
|
||||||
|
import { Meta } from "@/models/entities/meta.js";
|
||||||
|
import { ModerationLog } from "@/models/entities/moderation-log.js";
|
||||||
|
import { MutedNote } from "@/models/entities/muted-note.js";
|
||||||
|
import { Muting } from "@/models/entities/muting.js";
|
||||||
import { NoteEdit } from "@/models/entities/note-edit.js";
|
import { NoteEdit } from "@/models/entities/note-edit.js";
|
||||||
|
import { NoteFavorite } from "@/models/entities/note-favorite.js";
|
||||||
|
import { NoteReaction } from "@/models/entities/note-reaction.js";
|
||||||
|
import { NoteThreadMuting } from "@/models/entities/note-thread-muting.js";
|
||||||
|
import { NoteUnread } from "@/models/entities/note-unread.js";
|
||||||
|
import { NoteWatching } from "@/models/entities/note-watching.js";
|
||||||
|
import { Note } from "@/models/entities/note.js";
|
||||||
|
import { Notification } from "@/models/entities/notification.js";
|
||||||
|
import { PageLike } from "@/models/entities/page-like.js";
|
||||||
|
import { Page } from "@/models/entities/page.js";
|
||||||
|
import { PasswordResetRequest } from "@/models/entities/password-reset-request.js";
|
||||||
|
import { PollVote } from "@/models/entities/poll-vote.js";
|
||||||
|
import { Poll } from "@/models/entities/poll.js";
|
||||||
|
import { PromoNote } from "@/models/entities/promo-note.js";
|
||||||
|
import { PromoRead } from "@/models/entities/promo-read.js";
|
||||||
|
import { RegistrationTicket } from "@/models/entities/registration-tickets.js";
|
||||||
|
import { RegistryItem } from "@/models/entities/registry-item.js";
|
||||||
|
import { Relay } from "@/models/entities/relay.js";
|
||||||
|
import { RenoteMuting } from "@/models/entities/renote-muting.js";
|
||||||
|
import { Signin } from "@/models/entities/signin.js";
|
||||||
|
import { SwSubscription } from "@/models/entities/sw-subscription.js";
|
||||||
|
import { UsedUsername } from "@/models/entities/used-username.js";
|
||||||
|
import { UserGroupInvitation } from "@/models/entities/user-group-invitation.js";
|
||||||
|
import { UserGroupJoining } from "@/models/entities/user-group-joining.js";
|
||||||
|
import { UserGroup } from "@/models/entities/user-group.js";
|
||||||
|
import { UserIp } from "@/models/entities/user-ip.js";
|
||||||
|
import { UserKeypair } from "@/models/entities/user-keypair.js";
|
||||||
|
import { UserListJoining } from "@/models/entities/user-list-joining.js";
|
||||||
|
import { UserList } from "@/models/entities/user-list.js";
|
||||||
|
import { UserNotePining } from "@/models/entities/user-note-pining.js";
|
||||||
|
import { UserPending } from "@/models/entities/user-pending.js";
|
||||||
|
import { UserProfile } from "@/models/entities/user-profile.js";
|
||||||
|
import { UserPublickey } from "@/models/entities/user-publickey.js";
|
||||||
|
import { UserSecurityKey } from "@/models/entities/user-security-key.js";
|
||||||
|
import { User } from "@/models/entities/user.js";
|
||||||
|
import { Webhook } from "@/models/entities/webhook.js";
|
||||||
|
|
||||||
import { entities as charts } from "@/services/chart/entities.js";
|
import { entities as charts } from "@/services/chart/entities.js";
|
||||||
import { dbLogger } from "./logger.js";
|
import { dbLogger } from "./logger.js";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Redis from "ioredis";
|
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
|
import Redis from "ioredis";
|
||||||
|
|
||||||
export function createConnection() {
|
export function createConnection() {
|
||||||
let source = config.redis;
|
let source = config.redis;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import config from "@/config/index.js";
|
||||||
|
import type { IMentionedRemoteUsers } from "@/models/entities/note.js";
|
||||||
|
import { intersperse } from "@/prelude/array.js";
|
||||||
import { Window } from "happy-dom";
|
import { Window } from "happy-dom";
|
||||||
import type * as mfm from "mfm-js";
|
import type * as mfm from "mfm-js";
|
||||||
import config from "@/config/index.js";
|
|
||||||
import { intersperse } from "@/prelude/array.js";
|
|
||||||
import type { IMentionedRemoteUsers } from "@/models/entities/note.js";
|
|
||||||
|
|
||||||
export function toHtml(
|
export function toHtml(
|
||||||
nodes: mfm.MfmNode[] | null,
|
nodes: mfm.MfmNode[] | null,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Antennas } from "@/models/index.js";
|
|
||||||
import type { Antenna } from "@/models/entities/antenna.js";
|
|
||||||
import { subscriber } from "@/db/redis.js";
|
import { subscriber } from "@/db/redis.js";
|
||||||
|
import type { Antenna } from "@/models/entities/antenna.js";
|
||||||
|
import { Antennas } from "@/models/index.js";
|
||||||
|
|
||||||
let antennasFetched = false;
|
let antennasFetched = false;
|
||||||
let antennas: Antenna[] = [];
|
let antennas: Antenna[] = [];
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// https://gist.github.com/nfantone/1eaa803772025df69d07f4dbf5df7e58
|
// https://gist.github.com/nfantone/1eaa803772025df69d07f4dbf5df7e58
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @callback BeforeShutdownListener
|
* @callback BeforeShutdownListener
|
||||||
* @param {string} [signalOrEvent] The exit signal or event name received on the process.
|
* @param {string} [signalOrEvent] The exit signal or event name received on the process.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { redisClient } from "@/db/redis.js";
|
import { redisClient } from "@/db/redis.js";
|
||||||
import { encode, decode } from "msgpackr";
|
|
||||||
import { ChainableCommander } from "ioredis";
|
import { ChainableCommander } from "ioredis";
|
||||||
|
import { decode, encode } from "msgpackr";
|
||||||
|
|
||||||
export class Cache<T> {
|
export class Cache<T> {
|
||||||
private ttl: number;
|
private ttl: number;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import fetch from "node-fetch";
|
|
||||||
import { URLSearchParams } from "node:url";
|
import { URLSearchParams } from "node:url";
|
||||||
import { getAgentByUrl } from "@/misc/fetch.js";
|
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
|
import { getAgentByUrl } from "@/misc/fetch.js";
|
||||||
|
import fetch from "node-fetch";
|
||||||
|
|
||||||
export async function verifyRecaptcha(secret: string, response: string) {
|
export async function verifyRecaptcha(secret: string, response: string) {
|
||||||
const result = await getCaptchaResponse(
|
const result = await getCaptchaResponse(
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
import * as Acct from "@/misc/acct.js";
|
||||||
|
import { Cache } from "@/misc/cache.js";
|
||||||
|
import { getWordHardMute } from "@/misc/check-word-mute.js";
|
||||||
|
import type { Packed } from "@/misc/schema.js";
|
||||||
import type { Antenna } from "@/models/entities/antenna.js";
|
import type { Antenna } from "@/models/entities/antenna.js";
|
||||||
import type { Note } from "@/models/entities/note.js";
|
import type { Note } from "@/models/entities/note.js";
|
||||||
import type { User } from "@/models/entities/user.js";
|
import type { User } from "@/models/entities/user.js";
|
||||||
import { Blockings, Followings, UserProfiles } from "@/models/index.js";
|
import { Blockings, Followings, UserProfiles } from "@/models/index.js";
|
||||||
import { getFullApAccount } from "./convert-host.js";
|
import { getFullApAccount } from "./convert-host.js";
|
||||||
import * as Acct from "@/misc/acct.js";
|
|
||||||
import type { Packed } from "@/misc/schema.js";
|
|
||||||
import { Cache } from "@/misc/cache.js";
|
|
||||||
import { getWordHardMute } from "@/misc/check-word-mute.js";
|
|
||||||
|
|
||||||
const blockingCache = new Cache<User["id"][]>("blocking", 60 * 5);
|
const blockingCache = new Cache<User["id"][]>("blocking", 60 * 5);
|
||||||
const mutedWordsCache = new Cache<string[][] | undefined>("mutedWords", 60 * 5);
|
const mutedWordsCache = new Cache<string[][] | undefined>("mutedWords", 60 * 5);
|
||||||
|
@ -78,8 +78,8 @@ export async function checkHitAntenna(
|
||||||
const matched = excludeKeywords.some((and) =>
|
const matched = excludeKeywords.some((and) =>
|
||||||
and.every((keyword) =>
|
and.every((keyword) =>
|
||||||
antenna.caseSensitive
|
antenna.caseSensitive
|
||||||
? note.text!.includes(keyword)
|
? note.text?.includes(keyword)
|
||||||
: note.text!.toLowerCase().includes(keyword.toLowerCase()),
|
: note.text?.toLowerCase().includes(keyword.toLowerCase()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import RE2 from "re2";
|
|
||||||
import type { Note } from "@/models/entities/note.js";
|
import type { Note } from "@/models/entities/note.js";
|
||||||
|
import RE2 from "re2";
|
||||||
|
|
||||||
type NoteLike = {
|
type NoteLike = {
|
||||||
userId: Note["userId"];
|
userId: Note["userId"];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { URL } from "node:url";
|
import { URL } from "node:url";
|
||||||
import config from "@/config/index.js";
|
|
||||||
import { toASCII } from "punycode";
|
import { toASCII } from "punycode";
|
||||||
|
import config from "@/config/index.js";
|
||||||
|
|
||||||
export function getFullApAccount(username: string, host: string | null) {
|
export function getFullApAccount(username: string, host: string | null) {
|
||||||
return host
|
return host
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { detect } from "tinyld";
|
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
|
import { detect } from "tinyld";
|
||||||
|
|
||||||
export default function detectLanguage(text: string): string {
|
export default function detectLanguage(text: string): string {
|
||||||
const nodes = mfm.parse(text);
|
const nodes = mfm.parse(text);
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
import * as stream from "node:stream";
|
import * as stream from "node:stream";
|
||||||
import * as util from "node:util";
|
import * as util from "node:util";
|
||||||
import got, * as Got from "got";
|
|
||||||
import { httpAgent, httpsAgent, StatusError } from "./fetch.js";
|
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
import chalk from "chalk";
|
|
||||||
import Logger from "@/services/logger.js";
|
import Logger from "@/services/logger.js";
|
||||||
|
import chalk from "chalk";
|
||||||
|
import got, * as Got from "got";
|
||||||
import IPCIDR from "ip-cidr";
|
import IPCIDR from "ip-cidr";
|
||||||
import PrivateIp from "private-ip";
|
import PrivateIp from "private-ip";
|
||||||
|
import { StatusError, httpAgent, httpsAgent } from "./fetch.js";
|
||||||
|
|
||||||
const pipeline = util.promisify(stream.pipeline);
|
const pipeline = util.promisify(stream.pipeline);
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ import probeImageSize from "probe-image-size";
|
||||||
import { Mutex } from "redis-semaphore";
|
import { Mutex } from "redis-semaphore";
|
||||||
|
|
||||||
import { FILE_TYPE_BROWSERSAFE } from "@/const.js";
|
import { FILE_TYPE_BROWSERSAFE } from "@/const.js";
|
||||||
|
import { redisClient } from "@/db/redis.js";
|
||||||
import Logger from "@/services/logger.js";
|
import Logger from "@/services/logger.js";
|
||||||
import { Cache } from "./cache.js";
|
import { Cache } from "./cache.js";
|
||||||
import { redisClient } from "@/db/redis.js";
|
|
||||||
|
|
||||||
export type Size = {
|
export type Size = {
|
||||||
width: number;
|
width: number;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as mfm from "mfm-js";
|
|
||||||
import { unique } from "@/prelude/array.js";
|
import { unique } from "@/prelude/array.js";
|
||||||
|
import * as mfm from "mfm-js";
|
||||||
|
|
||||||
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 { unique } from "@/prelude/array.js";
|
import { unique } from "@/prelude/array.js";
|
||||||
|
import * as mfm from "mfm-js";
|
||||||
|
|
||||||
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,6 +1,6 @@
|
||||||
import { fetchMeta } from "./fetch-meta.js";
|
|
||||||
import type { ILocalUser } from "@/models/entities/user.js";
|
import type { ILocalUser } from "@/models/entities/user.js";
|
||||||
import { Users } from "@/models/index.js";
|
import { Users } from "@/models/index.js";
|
||||||
|
import { fetchMeta } from "./fetch-meta.js";
|
||||||
|
|
||||||
export async function fetchProxyAccount(): Promise<ILocalUser | null> {
|
export async function fetchProxyAccount(): Promise<ILocalUser | null> {
|
||||||
const meta = await fetchMeta();
|
const meta = await fetchMeta();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import * as http from "node:http";
|
import * as http from "node:http";
|
||||||
import * as https from "node:https";
|
import * as https from "node:https";
|
||||||
import type { URL } from "node:url";
|
import type { URL } from "node:url";
|
||||||
import CacheableLookup from "cacheable-lookup";
|
|
||||||
import fetch from "node-fetch";
|
|
||||||
import { HttpProxyAgent, HttpsProxyAgent } from "hpagent";
|
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
|
import CacheableLookup from "cacheable-lookup";
|
||||||
|
import { HttpProxyAgent, HttpsProxyAgent } from "hpagent";
|
||||||
|
import fetch from "node-fetch";
|
||||||
|
|
||||||
export async function getJson(
|
export async function getJson(
|
||||||
url: string,
|
url: string,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
import {
|
import {
|
||||||
nativeCreateId,
|
nativeCreateId,
|
||||||
nativeInitIdGenerator,
|
|
||||||
nativeGetTimestamp,
|
nativeGetTimestamp,
|
||||||
|
nativeInitIdGenerator,
|
||||||
} from "native-utils/built/index.js";
|
} from "native-utils/built/index.js";
|
||||||
|
|
||||||
const length = Math.min(Math.max(config.cuid?.length ?? 16, 16), 24);
|
const length = Math.min(Math.max(config.cuid?.length ?? 16, 16), 24);
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
import * as fs from "node:fs";
|
|
||||||
import * as crypto from "node:crypto";
|
import * as crypto from "node:crypto";
|
||||||
|
import * as fs from "node:fs";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import * as stream from "node:stream";
|
import * as stream from "node:stream";
|
||||||
import * as util from "node:util";
|
import * as util from "node:util";
|
||||||
|
import { detectSensitive } from "@/services/detect-sensitive.js";
|
||||||
|
import { encode } from "blurhash";
|
||||||
import { FSWatcher } from "chokidar";
|
import { FSWatcher } from "chokidar";
|
||||||
import { fileTypeFromFile } from "file-type";
|
import { fileTypeFromFile } from "file-type";
|
||||||
import probeImageSize from "probe-image-size";
|
|
||||||
import FFmpeg from "fluent-ffmpeg";
|
import FFmpeg from "fluent-ffmpeg";
|
||||||
import isSvg from "is-svg";
|
import isSvg from "is-svg";
|
||||||
import { type predictionType } from "nsfwjs";
|
import { type predictionType } from "nsfwjs";
|
||||||
|
import probeImageSize from "probe-image-size";
|
||||||
import sharp from "sharp";
|
import sharp from "sharp";
|
||||||
import { encode } from "blurhash";
|
|
||||||
import { detectSensitive } from "@/services/detect-sensitive.js";
|
|
||||||
import { createTempDir } from "./create-temp.js";
|
import { createTempDir } from "./create-temp.js";
|
||||||
|
|
||||||
const pipeline = util.promisify(stream.pipeline);
|
const pipeline = util.promisify(stream.pipeline);
|
||||||
|
|
|
@ -19,7 +19,7 @@ function getNoise() {
|
||||||
|
|
||||||
export function genAid(date: Date): string {
|
export function genAid(date: Date): string {
|
||||||
const t = date.getTime();
|
const t = date.getTime();
|
||||||
if (isNaN(t)) throw "Failed to create AID: Invalid Date";
|
if (Number.isNaN(t)) throw "Failed to create AID: Invalid Date";
|
||||||
counter++;
|
counter++;
|
||||||
return getTime(t) + getNoise();
|
return getTime(t) + getNoise();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { UserKeypairs } from "@/models/index.js";
|
|
||||||
import type { User } from "@/models/entities/user.js";
|
|
||||||
import type { UserKeypair } from "@/models/entities/user-keypair.js";
|
import type { UserKeypair } from "@/models/entities/user-keypair.js";
|
||||||
|
import type { User } from "@/models/entities/user.js";
|
||||||
|
import { UserKeypairs } from "@/models/index.js";
|
||||||
import { Cache } from "./cache.js";
|
import { Cache } from "./cache.js";
|
||||||
|
|
||||||
const cache = new Cache<UserKeypair>("keypairStore", 60 * 30);
|
const cache = new Cache<UserKeypair>("keypairStore", 60 * 30);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import bcrypt from "bcryptjs";
|
|
||||||
import * as argon2 from "argon2";
|
import * as argon2 from "argon2";
|
||||||
|
import bcrypt from "bcryptjs";
|
||||||
|
|
||||||
export async function hashPassword(password: string): Promise<string> {
|
export async function hashPassword(password: string): Promise<string> {
|
||||||
return argon2.hash(password);
|
return argon2.hash(password);
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { In, IsNull } from "typeorm";
|
import config from "@/config/index.js";
|
||||||
import { Emojis } from "@/models/index.js";
|
import { redisClient } from "@/db/redis.js";
|
||||||
import type { Emoji } from "@/models/entities/emoji.js";
|
import type { Emoji } from "@/models/entities/emoji.js";
|
||||||
import type { Note } from "@/models/entities/note.js";
|
import type { Note } from "@/models/entities/note.js";
|
||||||
|
import { Emojis } from "@/models/index.js";
|
||||||
|
import { query } from "@/prelude/url.js";
|
||||||
|
import { In, IsNull } from "typeorm";
|
||||||
import { Cache } from "./cache.js";
|
import { Cache } from "./cache.js";
|
||||||
import { isSelfHost, toPunyNullable } from "./convert-host.js";
|
import { isSelfHost, toPunyNullable } from "./convert-host.js";
|
||||||
import { decodeReaction } from "./reaction-lib.js";
|
import { decodeReaction } from "./reaction-lib.js";
|
||||||
import config from "@/config/index.js";
|
|
||||||
import { query } from "@/prelude/url.js";
|
|
||||||
import { redisClient } from "@/db/redis.js";
|
|
||||||
|
|
||||||
const cache = new Cache<Emoji | null>("populateEmojis", 60 * 60 * 12);
|
const cache = new Cache<Emoji | null>("populateEmojis", 60 * 60 * 12);
|
||||||
|
|
||||||
|
@ -118,12 +118,12 @@ export function aggregateNoteEmojis(notes: Note[]) {
|
||||||
);
|
);
|
||||||
if (note.renote) {
|
if (note.renote) {
|
||||||
emojis = emojis.concat(
|
emojis = emojis.concat(
|
||||||
note.renote.emojis.map((e) => parseEmojiStr(e, note.renote!.userHost)),
|
note.renote.emojis.map((e) => parseEmojiStr(e, note.renote?.userHost)),
|
||||||
);
|
);
|
||||||
if (note.renote.user) {
|
if (note.renote.user) {
|
||||||
emojis = emojis.concat(
|
emojis = emojis.concat(
|
||||||
note.renote.user.emojis.map((e) =>
|
note.renote.user.emojis.map((e) =>
|
||||||
parseEmojiStr(e, note.renote!.userHost),
|
parseEmojiStr(e, note.renote?.userHost),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ export function parse(acct: any): Post {
|
||||||
cw: acct.cw,
|
cw: acct.cw,
|
||||||
localOnly: acct.localOnly,
|
localOnly: acct.localOnly,
|
||||||
createdAt: new Date(acct.createdAt),
|
createdAt: new Date(acct.createdAt),
|
||||||
visibility: "hidden" + (acct.visibility || ""),
|
visibility: `hidden${acct.visibility || ""}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
|
import * as Path from "node:path";
|
||||||
|
import { Users } from "@/models/index.js";
|
||||||
|
import { addFile } from "@/services/drive/add-file.js";
|
||||||
import Logger from "@/services/logger.js";
|
import Logger from "@/services/logger.js";
|
||||||
|
import decompress from "decompress";
|
||||||
|
import gunzip from "gunzip-maybe";
|
||||||
|
import * as tar from "tar-stream";
|
||||||
import { createTemp, createTempDir } from "./create-temp.js";
|
import { createTemp, createTempDir } from "./create-temp.js";
|
||||||
import { downloadUrl } from "./download-url.js";
|
import { downloadUrl } from "./download-url.js";
|
||||||
import { addFile } from "@/services/drive/add-file.js";
|
|
||||||
import { Users } from "@/models/index.js";
|
|
||||||
import * as tar from "tar-stream";
|
|
||||||
import gunzip from "gunzip-maybe";
|
|
||||||
import decompress from "decompress";
|
|
||||||
import * as Path from "node:path";
|
|
||||||
|
|
||||||
const logger = new Logger("process-masto-notes");
|
const logger = new Logger("process-masto-notes");
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ function unzipTarGz(fn: string, dir: string) {
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
const extract = tar.extract().on("error", onErr);
|
const extract = tar.extract().on("error", onErr);
|
||||||
dir = dir.endsWith("/") ? dir : dir + "/";
|
dir = dir.endsWith("/") ? dir : `${dir}/`;
|
||||||
const ls: string[] = [];
|
const ls: string[] = [];
|
||||||
extract.on("entry", function (header: any, stream: any, next: any) {
|
extract.on("entry", function (header: any, stream: any, next: any) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import { Emojis } from "@/models/index.js";
|
||||||
|
import { IsNull } from "typeorm";
|
||||||
|
import { toPunyNullable } from "./convert-host.js";
|
||||||
import { emojiRegex } from "./emoji-regex.js";
|
import { emojiRegex } from "./emoji-regex.js";
|
||||||
import { fetchMeta } from "./fetch-meta.js";
|
import { fetchMeta } from "./fetch-meta.js";
|
||||||
import { Emojis } from "@/models/index.js";
|
|
||||||
import { toPunyNullable } from "./convert-host.js";
|
|
||||||
import { IsNull } from "typeorm";
|
|
||||||
|
|
||||||
export function convertReactions(reactions: Record<string, number>) {
|
export function convertReactions(reactions: Record<string, number>) {
|
||||||
const result = new Map();
|
const result = new Map();
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
import {
|
import { packedAntennaSchema } from "@/models/schema/antenna.js";
|
||||||
packedUserLiteSchema,
|
|
||||||
packedUserDetailedNotMeOnlySchema,
|
|
||||||
packedMeDetailedOnlySchema,
|
|
||||||
packedUserDetailedNotMeSchema,
|
|
||||||
packedMeDetailedSchema,
|
|
||||||
packedUserDetailedSchema,
|
|
||||||
packedUserSchema,
|
|
||||||
} from "@/models/schema/user.js";
|
|
||||||
import { packedNoteSchema } from "@/models/schema/note.js";
|
|
||||||
import { packedUserListSchema } from "@/models/schema/user-list.js";
|
|
||||||
import { packedAppSchema } from "@/models/schema/app.js";
|
import { packedAppSchema } from "@/models/schema/app.js";
|
||||||
import { packedMessagingMessageSchema } from "@/models/schema/messaging-message.js";
|
import { packedBlockingSchema } from "@/models/schema/blocking.js";
|
||||||
import { packedNotificationSchema } from "@/models/schema/notification.js";
|
import { packedChannelSchema } from "@/models/schema/channel.js";
|
||||||
|
import { packedClipSchema } from "@/models/schema/clip.js";
|
||||||
import { packedDriveFileSchema } from "@/models/schema/drive-file.js";
|
import { packedDriveFileSchema } from "@/models/schema/drive-file.js";
|
||||||
import { packedDriveFolderSchema } from "@/models/schema/drive-folder.js";
|
import { packedDriveFolderSchema } from "@/models/schema/drive-folder.js";
|
||||||
import { packedFollowingSchema } from "@/models/schema/following.js";
|
|
||||||
import { packedMutingSchema } from "@/models/schema/muting.js";
|
|
||||||
import { packedRenoteMutingSchema } from "@/models/schema/renote-muting.js";
|
|
||||||
import { packedBlockingSchema } from "@/models/schema/blocking.js";
|
|
||||||
import { packedNoteReactionSchema } from "@/models/schema/note-reaction.js";
|
|
||||||
import { packedHashtagSchema } from "@/models/schema/hashtag.js";
|
|
||||||
import { packedPageSchema } from "@/models/schema/page.js";
|
|
||||||
import { packedUserGroupSchema } from "@/models/schema/user-group.js";
|
|
||||||
import { packedNoteFavoriteSchema } from "@/models/schema/note-favorite.js";
|
|
||||||
import { packedChannelSchema } from "@/models/schema/channel.js";
|
|
||||||
import { packedAntennaSchema } from "@/models/schema/antenna.js";
|
|
||||||
import { packedClipSchema } from "@/models/schema/clip.js";
|
|
||||||
import { packedFederationInstanceSchema } from "@/models/schema/federation-instance.js";
|
|
||||||
import { packedQueueCountSchema } from "@/models/schema/queue.js";
|
|
||||||
import { packedGalleryPostSchema } from "@/models/schema/gallery-post.js";
|
|
||||||
import { packedEmojiSchema } from "@/models/schema/emoji.js";
|
import { packedEmojiSchema } from "@/models/schema/emoji.js";
|
||||||
|
import { packedFederationInstanceSchema } from "@/models/schema/federation-instance.js";
|
||||||
|
import { packedFollowingSchema } from "@/models/schema/following.js";
|
||||||
|
import { packedGalleryPostSchema } from "@/models/schema/gallery-post.js";
|
||||||
|
import { packedHashtagSchema } from "@/models/schema/hashtag.js";
|
||||||
|
import { packedMessagingMessageSchema } from "@/models/schema/messaging-message.js";
|
||||||
|
import { packedMutingSchema } from "@/models/schema/muting.js";
|
||||||
import { packedNoteEdit } from "@/models/schema/note-edit.js";
|
import { packedNoteEdit } from "@/models/schema/note-edit.js";
|
||||||
|
import { packedNoteFavoriteSchema } from "@/models/schema/note-favorite.js";
|
||||||
|
import { packedNoteReactionSchema } from "@/models/schema/note-reaction.js";
|
||||||
|
import { packedNoteSchema } from "@/models/schema/note.js";
|
||||||
|
import { packedNotificationSchema } from "@/models/schema/notification.js";
|
||||||
|
import { packedPageSchema } from "@/models/schema/page.js";
|
||||||
|
import { packedQueueCountSchema } from "@/models/schema/queue.js";
|
||||||
|
import { packedRenoteMutingSchema } from "@/models/schema/renote-muting.js";
|
||||||
|
import { packedUserGroupSchema } from "@/models/schema/user-group.js";
|
||||||
|
import { packedUserListSchema } from "@/models/schema/user-list.js";
|
||||||
|
import {
|
||||||
|
packedMeDetailedOnlySchema,
|
||||||
|
packedMeDetailedSchema,
|
||||||
|
packedUserDetailedNotMeOnlySchema,
|
||||||
|
packedUserDetailedNotMeSchema,
|
||||||
|
packedUserDetailedSchema,
|
||||||
|
packedUserLiteSchema,
|
||||||
|
packedUserSchema,
|
||||||
|
} from "@/models/schema/user.js";
|
||||||
|
|
||||||
export const refs = {
|
export const refs = {
|
||||||
UserLite: packedUserLiteSchema,
|
UserLite: packedUserLiteSchema,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as os from "node:os";
|
import * as os from "node:os";
|
||||||
import sysUtils from "systeminformation";
|
|
||||||
import type Logger from "@/services/logger.js";
|
import type Logger from "@/services/logger.js";
|
||||||
|
import sysUtils from "systeminformation";
|
||||||
|
|
||||||
export async function showMachineInfo(parentLogger: Logger) {
|
export async function showMachineInfo(parentLogger: Logger) {
|
||||||
const logger = parentLogger.createSubLogger("machine");
|
const logger = parentLogger.createSubLogger("machine");
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Brackets } from "typeorm";
|
|
||||||
import { fetchMeta } from "@/misc/fetch-meta.js";
|
|
||||||
import { Instances } from "@/models/index.js";
|
|
||||||
import type { Instance } from "@/models/entities/instance.js";
|
|
||||||
import { DAY } from "@/const.js";
|
import { DAY } from "@/const.js";
|
||||||
|
import { fetchMeta } from "@/misc/fetch-meta.js";
|
||||||
|
import type { Instance } from "@/models/entities/instance.js";
|
||||||
|
import { Instances } from "@/models/index.js";
|
||||||
|
import { Brackets } from "typeorm";
|
||||||
import { shouldBlockInstance } from "./should-block-instance.js";
|
import { shouldBlockInstance } from "./should-block-instance.js";
|
||||||
|
|
||||||
// Threshold from last contact after which an instance will be considered
|
// Threshold from last contact after which an instance will be considered
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Webhooks } from "@/models/index.js";
|
|
||||||
import type { Webhook } from "@/models/entities/webhook.js";
|
|
||||||
import { subscriber } from "@/db/redis.js";
|
import { subscriber } from "@/db/redis.js";
|
||||||
|
import type { Webhook } from "@/models/entities/webhook.js";
|
||||||
|
import { Webhooks } from "@/models/index.js";
|
||||||
|
|
||||||
let webhooksFetched = false;
|
let webhooksFetched = false;
|
||||||
let webhooks: Webhook[] = [];
|
let webhooks: Webhook[] = [];
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AbuseUserReport {
|
export class AbuseUserReport {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
Entity,
|
|
||||||
PrimaryColumn,
|
|
||||||
Index,
|
|
||||||
Column,
|
Column,
|
||||||
ManyToOne,
|
Entity,
|
||||||
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { App } from "./app.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { App } from "./app.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AccessToken {
|
export class AccessToken {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Entity, Index, Column, PrimaryColumn } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { Announcement } from "./announcement.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { Announcement } from "./announcement.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "announcementId"], { unique: true })
|
@Index(["userId", "announcementId"], { unique: true })
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Entity, Index, Column, PrimaryColumn } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { UserList } from "./user-list.js";
|
|
||||||
import { UserGroupJoining } from "./user-group-joining.js";
|
import { UserGroupJoining } from "./user-group-joining.js";
|
||||||
|
import { UserList } from "./user-list.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Antenna {
|
export class Antenna {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Entity, PrimaryColumn, Column, Index, ManyToOne } from "typeorm";
|
import { Column, Entity, Index, ManyToOne, PrimaryColumn } from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class App {
|
export class App {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
|
||||||
Entity,
|
|
||||||
JoinColumn,
|
|
||||||
Column,
|
Column,
|
||||||
ManyToOne,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
|
JoinColumn,
|
||||||
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AttestationChallenge {
|
export class AttestationChallenge {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
Entity,
|
|
||||||
PrimaryColumn,
|
|
||||||
Index,
|
|
||||||
Column,
|
Column,
|
||||||
ManyToOne,
|
Entity,
|
||||||
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { App } from "./app.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { App } from "./app.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class AuthSession {
|
export class AuthSession {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["blockerId", "blockeeId"], { unique: true })
|
@Index(["blockerId", "blockeeId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { Channel } from "./channel.js";
|
import { Channel } from "./channel.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["followerId", "followeeId"], { unique: true })
|
@Index(["followerId", "followeeId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { Channel } from "./channel.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { Channel } from "./channel.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["channelId", "noteId"], { unique: true })
|
@Index(["channelId", "noteId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { DriveFile } from "./drive-file.js";
|
import { DriveFile } from "./drive-file.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Channel {
|
export class Channel {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
PrimaryColumn,
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { Clip } from "./clip.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { Clip } from "./clip.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["noteId", "clipId"], { unique: true })
|
@Index(["noteId", "clipId"], { unique: true })
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Clip {
|
export class Clip {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
|
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { DriveFolder } from "./drive-folder.js";
|
import { DriveFolder } from "./drive-folder.js";
|
||||||
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "folderId", "id"])
|
@Index(["userId", "folderId", "id"])
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
|
Entity,
|
||||||
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
Entity,
|
|
||||||
PrimaryColumn,
|
PrimaryColumn,
|
||||||
Index,
|
|
||||||
Column,
|
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class DriveFolder {
|
export class DriveFolder {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["followerId", "followeeId"], { unique: true })
|
@Index(["followerId", "followeeId"], { unique: true })
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["followerId", "followeeId"], { unique: true })
|
@Index(["followerId", "followeeId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { GalleryPost } from "./gallery-post.js";
|
import { GalleryPost } from "./gallery-post.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "postId"], { unique: true })
|
@Index(["userId", "postId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
PrimaryColumn,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import type { DriveFile } from "./drive-file.js";
|
import type { DriveFile } from "./drive-file.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class GalleryPost {
|
export class GalleryPost {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Entity, PrimaryColumn, Index, Column } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import type { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import type { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Hashtag {
|
export class Hashtag {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Entity, PrimaryColumn, Index, Column } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { DriveFile } from "./drive-file.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { DriveFile } from "./drive-file.js";
|
||||||
import { UserGroup } from "./user-group.js";
|
import { UserGroup } from "./user-group.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class MessagingMessage {
|
export class MessagingMessage {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from "typeorm";
|
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { User } from "./user.js";
|
|
||||||
import type { Clip } from "./clip.js";
|
import type { Clip } from "./clip.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Meta {
|
export class Meta {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class ModerationLog {
|
export class ModerationLog {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
PrimaryColumn,
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
|
import { mutedNoteReasons } from "../../types.js";
|
||||||
|
import { id } from "../id.js";
|
||||||
import { Note } from "./note.js";
|
import { Note } from "./note.js";
|
||||||
import { User } from "./user.js";
|
import { User } from "./user.js";
|
||||||
import { id } from "../id.js";
|
|
||||||
import { mutedNoteReasons } from "../../types.js";
|
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["noteId", "userId"], { unique: true })
|
@Index(["noteId", "userId"], { unique: true })
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["muterId", "muteeId"], { unique: true })
|
@Index(["muterId", "muteeId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
Entity,
|
|
||||||
JoinColumn,
|
|
||||||
Column,
|
Column,
|
||||||
|
Entity,
|
||||||
|
Index,
|
||||||
|
JoinColumn,
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
PrimaryColumn,
|
PrimaryColumn,
|
||||||
Index,
|
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { DriveFile } from "./drive-file.js";
|
import { DriveFile } from "./drive-file.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class NoteEdit {
|
export class NoteEdit {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
|
import { id } from "../id.js";
|
||||||
import { Note } from "./note.js";
|
import { Note } from "./note.js";
|
||||||
import { User } from "./user.js";
|
import { User } from "./user.js";
|
||||||
import { id } from "../id.js";
|
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "noteId"], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "noteId"], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "threadId"], { unique: true })
|
@Index(["userId", "threadId"], { unique: true })
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import type { Channel } from "./channel.js";
|
import type { Channel } from "./channel.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "noteId"], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "noteId"], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
PrimaryColumn,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import type { DriveFile } from "./drive-file.js";
|
|
||||||
import { id } from "../id.js";
|
|
||||||
import { noteVisibilities } from "../../types.js";
|
import { noteVisibilities } from "../../types.js";
|
||||||
|
import { id } from "../id.js";
|
||||||
import { Channel } from "./channel.js";
|
import { Channel } from "./channel.js";
|
||||||
|
import type { DriveFile } from "./drive-file.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index("IDX_NOTE_TAGS", { synchronize: false })
|
@Index("IDX_NOTE_TAGS", { synchronize: false })
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
|
import { notificationTypes } from "@/types.js";
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
Column,
|
|
||||||
PrimaryColumn,
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { FollowRequest } from "./follow-request.js";
|
|
||||||
import { UserGroupInvitation } from "./user-group-invitation.js";
|
|
||||||
import { AccessToken } from "./access-token.js";
|
import { AccessToken } from "./access-token.js";
|
||||||
import { notificationTypes } from "@/types.js";
|
import { FollowRequest } from "./follow-request.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
import { UserGroupInvitation } from "./user-group-invitation.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Notification {
|
export class Notification {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { Page } from "./page.js";
|
import { Page } from "./page.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "pageId"], { unique: true })
|
@Index(["userId", "pageId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
PrimaryColumn,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { DriveFile } from "./drive-file.js";
|
import { DriveFile } from "./drive-file.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "name"], { unique: true })
|
@Index(["userId", "name"], { unique: true })
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { User } from "./user.js";
|
import { User } from "./user.js";
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { Note } from "./note.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { Note } from "./note.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "noteId", "choice"], { unique: true })
|
@Index(["userId", "noteId", "choice"], { unique: true })
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
OneToOne,
|
OneToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
|
import { noteVisibilities } from "../../types.js";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { Note } from "./note.js";
|
import { Note } from "./note.js";
|
||||||
import type { User } from "./user.js";
|
import type { User } from "./user.js";
|
||||||
import { noteVisibilities } from "../../types.js";
|
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Poll {
|
export class Poll {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
OneToOne,
|
OneToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
|
import { id } from "../id.js";
|
||||||
import { Note } from "./note.js";
|
import { Note } from "./note.js";
|
||||||
import type { User } from "./user.js";
|
import type { User } from "./user.js";
|
||||||
import { id } from "../id.js";
|
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class PromoNote {
|
export class PromoNote {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
|
import { id } from "../id.js";
|
||||||
import { Note } from "./note.js";
|
import { Note } from "./note.js";
|
||||||
import { User } from "./user.js";
|
import { User } from "./user.js";
|
||||||
import { id } from "../id.js";
|
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "noteId"], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
// TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい
|
// TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { User } from "./user.js";
|
import { User } from "./user.js";
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Signin {
|
export class Signin {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class SwSubscription {
|
export class SwSubscription {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { PrimaryColumn, Entity, Column } from "typeorm";
|
import { Column, Entity, PrimaryColumn } from "typeorm";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UsedUsername {
|
export class UsedUsername {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { UserGroup } from "./user-group.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { UserGroup } from "./user-group.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "userGroupId"], { unique: true })
|
@Index(["userId", "userGroupId"], { unique: true })
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { UserGroup } from "./user-group.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { UserGroup } from "./user-group.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "userGroupId"], { unique: true })
|
@Index(["userId", "userGroupId"], { unique: true })
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
PrimaryColumn,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserGroup {
|
export class UserGroup {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Entity, Index, Column, PrimaryGeneratedColumn } from "typeorm";
|
import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import type { User } from "./user.js";
|
import type { User } from "./user.js";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from "typeorm";
|
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserKeypair {
|
export class UserKeypair {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { UserList } from "./user-list.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { UserList } from "./user-list.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "userListId"], { unique: true })
|
@Index(["userId", "userListId"], { unique: true })
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserList {
|
export class UserList {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
|
import { id } from "../id.js";
|
||||||
import { Note } from "./note.js";
|
import { Note } from "./note.js";
|
||||||
import { User } from "./user.js";
|
import { User } from "./user.js";
|
||||||
import { id } from "../id.js";
|
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(["userId", "noteId"], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { PrimaryColumn, Entity, Index, Column } from "typeorm";
|
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
|
import { ffVisibility, notificationTypes } from "@/types.js";
|
||||||
import {
|
import {
|
||||||
Entity,
|
|
||||||
Column,
|
Column,
|
||||||
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
OneToOne,
|
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
|
OneToOne,
|
||||||
PrimaryColumn,
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { ffVisibility, notificationTypes } from "@/types.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { Page } from "./page.js";
|
import { Page } from "./page.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
|
// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
|
||||||
// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
|
// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
PrimaryColumn,
|
Column,
|
||||||
Entity,
|
Entity,
|
||||||
Index,
|
Index,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
Column,
|
|
||||||
OneToOne,
|
OneToOne,
|
||||||
|
PrimaryColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { User } from "./user.js";
|
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
import { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserPublickey {
|
export class UserPublickey {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue