diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-19 18:33:41 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-19 18:33:41 +0900 |
| commit | b9cb6d1c10729869cbb57ce50c8174ad7474db75 (patch) | |
| tree | 0d522e7e6e589aaa6b6ddfcf4e12947c6bed0501 /src/tools | |
| parent | Update glossary.md (diff) | |
| download | misskey-b9cb6d1c10729869cbb57ce50c8174ad7474db75.tar.gz misskey-b9cb6d1c10729869cbb57ce50c8174ad7474db75.tar.bz2 misskey-b9cb6d1c10729869cbb57ce50c8174ad7474db75.zip | |
refactor: refactoring imports
将来ESMに移行しやすいように
Related: #7658
なんかmochaが起動しなくなってるけど理由不明
すぐ直したい
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/accept-migration.ts | 2 | ||||
| -rw-r--r-- | src/tools/add-emoji.ts | 4 | ||||
| -rw-r--r-- | src/tools/demote-admin.ts | 4 | ||||
| -rw-r--r-- | src/tools/mark-admin.ts | 4 | ||||
| -rw-r--r-- | src/tools/refresh-question.ts | 2 | ||||
| -rw-r--r-- | src/tools/resync-remote-user.ts | 6 | ||||
| -rw-r--r-- | src/tools/show-signin-history.ts | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/src/tools/accept-migration.ts b/src/tools/accept-migration.ts index 0622869398..adbfcdadf7 100644 --- a/src/tools/accept-migration.ts +++ b/src/tools/accept-migration.ts @@ -1,7 +1,7 @@ // ex) node built/tools/accept-migration Yo 1000000000001 import { createConnection } from 'typeorm'; -import config from '@/config'; +import config from '@/config/index.js'; createConnection({ type: 'postgres', diff --git a/src/tools/add-emoji.ts b/src/tools/add-emoji.ts index ca25d1348b..054286c647 100644 --- a/src/tools/add-emoji.ts +++ b/src/tools/add-emoji.ts @@ -1,5 +1,5 @@ -import { Emojis } from '../models'; -import { genId } from '@/misc/gen-id'; +import { Emojis } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; async function main(name: string, url: string, alias?: string): Promise<any> { const aliases = alias != null ? [ alias ] : []; diff --git a/src/tools/demote-admin.ts b/src/tools/demote-admin.ts index 5e3e64bffb..37bd5007a8 100644 --- a/src/tools/demote-admin.ts +++ b/src/tools/demote-admin.ts @@ -1,6 +1,6 @@ -import { initDb } from '../db/postgre'; +import { initDb } from '../db/postgre.js'; import { getRepository } from 'typeorm'; -import { User } from '../models/entities/user'; +import { User } from '@/models/entities/user.js'; async function main(username: string) { if (!username) throw `username required`; diff --git a/src/tools/mark-admin.ts b/src/tools/mark-admin.ts index 5844bb464e..4c583926eb 100644 --- a/src/tools/mark-admin.ts +++ b/src/tools/mark-admin.ts @@ -1,6 +1,6 @@ -import { initDb } from '../db/postgre'; +import { initDb } from '../db/postgre.js'; import { getRepository } from 'typeorm'; -import { User } from '../models/entities/user'; +import { User } from '@/models/entities/user.js'; async function main(username: string) { if (!username) throw `username required`; diff --git a/src/tools/refresh-question.ts b/src/tools/refresh-question.ts index 83d71ff303..3e850ba83c 100644 --- a/src/tools/refresh-question.ts +++ b/src/tools/refresh-question.ts @@ -1,4 +1,4 @@ -import { updateQuestion } from '../remote/activitypub/models/question'; +import { updateQuestion } from '@/remote/activitypub/models/question.js'; async function main(uri: string): Promise<any> { return await updateQuestion(uri); diff --git a/src/tools/resync-remote-user.ts b/src/tools/resync-remote-user.ts index ad2e231eb5..3c02fb94c7 100644 --- a/src/tools/resync-remote-user.ts +++ b/src/tools/resync-remote-user.ts @@ -1,9 +1,9 @@ -import { initDb } from '@/db/postgre'; -import { parseAcct } from '@/misc/acct'; +import { initDb } from '@/db/postgre.js'; +import { parseAcct } from '@/misc/acct.js'; async function main(acct: string): Promise<any> { await initDb(); - const { resolveUser } = await import('../remote/resolve-user'); + const { resolveUser } = await import('@/remote/resolve-user'); const { username, host } = parseAcct(acct); await resolveUser(username, host, {}, true); diff --git a/src/tools/show-signin-history.ts b/src/tools/show-signin-history.ts index fd7cd39e38..6fdff3902e 100644 --- a/src/tools/show-signin-history.ts +++ b/src/tools/show-signin-history.ts @@ -1,4 +1,4 @@ -import { Users, Signins } from '../models'; +import { Users, Signins } from '@/models/index.js'; // node built/tools/show-signin-history username // => {Success} {Date} {IPAddrsss} |