Commit 42cc93dd authored by syuilo's avatar syuilo
Browse files

fix: mochaが動かないため拡張子なしに戻した

parent e9f34a0f
import { Command } from 'commander';
import config from '@/config/index.js';
import config from '@/config/index';
const program = new Command();
......
......@@ -2,13 +2,13 @@ import * as cluster from 'cluster';
import * as chalk from 'chalk';
import Xev from 'xev';
import Logger from '@/services/logger.js';
import { program } from '../argv.js';
import Logger from '@/services/logger';
import { program } from '../argv';
// for typeorm
import 'reflect-metadata';
import { masterMain } from './master.js';
import { workerMain } from './worker.js';
import { masterMain } from './master';
import { workerMain } from './worker';
const logger = new Logger('core', 'cyan');
const clusterLogger = logger.createSubLogger('cluster', 'orange', false);
......
......@@ -4,13 +4,13 @@ import * as chalk from 'chalk';
import * as portscanner from 'portscanner';
import { getConnection } from 'typeorm';
import Logger from '@/services/logger.js';
import loadConfig from '@/config/load.js';
import { Config } from '@/config/types.js';
import { lessThan } from '../prelude/array.js';
import { program } from '../argv.js';
import { showMachineInfo } from '@/misc/show-machine-info.js';
import { initDb } from '../db/postgre.js';
import Logger from '@/services/logger';
import loadConfig from '@/config/load';
import { Config } from '@/config/types';
import { lessThan } from '../prelude/array';
import { program } from '../argv';
import { showMachineInfo } from '@/misc/show-machine-info';
import { initDb } from '../db/postgre';
import * as meta from '../meta.json';
const logger = new Logger('core', 'cyan');
......
import * as cluster from 'cluster';
import { initDb } from '../db/postgre.js';
import { initDb } from '../db/postgre';
/**
* Init worker process
......
import load from './load.js';
import load from './load';
export default load();
......@@ -6,7 +6,7 @@ import * as fs from 'fs';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types.js';
import { Source, Mixin } from './types';
import * as meta from '../meta.json';
//const _filename = fileURLToPath(import.meta.url);
......
// TODO: 消したい
const interval = 30 * 60 * 1000;
import { AttestationChallenges } from '@/models/index.js';
import { AttestationChallenges } from '@/models/index';
import { LessThan } from 'typeorm';
/**
......
import Xev from 'xev';
import { deliverQueue, inboxQueue } from '../queue/queues.js';
import { deliverQueue, inboxQueue } from '../queue/queues';
const ev = new Xev();
......
import * as elasticsearch from '@elastic/elasticsearch';
import config from '@/config/index.js';
import config from '@/config/index';
const index = {
settings: {
......
import Logger from '@/services/logger.js';
import Logger from '@/services/logger';
export const dbLogger = new Logger('db');
......@@ -3,75 +3,75 @@ const types = require('pg').types;
types.setTypeParser(20, Number);
import { createConnection, Logger, getConnection } from 'typeorm';
import config from '@/config/index.js';
import { entities as charts } from '@/services/chart/entities.js';
import { dbLogger } from './logger.js';
import config from '@/config/index';
import { entities as charts } from '@/services/chart/entities';
import { dbLogger } from './logger';
import * as highlight from 'cli-highlight';
import { Log } from '@/models/entities/log.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 { 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 { 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 { RegistrationTicket } from '@/models/entities/registration-tickets.js';
import { MessagingMessage } from '@/models/entities/messaging-message.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 { ReversiGame } from '@/models/entities/games/reversi/game.js';
import { ReversiMatching } from '@/models/entities/games/reversi/matching.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 { Clip } from '@/models/entities/clip.js';
import { ClipNote } from '@/models/entities/clip-note.js';
import { Antenna } from '@/models/entities/antenna.js';
import { AntennaNote } from '@/models/entities/antenna-note.js';
import { PromoNote } from '@/models/entities/promo-note.js';
import { PromoRead } from '@/models/entities/promo-read.js';
import { program } from '../argv.js';
import { Relay } from '@/models/entities/relay.js';
import { MutedNote } from '@/models/entities/muted-note.js';
import { Channel } from '@/models/entities/channel.js';
import { ChannelFollowing } from '@/models/entities/channel-following.js';
import { ChannelNotePining } from '@/models/entities/channel-note-pining.js';
import { RegistryItem } from '@/models/entities/registry-item.js';
import { Ad } from '@/models/entities/ad.js';
import { PasswordResetRequest } from '@/models/entities/password-reset-request.js';
import { Log } from '@/models/entities/log';
import { User } from '@/models/entities/user';
import { DriveFile } from '@/models/entities/drive-file';
import { DriveFolder } from '@/models/entities/drive-folder';
import { AccessToken } from '@/models/entities/access-token';
import { App } from '@/models/entities/app';
import { PollVote } from '@/models/entities/poll-vote';
import { Note } from '@/models/entities/note';
import { NoteReaction } from '@/models/entities/note-reaction';
import { NoteWatching } from '@/models/entities/note-watching';
import { NoteUnread } from '@/models/entities/note-unread';
import { Notification } from '@/models/entities/notification';
import { Meta } from '@/models/entities/meta';
import { Following } from '@/models/entities/following';
import { Instance } from '@/models/entities/instance';
import { Muting } from '@/models/entities/muting';
import { SwSubscription } from '@/models/entities/sw-subscription';
import { Blocking } from '@/models/entities/blocking';
import { UserList } from '@/models/entities/user-list';
import { UserListJoining } from '@/models/entities/user-list-joining';
import { UserGroup } from '@/models/entities/user-group';
import { UserGroupJoining } from '@/models/entities/user-group-joining';
import { UserGroupInvitation } from '@/models/entities/user-group-invitation';
import { Hashtag } from '@/models/entities/hashtag';
import { NoteFavorite } from '@/models/entities/note-favorite';
import { AbuseUserReport } from '@/models/entities/abuse-user-report';
import { RegistrationTicket } from '@/models/entities/registration-tickets';
import { MessagingMessage } from '@/models/entities/messaging-message';
import { Signin } from '@/models/entities/signin';
import { AuthSession } from '@/models/entities/auth-session';
import { FollowRequest } from '@/models/entities/follow-request';
import { Emoji } from '@/models/entities/emoji';
import { ReversiGame } from '@/models/entities/games/reversi/game';
import { ReversiMatching } from '@/models/entities/games/reversi/matching';
import { UserNotePining } from '@/models/entities/user-note-pining';
import { Poll } from '@/models/entities/poll';
import { UserKeypair } from '@/models/entities/user-keypair';
import { UserPublickey } from '@/models/entities/user-publickey';
import { UserProfile } from '@/models/entities/user-profile';
import { UserSecurityKey } from '@/models/entities/user-security-key';
import { AttestationChallenge } from '@/models/entities/attestation-challenge';
import { Page } from '@/models/entities/page';
import { PageLike } from '@/models/entities/page-like';
import { GalleryPost } from '@/models/entities/gallery-post';
import { GalleryLike } from '@/models/entities/gallery-like';
import { ModerationLog } from '@/models/entities/moderation-log';
import { UsedUsername } from '@/models/entities/used-username';
import { Announcement } from '@/models/entities/announcement';
import { AnnouncementRead } from '@/models/entities/announcement-read';
import { Clip } from '@/models/entities/clip';
import { ClipNote } from '@/models/entities/clip-note';
import { Antenna } from '@/models/entities/antenna';
import { AntennaNote } from '@/models/entities/antenna-note';
import { PromoNote } from '@/models/entities/promo-note';
import { PromoRead } from '@/models/entities/promo-read';
import { program } from '../argv';
import { Relay } from '@/models/entities/relay';
import { MutedNote } from '@/models/entities/muted-note';
import { Channel } from '@/models/entities/channel';
import { ChannelFollowing } from '@/models/entities/channel-following';
import { ChannelNotePining } from '@/models/entities/channel-note-pining';
import { RegistryItem } from '@/models/entities/registry-item';
import { Ad } from '@/models/entities/ad';
import { PasswordResetRequest } from '@/models/entities/password-reset-request';
const sqlLogger = dbLogger.createSubLogger('sql', 'white', false);
......
import * as redis from 'redis';
import config from '@/config/index.js';
import config from '@/config/index';
export function createConnection() {
return redis.createClient(
......
......@@ -6,7 +6,7 @@ Error.stackTraceLimit = Infinity;
require('events').EventEmitter.defaultMaxListeners = 128;
import boot from './boot/index.js';
import boot from './boot/index';
export default function() {
return boot();
......
import { JSDOM } from 'jsdom';
import * as mfm from 'mfm-js';
import config from '@/config/index.js';
import { intersperse } from '../prelude/array.js';
import { IMentionedRemoteUsers } from '@/models/entities/note.js';
import { wellKnownServices } from '../well-known-services.js';
import config from '@/config/index';
import { intersperse } from '../prelude/array';
import { IMentionedRemoteUsers } from '@/models/entities/note';
import { wellKnownServices } from '../well-known-services';
export function toHtml(nodes: mfm.MfmNode[] | null, mentionedRemoteUsers: IMentionedRemoteUsers = []) {
if (nodes == null) {
......
import { Antennas } from '@/models/index.js';
import { Antenna } from '@/models/entities/antenna.js';
import { subsdcriber } from '../db/redis.js';
import { Antennas } from '@/models/index';
import { Antenna } from '@/models/entities/antenna';
import { subsdcriber } from '../db/redis';
let antennasFetched = false;
let antennas: Antenna[] = [];
......
import { redisClient } from '../db/redis.js';
import { redisClient } from '../db/redis';
import { promisify } from 'util';
import * as redisLock from 'redis-lock';
......
import fetch from 'node-fetch';
import { URLSearchParams } from 'url';
import { getAgentByUrl } from './fetch.js';
import config from '@/config/index.js';
import { getAgentByUrl } from './fetch';
import config from '@/config/index';
export async function verifyRecaptcha(secret: string, response: string) {
const result = await getCaptchaResponse('https://www.recaptcha.net/recaptcha/api/siteverify', secret, response).catch(e => {
......
import { Antenna } from '@/models/entities/antenna.js';
import { Note } from '@/models/entities/note.js';
import { User } from '@/models/entities/user.js';
import { UserListJoinings, UserGroupJoinings } from '@/models/index.js';
import { getFullApAccount } from './convert-host.js';
import { PackedNote } from '../models/repositories/note.js';
import { parseAcct } from '@/misc/acct.js';
import { Antenna } from '@/models/entities/antenna';
import { Note } from '@/models/entities/note';
import { User } from '@/models/entities/user';
import { UserListJoinings, UserGroupJoinings } from '@/models/index';
import { getFullApAccount } from './convert-host';
import { PackedNote } from '../models/repositories/note';
import { parseAcct } from '@/misc/acct';
/**
* noteUserFollowers / antennaUserFollowing はどちらか一方が指定されていればよい
......
const RE2 = require('re2');
import { Note } from '@/models/entities/note.js';
import { User } from '@/models/entities/user.js';
import { Note } from '@/models/entities/note';
import { User } from '@/models/entities/user';
type NoteLike = {
userId: Note['userId'];
......
import { URL } from 'url';
import config from '@/config/index.js';
import config from '@/config/index';
import { toASCII } from 'punycode/';
export function getFullApAccount(username: string, host: string | null) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment