diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-19 21:55:45 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-19 21:55:45 +0900 |
| commit | 42cc93dd0f189995f29fc87d2734fc809105a7cf (patch) | |
| tree | 7a74658a76d71d4c07bf89a7028fa1786af0e13e /src/misc | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | sharkey-42cc93dd0f189995f29fc87d2734fc809105a7cf.tar.gz sharkey-42cc93dd0f189995f29fc87d2734fc809105a7cf.tar.bz2 sharkey-42cc93dd0f189995f29fc87d2734fc809105a7cf.zip | |
fix: mochaが動かないため拡張子なしに戻した
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/antenna-cache.ts | 6 | ||||
| -rw-r--r-- | src/misc/app-lock.ts | 2 | ||||
| -rw-r--r-- | src/misc/captcha.ts | 4 | ||||
| -rw-r--r-- | src/misc/check-hit-antenna.ts | 14 | ||||
| -rw-r--r-- | src/misc/check-word-mute.ts | 4 | ||||
| -rw-r--r-- | src/misc/convert-host.ts | 2 | ||||
| -rw-r--r-- | src/misc/count-same-renotes.ts | 2 | ||||
| -rw-r--r-- | src/misc/detect-url-mime.ts | 6 | ||||
| -rw-r--r-- | src/misc/download-text-file.ts | 6 | ||||
| -rw-r--r-- | src/misc/download-url.ts | 6 | ||||
| -rw-r--r-- | src/misc/extract-custom-emojis-from-mfm.ts | 2 | ||||
| -rw-r--r-- | src/misc/extract-hashtags.ts | 2 | ||||
| -rw-r--r-- | src/misc/fetch-meta.ts | 2 | ||||
| -rw-r--r-- | src/misc/fetch-proxy-account.ts | 6 | ||||
| -rw-r--r-- | src/misc/fetch.ts | 2 | ||||
| -rw-r--r-- | src/misc/gen-id.ts | 10 | ||||
| -rw-r--r-- | src/misc/get-user-name.ts | 2 | ||||
| -rw-r--r-- | src/misc/is-quote.ts | 2 | ||||
| -rw-r--r-- | src/misc/keypair-store.ts | 8 | ||||
| -rw-r--r-- | src/misc/populate-emojis.ts | 16 | ||||
| -rw-r--r-- | src/misc/reaction-lib.ts | 8 | ||||
| -rw-r--r-- | src/misc/show-machine-info.ts | 2 |
22 files changed, 57 insertions, 57 deletions
diff --git a/src/misc/antenna-cache.ts b/src/misc/antenna-cache.ts index dcf96c1610..a23eeb45ec 100644 --- a/src/misc/antenna-cache.ts +++ b/src/misc/antenna-cache.ts @@ -1,6 +1,6 @@ -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[] = []; diff --git a/src/misc/app-lock.ts b/src/misc/app-lock.ts index 52ac680715..a32b600612 100644 --- a/src/misc/app-lock.ts +++ b/src/misc/app-lock.ts @@ -1,4 +1,4 @@ -import { redisClient } from '../db/redis.js'; +import { redisClient } from '../db/redis'; import { promisify } from 'util'; import * as redisLock from 'redis-lock'; diff --git a/src/misc/captcha.ts b/src/misc/captcha.ts index 4623565c3c..f36943b589 100644 --- a/src/misc/captcha.ts +++ b/src/misc/captcha.ts @@ -1,7 +1,7 @@ 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 => { diff --git a/src/misc/check-hit-antenna.ts b/src/misc/check-hit-antenna.ts index fdba66b640..38965f4b0d 100644 --- a/src/misc/check-hit-antenna.ts +++ b/src/misc/check-hit-antenna.ts @@ -1,10 +1,10 @@ -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 はどちらか一方が指定されていればよい diff --git a/src/misc/check-word-mute.ts b/src/misc/check-word-mute.ts index f12e552ebd..e2e871dd2b 100644 --- a/src/misc/check-word-mute.ts +++ b/src/misc/check-word-mute.ts @@ -1,6 +1,6 @@ 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']; diff --git a/src/misc/convert-host.ts b/src/misc/convert-host.ts index 2e705cb6b1..6e9f6ed3e9 100644 --- a/src/misc/convert-host.ts +++ b/src/misc/convert-host.ts @@ -1,5 +1,5 @@ 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) { diff --git a/src/misc/count-same-renotes.ts b/src/misc/count-same-renotes.ts index b7f8ce90c8..6628761182 100644 --- a/src/misc/count-same-renotes.ts +++ b/src/misc/count-same-renotes.ts @@ -1,4 +1,4 @@ -import { Notes } from '@/models/index.js'; +import { Notes } from '@/models/index'; export async function countSameRenotes(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise<number> { // 指定したユーザーの指定したノートのリノートがいくつあるか数える diff --git a/src/misc/detect-url-mime.ts b/src/misc/detect-url-mime.ts index cd143cf2fb..274c291737 100644 --- a/src/misc/detect-url-mime.ts +++ b/src/misc/detect-url-mime.ts @@ -1,6 +1,6 @@ -import { createTemp } from './create-temp.js'; -import { downloadUrl } from './download-url.js'; -import { detectType } from './get-file-info.js'; +import { createTemp } from './create-temp'; +import { downloadUrl } from './download-url'; +import { detectType } from './get-file-info'; export async function detectUrlMime(url: string) { const [path, cleanup] = await createTemp(); diff --git a/src/misc/download-text-file.ts b/src/misc/download-text-file.ts index 745604c19c..e8e23cc120 100644 --- a/src/misc/download-text-file.ts +++ b/src/misc/download-text-file.ts @@ -1,8 +1,8 @@ import * as fs from 'fs'; import * as util from 'util'; -import Logger from '@/services/logger.js'; -import { createTemp } from './create-temp.js'; -import { downloadUrl } from './download-url.js'; +import Logger from '@/services/logger'; +import { createTemp } from './create-temp'; +import { downloadUrl } from './download-url'; const logger = new Logger('download-text-file'); diff --git a/src/misc/download-url.ts b/src/misc/download-url.ts index f01f34e6db..43e061c715 100644 --- a/src/misc/download-url.ts +++ b/src/misc/download-url.ts @@ -3,11 +3,11 @@ import * as stream from 'stream'; import * as util from 'util'; import { URL } from 'url'; import fetch from 'node-fetch'; -import { getAgentByUrl } from './fetch.js'; +import { getAgentByUrl } from './fetch'; import { AbortController } from 'abort-controller'; -import config from '@/config/index.js'; +import config from '@/config/index'; import * as chalk from 'chalk'; -import Logger from '@/services/logger.js'; +import Logger from '@/services/logger'; const pipeline = util.promisify(stream.pipeline); diff --git a/src/misc/extract-custom-emojis-from-mfm.ts b/src/misc/extract-custom-emojis-from-mfm.ts index a0319d8dd5..b29ce281b3 100644 --- a/src/misc/extract-custom-emojis-from-mfm.ts +++ b/src/misc/extract-custom-emojis-from-mfm.ts @@ -1,5 +1,5 @@ import * as mfm from 'mfm-js'; -import { unique } from '@/prelude/array.js'; +import { unique } from '@/prelude/array'; export function extractCustomEmojisFromMfm(nodes: mfm.MfmNode[]): string[] { const emojiNodes = mfm.extract(nodes, (node) => { diff --git a/src/misc/extract-hashtags.ts b/src/misc/extract-hashtags.ts index 0b0418eefd..b0a74df219 100644 --- a/src/misc/extract-hashtags.ts +++ b/src/misc/extract-hashtags.ts @@ -1,5 +1,5 @@ import * as mfm from 'mfm-js'; -import { unique } from '@/prelude/array.js'; +import { unique } from '@/prelude/array'; export function extractHashtags(nodes: mfm.MfmNode[]): string[] { const hashtagNodes = mfm.extract(nodes, (node) => node.type === 'hashtag'); diff --git a/src/misc/fetch-meta.ts b/src/misc/fetch-meta.ts index 3d7e69f2da..a0bcdd4d48 100644 --- a/src/misc/fetch-meta.ts +++ b/src/misc/fetch-meta.ts @@ -1,4 +1,4 @@ -import { Meta } from '@/models/entities/meta.js'; +import { Meta } from '@/models/entities/meta'; import { getConnection } from 'typeorm'; let cache: Meta; diff --git a/src/misc/fetch-proxy-account.ts b/src/misc/fetch-proxy-account.ts index ed8a4c794d..e0eedea4c8 100644 --- a/src/misc/fetch-proxy-account.ts +++ b/src/misc/fetch-proxy-account.ts @@ -1,6 +1,6 @@ -import { fetchMeta } from './fetch-meta.js'; -import { ILocalUser } from '@/models/entities/user.js'; -import { Users } from '@/models/index.js'; +import { fetchMeta } from './fetch-meta'; +import { ILocalUser } from '@/models/entities/user'; +import { Users } from '@/models/index'; export async function fetchProxyAccount(): Promise<ILocalUser | null> { const meta = await fetchMeta(); diff --git a/src/misc/fetch.ts b/src/misc/fetch.ts index 11e8a69205..82db2f2f8c 100644 --- a/src/misc/fetch.ts +++ b/src/misc/fetch.ts @@ -3,7 +3,7 @@ import * as https from 'https'; import CacheableLookup from 'cacheable-lookup'; import fetch, { HeadersInit } from 'node-fetch'; import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent'; -import config from '@/config/index.js'; +import config from '@/config/index'; import { URL } from 'url'; export async function getJson(url: string, accept = 'application/json, */*', timeout = 10000, headers?: HeadersInit) { diff --git a/src/misc/gen-id.ts b/src/misc/gen-id.ts index fcf476857f..b1b542dc4b 100644 --- a/src/misc/gen-id.ts +++ b/src/misc/gen-id.ts @@ -1,9 +1,9 @@ import { ulid } from 'ulid'; -import { genAid } from './id/aid.js'; -import { genMeid } from './id/meid.js'; -import { genMeidg } from './id/meidg.js'; -import { genObjectId } from './id/object-id.js'; -import config from '@/config/index.js'; +import { genAid } from './id/aid'; +import { genMeid } from './id/meid'; +import { genMeidg } from './id/meidg'; +import { genObjectId } from './id/object-id'; +import config from '@/config/index'; const metohd = config.id.toLowerCase(); diff --git a/src/misc/get-user-name.ts b/src/misc/get-user-name.ts index 805dbba529..3545e986e8 100644 --- a/src/misc/get-user-name.ts +++ b/src/misc/get-user-name.ts @@ -1,4 +1,4 @@ -import { User } from '@/models/entities/user.js'; +import { User } from '@/models/entities/user'; export default function(user: User): string { return user.name || user.username; diff --git a/src/misc/is-quote.ts b/src/misc/is-quote.ts index 779f548b03..2b57f036a2 100644 --- a/src/misc/is-quote.ts +++ b/src/misc/is-quote.ts @@ -1,4 +1,4 @@ -import { Note } from '@/models/entities/note.js'; +import { Note } from '@/models/entities/note'; export default function(note: Note): boolean { return note.renoteId != null && (note.text != null || note.hasPoll || (note.fileIds != null && note.fileIds.length > 0)); diff --git a/src/misc/keypair-store.ts b/src/misc/keypair-store.ts index 3d505c0abb..c018013b7b 100644 --- a/src/misc/keypair-store.ts +++ b/src/misc/keypair-store.ts @@ -1,7 +1,7 @@ -import { UserKeypairs } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; -import { UserKeypair } from '@/models/entities/user-keypair.js'; -import { Cache } from './cache.js'; +import { UserKeypairs } from '@/models/index'; +import { User } from '@/models/entities/user'; +import { UserKeypair } from '@/models/entities/user-keypair'; +import { Cache } from './cache'; const cache = new Cache<UserKeypair>(Infinity); diff --git a/src/misc/populate-emojis.ts b/src/misc/populate-emojis.ts index e1ec87a95b..f0a8bde31e 100644 --- a/src/misc/populate-emojis.ts +++ b/src/misc/populate-emojis.ts @@ -1,12 +1,12 @@ import { In } from 'typeorm'; -import { Emojis } from '@/models/index.js'; -import { Emoji } from '@/models/entities/emoji.js'; -import { Note } from '@/models/entities/note.js'; -import { Cache } from './cache.js'; -import { isSelfHost, toPunyNullable } from './convert-host.js'; -import { decodeReaction } from './reaction-lib.js'; -import config from '@/config/index.js'; -import { query } from '@/prelude/url.js'; +import { Emojis } from '@/models/index'; +import { Emoji } from '@/models/entities/emoji'; +import { Note } from '@/models/entities/note'; +import { Cache } from './cache'; +import { isSelfHost, toPunyNullable } from './convert-host'; +import { decodeReaction } from './reaction-lib'; +import config from '@/config/index'; +import { query } from '@/prelude/url'; const cache = new Cache<Emoji | null>(1000 * 60 * 60 * 12); diff --git a/src/misc/reaction-lib.ts b/src/misc/reaction-lib.ts index beff1b32bc..46dedfa24b 100644 --- a/src/misc/reaction-lib.ts +++ b/src/misc/reaction-lib.ts @@ -1,7 +1,7 @@ -import { emojiRegex } from './emoji-regex.js'; -import { fetchMeta } from './fetch-meta.js'; -import { Emojis } from '@/models/index.js'; -import { toPunyNullable } from './convert-host.js'; +import { emojiRegex } from './emoji-regex'; +import { fetchMeta } from './fetch-meta'; +import { Emojis } from '@/models/index'; +import { toPunyNullable } from './convert-host'; const legacies: Record<string, string> = { 'like': '👍', diff --git a/src/misc/show-machine-info.ts b/src/misc/show-machine-info.ts index 5ce466af26..58747c1152 100644 --- a/src/misc/show-machine-info.ts +++ b/src/misc/show-machine-info.ts @@ -1,6 +1,6 @@ import * as os from 'os'; import * as sysUtils from 'systeminformation'; -import Logger from '@/services/logger.js'; +import Logger from '@/services/logger'; export async function showMachineInfo(parentLogger: Logger) { const logger = parentLogger.createSubLogger('machine'); |