From 881b914c6a7bdf73ed16194e71aa779b27de074e Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 18 Aug 2021 22:04:04 +0900 Subject: [PATCH 01/32] =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D?= =?UTF-8?q?=E3=83=AB=E3=82=92=E4=BD=9C=E6=88=90=E3=81=97=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=82=8B=E3=81=A8=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#7653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * チャンネルを作成しているとアカウントを削除できないのを修正 * CHANGELOG * nullable --- CHANGELOG.md | 7 +++++++ migration/1629288472000-fix-channel-userId.ts | 14 ++++++++++++++ src/models/entities/channel.ts | 3 ++- src/models/repositories/channel.ts | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 migration/1629288472000-fix-channel-userId.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index f6d782c519..2ce3065a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ --> +## 12.x.x (unreleased) + +### Improvements + +### Bugfixes +- チャンネルを作成しているとアカウントを削除できないのを修正 + ## 12.88.0 (2021/08/17) ### Features diff --git a/migration/1629288472000-fix-channel-userId.ts b/migration/1629288472000-fix-channel-userId.ts new file mode 100644 index 0000000000..cd8f81bb01 --- /dev/null +++ b/migration/1629288472000-fix-channel-userId.ts @@ -0,0 +1,14 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class fixChannelUserId1629288472000 implements MigrationInterface { + name = 'fixChannelUserId1629288472000' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" DROP NOT NULL;`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" SET NOT NULL;`); + } + +} diff --git a/src/models/entities/channel.ts b/src/models/entities/channel.ts index 1868f75143..f2d713612d 100644 --- a/src/models/entities/channel.ts +++ b/src/models/entities/channel.ts @@ -23,9 +23,10 @@ export class Channel { @Index() @Column({ ...id(), + nullable: true, comment: 'The owner ID.' }) - public userId: User['id']; + public userId: User['id'] | null; @ManyToOne(type => User, { onDelete: 'SET NULL' diff --git a/src/models/repositories/channel.ts b/src/models/repositories/channel.ts index 3a6bd4c923..007b110015 100644 --- a/src/models/repositories/channel.ts +++ b/src/models/repositories/channel.ts @@ -90,7 +90,7 @@ export const packedChannelSchema = { }, userId: { type: 'string' as const, - nullable: false as const, optional: false as const, + nullable: true as const, optional: false as const, format: 'id', }, }, From 4c431c54322985a10aab966519b2ebdfe6eb6f05 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 11:26:26 +0900 Subject: [PATCH 02/32] refactor --- CONTRIBUTING.md | 5 +++++ test/activitypub.ts | 9 --------- test/api-visibility.ts | 10 ---------- test/api.ts | 9 --------- test/block.ts | 10 ---------- test/chart.ts | 10 ---------- test/fetch-resource.ts | 10 ---------- test/get-file-info.ts | 10 ---------- test/mfm.ts | 10 ---------- test/mute.ts | 10 ---------- test/note.ts | 10 ---------- test/prelude/maybe.ts | 10 ---------- test/reaction-lib.ts | 10 ---------- test/streaming.ts | 10 ---------- test/user-notes.ts | 10 ---------- 15 files changed, 5 insertions(+), 138 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 436d4224d2..b16d9a75d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,6 +35,11 @@ If your language is not listed in Crowdin, please open an issue. ## Test * Test codes are located in [`/test`](/test). +### Run specify test +``` +npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT="./test/tsconfig.json" npx mocha test/foo.ts --require ts-node/register +``` + ## Continuous integration Misskey uses GitHub Actions for executing automated tests. Configuration files are located in [`/.github/workflows`](/.github/workflows). diff --git a/test/activitypub.ts b/test/activitypub.ts index 24b8d13b85..777e7f355b 100644 --- a/test/activitypub.ts +++ b/test/activitypub.ts @@ -1,12 +1,3 @@ -/* - * Tests for ActivityPub - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT="./test/tsconfig.json" mocha test/activitypub.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT="./test/tsconfig.json" npx mocha test/activitypub.ts --require ts-node/register -g 'test name' - */ process.env.NODE_ENV = 'test'; import rndstr from 'rndstr'; diff --git a/test/api-visibility.ts b/test/api-visibility.ts index 6548146c78..ade7b730b3 100644 --- a/test/api-visibility.ts +++ b/test/api-visibility.ts @@ -1,13 +1,3 @@ -/* - * Tests of API (visibility) - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/api-visibility.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/api-visibility.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; diff --git a/test/api.ts b/test/api.ts index 68ab2aa179..99fb196dcd 100644 --- a/test/api.ts +++ b/test/api.ts @@ -1,12 +1,3 @@ -/* - * Tests of API - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/api.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/api.ts --require ts-node/register -g 'test name' - */ /* process.env.NODE_ENV = 'test'; diff --git a/test/block.ts b/test/block.ts index 408b218a79..6d9efb77b7 100644 --- a/test/block.ts +++ b/test/block.ts @@ -1,13 +1,3 @@ -/* - * Tests of block - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/block.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/block.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; diff --git a/test/chart.ts b/test/chart.ts index 4a40b25534..935ac9d8e1 100644 --- a/test/chart.ts +++ b/test/chart.ts @@ -1,13 +1,3 @@ -/* - * Tests of chart engine - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/chart.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/chart.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; diff --git a/test/fetch-resource.ts b/test/fetch-resource.ts index 31308b08fa..6efe76d8b8 100644 --- a/test/fetch-resource.ts +++ b/test/fetch-resource.ts @@ -1,13 +1,3 @@ -/* - * Tests for Fetch resource - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/fetch-resource.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/fetch-resource.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; diff --git a/test/get-file-info.ts b/test/get-file-info.ts index 57c021feae..cc9eefbfc6 100644 --- a/test/get-file-info.ts +++ b/test/get-file-info.ts @@ -1,13 +1,3 @@ -/* - * Tests for detection of file information - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true npx mocha test/get-file-info.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true npx mocha test/get-file-info.ts --require ts-node/register -g 'test name' - */ - import * as assert from 'assert'; import { async } from './utils'; import { getFileInfo } from '../src/misc/get-file-info'; diff --git a/test/mfm.ts b/test/mfm.ts index 3f997878b5..d9b98cdac3 100644 --- a/test/mfm.ts +++ b/test/mfm.ts @@ -1,13 +1,3 @@ -/* - * Tests of MFM - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/mfm.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/mfm.ts --require ts-node/register -g 'test name' - */ - import * as assert from 'assert'; import * as mfm from 'mfm-js'; diff --git a/test/mute.ts b/test/mute.ts index 632f60fa43..ecac310758 100644 --- a/test/mute.ts +++ b/test/mute.ts @@ -1,13 +1,3 @@ -/* - * Tests of mute - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/mute.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/mute.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; diff --git a/test/note.ts b/test/note.ts index 31aaf00da6..ab8b6b1903 100644 --- a/test/note.ts +++ b/test/note.ts @@ -1,13 +1,3 @@ -/* - * Tests of Note - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/note.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/note.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; diff --git a/test/prelude/maybe.ts b/test/prelude/maybe.ts index d3f17481f8..2687a739a0 100644 --- a/test/prelude/maybe.ts +++ b/test/prelude/maybe.ts @@ -1,13 +1,3 @@ -/* - * Tests of Maybe - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/prelude/maybe.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/prelude/maybe.ts --require ts-node/register -g 'test name' - */ - import * as assert from 'assert'; import { just, nothing } from '../../src/prelude/maybe'; diff --git a/test/reaction-lib.ts b/test/reaction-lib.ts index 5837b5be1f..59c07de001 100644 --- a/test/reaction-lib.ts +++ b/test/reaction-lib.ts @@ -1,13 +1,3 @@ -/* - * Tests of MFM - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/reaction-lib.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/reaction-lib.ts --require ts-node/register -g 'test name' - */ - /* import * as assert from 'assert'; diff --git a/test/streaming.ts b/test/streaming.ts index cc3168e98d..e4b651aa9f 100644 --- a/test/streaming.ts +++ b/test/streaming.ts @@ -1,13 +1,3 @@ -/* - * Tests of streaming API - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/streaming.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/streaming.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; diff --git a/test/user-notes.ts b/test/user-notes.ts index 30589f8149..c90c07d75f 100644 --- a/test/user-notes.ts +++ b/test/user-notes.ts @@ -1,13 +1,3 @@ -/* - * Tests of Note - * - * How to run the tests: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/user-notes.ts --require ts-node/register - * - * To specify test: - * > npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true npx mocha test/user-notes.ts --require ts-node/register -g 'test name' - */ - process.env.NODE_ENV = 'test'; import * as assert from 'assert'; From 938fc317c9b812b7fc385f50ae3cf9c03d0cef45 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 11:32:25 +0900 Subject: [PATCH 03/32] Update glossary.md --- src/docs/ja-JP/general/glossary.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/docs/ja-JP/general/glossary.md b/src/docs/ja-JP/general/glossary.md index 952b83a28b..f19d14e6b1 100644 --- a/src/docs/ja-JP/general/glossary.md +++ b/src/docs/ja-JP/general/glossary.md @@ -59,6 +59,9 @@ Misskeyの看板娘(公式キャラクター)です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 From 31e3aaeda022971e3366666222963b342cd37975 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 11:35:42 +0900 Subject: [PATCH 04/32] Update glossary.md --- src/docs/ja-JP/general/glossary.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/docs/ja-JP/general/glossary.md b/src/docs/ja-JP/general/glossary.md index f19d14e6b1..90bc1132ce 100644 --- a/src/docs/ja-JP/general/glossary.md +++ b/src/docs/ja-JP/general/glossary.md @@ -71,6 +71,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 From e677540fd6f8940f66a2780e3149c6c79a38a0ab Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 15:42:53 +0900 Subject: [PATCH 05/32] Update faq.md --- src/docs/ja-JP/general/faq.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/docs/ja-JP/general/faq.md b/src/docs/ja-JP/general/faq.md index f163aad125..60cd5fad8c 100644 --- a/src/docs/ja-JP/general/faq.md +++ b/src/docs/ja-JP/general/faq.md @@ -28,3 +28,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 From ab54e147f2a170f2a4ee841ace8537e0ab6a1dab Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 19 Aug 2021 16:27:12 +0900 Subject: [PATCH 06/32] Remove is-root dependencies (#7660) --- package.json | 1 - src/@types/is-root.d.ts | 7 ------- src/boot/master.ts | 6 +++++- yarn.lock | 5 ----- 4 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 src/@types/is-root.d.ts diff --git a/package.json b/package.json index 1f7d570f56..093f0d99c6 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,6 @@ "http-signature": "1.3.5", "idb-keyval": "5.1.3", "insert-text-at-cursor": "0.3.0", - "is-root": "2.1.0", "is-svg": "4.3.1", "js-yaml": "4.1.0", "jsdom": "16.7.0", diff --git a/src/@types/is-root.d.ts b/src/@types/is-root.d.ts deleted file mode 100644 index 3905a16c8d..0000000000 --- a/src/@types/is-root.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module 'is-root' { - function isRoot(): boolean; - - namespace isRoot {} // Hack - - export = isRoot; -} diff --git a/src/boot/master.ts b/src/boot/master.ts index 473e215bac..3d86a5dab8 100644 --- a/src/boot/master.ts +++ b/src/boot/master.ts @@ -2,7 +2,6 @@ import * as os from 'os'; import * as cluster from 'cluster'; import * as chalk from 'chalk'; import * as portscanner from 'portscanner'; -import * as isRoot from 'is-root'; import { getConnection } from 'typeorm'; import Logger from '../services/logger'; @@ -39,6 +38,11 @@ function greet() { bootLogger.info(`Misskey v${meta.version}`, null, true); } +function isRoot() { + // maybe process.getuid will be undefined under not POSIX environment (e.g. Windows) + return process.getuid != null && process.getuid() === 0; +} + /** * Init master process */ diff --git a/yarn.lock b/yarn.lock index ecb0ff9739..13e906a261 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6383,11 +6383,6 @@ is-resolvable@^1.1.0: resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== -is-root@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" - integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== - is-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" From 7bf517e990816775948c7c92e6624e0dc1e2fe18 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 19 Aug 2021 18:07:32 +0900 Subject: [PATCH 07/32] Remove unused packages (#7661) * Remove unused packages * Remove unused babel things * Remove more unused packages --- .babelrc | 13 -- package.json | 15 -- yarn.lock | 542 ++------------------------------------------------- 3 files changed, 16 insertions(+), 554 deletions(-) delete mode 100644 .babelrc diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 32a05fd6fc..0000000000 --- a/.babelrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "plugins": [ - [ - "@babel/plugin-transform-runtime", - { - "corejs": { - "version": 3, - "proposals": true - } - } - ] - ] -} diff --git a/package.json b/package.json index 093f0d99c6..69c9ce4f2b 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "lodash": "^4.17.21" }, "dependencies": { - "@babel/plugin-transform-runtime": "7.14.5", "@elastic/elasticsearch": "7.11.0", "@koa/cors": "3.1.0", "@koa/multer": "3.0.0", @@ -126,12 +125,10 @@ "compare-versions": "3.6.0", "concurrently": "6.2.0", "content-disposition": "0.5.3", - "core-js": "3.16.1", "crc-32": "1.2.0", "css-loader": "6.2.0", "cssnano": "5.0.7", "dateformat": "4.5.1", - "diskusage": "1.1.3", "escape-regexp": "0.0.1", "eslint": "7.32.0", "eslint-plugin-vue": "7.16.0", @@ -147,9 +144,7 @@ "gulp-replace": "1.1.3", "gulp-terser": "2.0.1", "gulp-tslint": "8.1.4", - "hard-source-webpack-plugin": "0.13.1", "hpagent": "0.1.2", - "html-minifier": "4.0.0", "http-signature": "1.3.5", "idb-keyval": "5.1.3", "insert-text-at-cursor": "0.3.0", @@ -177,13 +172,11 @@ "mfm-js": "0.19.0", "misskey-js": "0.0.6", "mocha": "8.4.0", - "moji": "0.5.1", "ms": "2.1.3", "multer": "1.4.3", "nested-property": "4.0.0", "node-fetch": "2.6.1", "nodemailer": "6.6.3", - "object-assign-deep": "0.4.0", "os-utils": "0.0.14", "parse5": "6.0.1", "pg": "8.6.0", @@ -193,7 +186,6 @@ "prismjs": "1.24.1", "probe-image-size": "7.2.1", "promise-limit": "2.7.0", - "promise-sequential": "1.1.1", "pug": "3.0.2", "punycode": "2.1.1", "pureimage": "0.3.2", @@ -201,11 +193,9 @@ "random-seed": "0.3.0", "ratelimiter": "3.4.1", "re2": "1.16.0", - "reconnecting-websocket": "4.4.0", "redis": "3.1.2", "redis-lock": "0.1.4", "reflect-metadata": "0.1.13", - "regenerator-runtime": "0.13.9", "rename": "1.0.4", "request-stats": "3.0.0", "require-all": "3.0.0", @@ -240,10 +230,7 @@ "ulid": "2.3.0", "uuid": "8.3.2", "v-debounce": "0.1.2", - "vanilla-tilt": "1.7.1", "vue": "3.2.3", - "vue-color": "2.8.1", - "vue-json-pretty": "1.8.1", "vue-loader": "16.5.0", "vue-prism-editor": "2.0.0-alpha.2", "vue-router": "4.0.5", @@ -259,9 +246,7 @@ }, "devDependencies": { "@redocly/openapi-core": "1.0.0-beta.44", - "@types/chai": "4.2.16", "@types/fluent-ffmpeg": "2.1.17", - "chai": "4.3.4", "cross-env": "7.0.3", "cypress": "8.2.0", "start-server-and-test": "1.13.1" diff --git a/yarn.lock b/yarn.lock index 13e906a261..30dee08f86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,118 +9,18 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": +"@babel/code-frame@^7.0.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== dependencies: "@babel/highlight" "^7.12.13" -"@babel/compat-data@^7.13.0": - version "7.13.6" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.6.tgz#11972d07db4c2317afdbf41d6feb3a730301ef4e" - integrity sha512-VhgqKOWYVm7lQXlvbJnWOzwfAQATd2nV52koT0HZ/LdDH0m4DUDwkKYsH+IwpXb+bKPyBJzawA4I6nBKqZcpQw== - -"@babel/compat-data@^7.13.11": - version "7.13.15" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.15.tgz#7e8eea42d0b64fda2b375b22d06c605222e848f4" - integrity sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA== - -"@babel/generator@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.0.tgz#bd00d4394ca22f220390c56a0b5b85568ec1ec0c" - integrity sha512-zBZfgvBB/ywjx0Rgc2+BwoH/3H+lDtlgD4hBOpEv5LxRnYsm/753iRuLepqnYlynpjC3AdQxtxsoeHJoEEwOAw== - dependencies: - "@babel/types" "^7.13.0" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/helper-compilation-targets@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.0.tgz#c9cf29b82a76fd637f0faa35544c4ace60a155a1" - integrity sha512-SOWD0JK9+MMIhTQiUVd4ng8f3NXhPVQvTv7D3UN4wbp/6cAHnB2EmMaU1zZA2Hh1gwme+THBrVSqTFxHczTh0Q== - dependencies: - "@babel/compat-data" "^7.13.0" - "@babel/helper-validator-option" "^7.12.17" - browserslist "^4.14.5" - semver "7.0.0" - -"@babel/helper-define-polyfill-provider@^0.2.2": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz#0525edec5094653a282688d34d846e4c75e9c0b6" - integrity sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew== - dependencies: - "@babel/helper-compilation-targets" "^7.13.0" - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/traverse" "^7.13.0" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-function-name@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" - integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== - dependencies: - "@babel/helper-get-function-arity" "^7.12.13" - "@babel/template" "^7.12.13" - "@babel/types" "^7.12.13" - -"@babel/helper-get-function-arity@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" - integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-module-imports@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" - integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-module-imports@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" - integrity sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ== - dependencies: - "@babel/types" "^7.14.5" - -"@babel/helper-plugin-utils@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" - integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== - -"@babel/helper-plugin-utils@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" - integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== - -"@babel/helper-split-export-declaration@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" - integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== - dependencies: - "@babel/types" "^7.12.13" - "@babel/helper-validator-identifier@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== -"@babel/helper-validator-identifier@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" - integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== - -"@babel/helper-validator-option@^7.12.17": - version "7.12.17" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" - integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== - "@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c" @@ -130,7 +30,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.6.0", "@babel/parser@^7.9.6": +"@babel/parser@^7.12.0", "@babel/parser@^7.6.0", "@babel/parser@^7.9.6": version "7.13.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz#ca34cb95e1c2dd126863a84465ae8ef66114be99" integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw== @@ -140,18 +40,6 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df" integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw== -"@babel/plugin-transform-runtime@7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.5.tgz#30491dad49c6059f8f8fa5ee8896a0089e987523" - integrity sha512-fPMBhh1AV8ZyneiCIA+wYYUH1arzlXR1UMcApjvchDhfKxhy2r2lReJv8uHEyihi4IFIGlr1Pdx7S5fkESDQsg== - dependencies: - "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - babel-plugin-polyfill-corejs2 "^0.2.2" - babel-plugin-polyfill-corejs3 "^0.2.2" - babel-plugin-polyfill-regenerator "^0.2.2" - semver "^6.3.0" - "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.13.tgz#0a21452352b02542db0ffb928ac2d3ca7cb6d66d" @@ -159,31 +47,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" - integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/parser" "^7.12.13" - "@babel/types" "^7.12.13" - -"@babel/traverse@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" - integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.0" - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.13.0" - "@babel/types" "^7.13.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/types@^7.12.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.6.1", "@babel/types@^7.9.6": +"@babel/types@^7.12.0", "@babel/types@^7.13.0", "@babel/types@^7.6.1", "@babel/types@^7.9.6": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== @@ -192,14 +56,6 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@babel/types@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" - integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg== - dependencies: - "@babel/helper-validator-identifier" "^7.14.5" - to-fast-properties "^2.0.0" - "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" @@ -616,11 +472,6 @@ dependencies: cbor "*" -"@types/chai@4.2.16": - version "4.2.16" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.16.tgz#f09cc36e18d28274f942e7201147cce34d97e8c8" - integrity sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw== - "@types/cheerio@0.22.18": version "0.22.18" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.18.tgz#19018dceae691509901e339d63edf1e935978fe6" @@ -2155,11 +2006,6 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -2280,30 +2126,6 @@ axios@^0.21.1: dependencies: follow-redirects "^1.10.0" -babel-plugin-polyfill-corejs2@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz#e9124785e6fd94f94b618a7954e5693053bf5327" - integrity sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ== - dependencies: - "@babel/compat-data" "^7.13.11" - "@babel/helper-define-polyfill-provider" "^0.2.2" - semver "^6.1.1" - -babel-plugin-polyfill-corejs3@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.3.tgz#72add68cf08a8bf139ba6e6dfc0b1d504098e57b" - integrity sha512-rCOFzEIJpJEAU14XCcV/erIf/wZQMmMT5l5vXOpL5uoznyOGfDIjPj6FVytMvtzaKSTSVKouOCTPJ5OMUZH30g== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.2.2" - core-js-compat "^3.14.0" - -babel-plugin-polyfill-regenerator@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz#b310c8d642acada348c1fa3b3e6ce0e851bee077" - integrity sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.2.2" - babel-walk@3.0.0-canary-5: version "3.0.0-canary-5" resolved "https://registry.yarnpkg.com/babel-walk/-/babel-walk-3.0.0-canary-5.tgz#f66ecd7298357aee44955f235a6ef54219104b11" @@ -2719,14 +2541,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" @@ -2812,18 +2626,6 @@ cbor@8.0.0: dependencies: nofilter "^3.0.2" -chai@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" - integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.1" - type-detect "^4.0.5" - chalk@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" @@ -2903,11 +2705,6 @@ chartjs-color@^2.1.0: chartjs-color-string "^0.6.0" color-convert "^1.9.3" -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - check-more-types@2.24.0, check-more-types@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" @@ -2996,11 +2793,6 @@ ci-info@^3.1.1: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6" integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== -clamp@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634" - integrity sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ= - clap@^1.0.9: version "1.2.3" resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" @@ -3018,13 +2810,6 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -clean-css@^4.2.1: - version "4.2.3" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" - integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA== - dependencies: - source-map "~0.6.0" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -3321,7 +3106,7 @@ commander@7.2.0, commander@^7.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^2.12.1, commander@^2.19.0, commander@^2.20.0, commander@~2.20.3: +commander@^2.12.1, commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -3357,11 +3142,6 @@ common-tags@^1.8.0: resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - compare-versions@3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" @@ -3484,19 +3264,6 @@ copy-to@^2.0.1: resolved "https://registry.yarnpkg.com/copy-to/-/copy-to-2.0.1.tgz#2680fbb8068a48d08656b6098092bdafc906f4a5" integrity sha1-JoD7uAaKSNCGVrYJgJK9r8kG9KU= -core-js-compat@^3.14.0: - version "3.15.2" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.15.2.tgz#47272fbb479880de14b4e6081f71f3492f5bd3cb" - integrity sha512-Wp+BJVvwopjI+A1EFqm2dwUmWYXrvucmtIB2LgXn/Rb+gWPKYxtmb4GKHGKG/KGF1eK9jfjzT38DITbTOCX/SQ== - dependencies: - browserslist "^4.16.6" - semver "7.0.0" - -core-js@3.16.1: - version "3.16.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.1.tgz#f4485ce5c9f3c6a7cb18fa80488e08d362097249" - integrity sha512-AAkP8i35EbefU+JddyWi12AWE9f2N/qr/pwnDtWz4nyUIBGMJPX99ANFFRSw6FefM374lDujdtLDyhN2A/btHw== - core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -3965,13 +3732,6 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - deep-equal@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" @@ -4078,11 +3838,6 @@ detect-file@^1.0.0: resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= - detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -4128,14 +3883,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -diskusage@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/diskusage/-/diskusage-1.1.3.tgz#680d7dbf1b679168a195c9240eb3552cbd2c067b" - integrity sha512-EAyaxl8hy4Ph07kzlzGTfpbZMNAAAHXSZtNEMwdlnSd1noHzvA6HsgKt4fEMSvaEXQYLSphe5rPMxN4WOj0hcQ== - dependencies: - es6-promise "^4.2.5" - nan "^2.14.0" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -4460,11 +4207,6 @@ es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-promise@^4.2.5: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - es6-symbol@^3.1.1, es6-symbol@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" @@ -4978,15 +4720,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - find-node-modules@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/find-node-modules/-/find-node-modules-2.1.2.tgz#57565a3455baf671b835bc6b2134a9b938b9c53c" @@ -5254,11 +4987,6 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - get-paths@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/get-paths/-/get-paths-0.0.7.tgz#15331086752077cf130166ccd233a1cdbeefcf38" @@ -5413,11 +5141,6 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - globals@^13.6.0: version "13.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.7.0.tgz#aed3bcefd80ad3ec0f0be2cf0c895110c0591795" @@ -5591,25 +5314,6 @@ har-validator@~5.1.3: ajv "^6.5.5" har-schema "^2.0.0" -hard-source-webpack-plugin@0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/hard-source-webpack-plugin/-/hard-source-webpack-plugin-0.13.1.tgz#a99071e25b232f1438a5bc3c99f10a3869e4428e" - integrity sha512-r9zf5Wq7IqJHdVAQsZ4OP+dcUSvoHqDMxJlIzaE2J0TZWn3UjMMrHqwDHR8Jr/pzPfG7XxSe36E7Y8QGNdtuAw== - dependencies: - chalk "^2.4.1" - find-cache-dir "^2.0.0" - graceful-fs "^4.1.11" - lodash "^4.15.0" - mkdirp "^0.5.1" - node-object-hash "^1.2.0" - parse-json "^4.0.0" - pkg-dir "^3.0.0" - rimraf "^2.6.2" - semver "^5.6.0" - tapable "^1.0.0-beta.5" - webpack-sources "^1.0.1" - write-json-file "^2.3.0" - has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -5764,19 +5468,6 @@ html-entities@2.3.2: resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.2.tgz#760b404685cb1d794e4f4b744332e3b00dcfe488" integrity sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ== -html-minifier@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-4.0.0.tgz#cca9aad8bce1175e02e17a8c33e46d8988889f56" - integrity sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig== - dependencies: - camel-case "^3.0.0" - clean-css "^4.2.1" - commander "^2.19.0" - he "^1.2.0" - param-case "^2.1.1" - relateurl "^0.2.7" - uglify-js "^3.5.1" - htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" @@ -6647,17 +6338,12 @@ jsdom@16.7.0: ws "^7.4.6" xml-name-validator "^3.0.0" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -7151,11 +6837,6 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - lodash.defaults@^4.0.1, lodash.defaults@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" @@ -7236,11 +6917,6 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash.throttle@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" - integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= - lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" @@ -7251,7 +6927,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.15.0, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: +lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7281,11 +6957,6 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" -lower-case@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= - lowercase-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" @@ -7320,21 +6991,6 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -make-dir@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -7423,11 +7079,6 @@ matchdep@^2.0.0: resolve "^1.4.0" stack-trace "0.0.10" -material-colors@^1.0.0: - version "1.2.6" - resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46" - integrity sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg== - math-expression-evaluator@^1.2.14: version "1.3.7" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.3.7.tgz#1b62225db86af06f7ea1fd9576a34af605a5b253" @@ -7675,7 +7326,7 @@ mkdirp-classic@^0.5.3: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@~0.5.1: +mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -7718,13 +7369,6 @@ mocha@8.4.0: yargs-parser "20.2.4" yargs-unparser "2.0.0" -moji@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/moji/-/moji-0.5.1.tgz#088eecd1c22c8f31a240adcf9c95e54f33eb54fb" - integrity sha1-CI7s0cIsjzGiQK3PnJXlTzPrVPs= - dependencies: - object-assign "^3.0.0" - moment-timezone@^0.5.25: version "0.5.28" resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.28.tgz#f093d789d091ed7b055d82aa81a82467f72e4338" @@ -7780,7 +7424,7 @@ mz@^2.4.0, mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nan@^2.14.0, nan@^2.14.2: +nan@^2.14.2: version "2.14.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== @@ -7863,13 +7507,6 @@ next-tick@~1.0.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= -no-case@^2.2.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== - dependencies: - lower-case "^1.1.1" - node-abi@^2.21.0: version "2.21.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.21.0.tgz#c2dc9ebad6f4f53d6ea9b531e7b8faad81041d48" @@ -7916,11 +7553,6 @@ node-gyp@^8.0.0: tar "^6.1.0" which "^2.0.2" -node-object-hash@^1.2.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/node-object-hash/-/node-object-hash-1.4.2.tgz#385833d85b229902b75826224f6077be969a9e94" - integrity sha512-UdS4swXs85fCGWWf6t6DMGgpN/vnlKeSGEQ7hJcrs7PBFoxoKLmibc3QRb7fwiYsjdL7PX8iI/TMSlZ90dgHhQ== - node-releases@^1.1.70, node-releases@^1.1.71: version "1.1.71" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" @@ -8073,16 +7705,6 @@ oauth@0.9.15: resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1" integrity sha1-vR/vr2hslrdUda7VGWQS/2DPucE= -object-assign-deep@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/object-assign-deep/-/object-assign-deep-0.4.0.tgz#43505d3679abb9686ab359b97ac14cc837a9d143" - integrity sha512-54Uvn3s+4A/cMWx9tlRez1qtc7pN7pbQ+Yi7mjLjcBpWLlP+XbSHiHbQW6CElDiV4OvuzqnMrBdkgxI1mT8V/Q== - -object-assign@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" - integrity sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I= - object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -8377,13 +7999,6 @@ packet-reader@1.0.0: resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== -param-case@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= - dependencies: - no-case "^2.2.0" - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -8412,14 +8027,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - parse-json@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646" @@ -8540,11 +8147,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -8628,11 +8230,6 @@ pify@^2.0.0, pify@^2.2.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -8650,13 +8247,6 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -9371,11 +8961,6 @@ promise-retry@^2.0.1: err-code "^2.0.2" retry "^0.12.0" -promise-sequential@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/promise-sequential/-/promise-sequential-1.1.1.tgz#f79e8950ef86e7a7a85bf320452643592f6d2fb2" - integrity sha1-956JUO+G56eoW/MgRSZDWS9tL7I= - promise.prototype.finally@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.2.tgz#b8af89160c9c673cefe3b4c4435b53cfd0287067" @@ -9765,7 +9350,7 @@ rechoir@^0.7.0: dependencies: resolve "^1.9.0" -reconnecting-websocket@4.4.0, reconnecting-websocket@^4.4.0: +reconnecting-websocket@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/reconnecting-websocket/-/reconnecting-websocket-4.4.0.tgz#3b0e5b96ef119e78a03135865b8bb0af1b948783" integrity sha512-D2E33ceRPga0NvTDhJmphEgJ7FUYF0v4lr1ki0csq06OdlxKfugGzN0dSkxM/NfqCxYELK4KcaTOUOjTV6Dcng== @@ -9823,11 +9408,6 @@ reflect-metadata@0.1.13, reflect-metadata@^0.1.13: resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== -regenerator-runtime@0.13.9: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== - regenerator-runtime@^0.13.4: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" @@ -9846,11 +9426,6 @@ regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== -relateurl@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - remove-bom-buffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" @@ -10053,7 +9628,7 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.4.0, is-core-module "^2.0.0" path-parse "^1.0.6" -resolve@^1.14.2, resolve@^1.15.1: +resolve@^1.15.1: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -10108,13 +9683,6 @@ rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -rimraf@^2.6.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - rndstr@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/rndstr/-/rndstr-1.0.0.tgz#77e66fa8f9b4836853fdd91e50719591bb67d349" @@ -10268,12 +9836,7 @@ semver-greatest-satisfied-range@^1.1.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - -semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: +semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -10490,19 +10053,12 @@ sort-keys@^1.0.0: dependencies: is-plain-obj "^1.0.0" -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - sortablejs@1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.10.2.tgz#6e40364d913f98b85a14f6678f92b5c1221f5290" integrity sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A== -source-list-map@^2.0.0, source-list-map@^2.0.1: +source-list-map@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== @@ -10536,12 +10092,12 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6: +source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -11093,11 +10649,6 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" -tapable@^1.0.0-beta.5: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - tapable@^2.1.1, tapable@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" @@ -11302,7 +10853,7 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= -tinycolor2@1.4.2, tinycolor2@^1.1.2: +tinycolor2@1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== @@ -11569,7 +11120,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: +type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -11657,13 +11208,6 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== -uglify-js@^3.5.1: - version "3.9.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.1.tgz#a56a71c8caa2d36b5556cc1fd57df01ae3491539" - integrity sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA== - dependencies: - commander "~2.20.3" - ulid@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/ulid/-/ulid-2.3.0.tgz#93063522771a9774121a84d126ecd3eb9804071f" @@ -11777,11 +11321,6 @@ untildify@^4.0.0: resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== -upper-case@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= - uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -11897,11 +11436,6 @@ value-or-function@^3.0.0: resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= -vanilla-tilt@1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/vanilla-tilt/-/vanilla-tilt-1.7.1.tgz#4f5f3a29707551f532e3766bc0062023c3eec186" - integrity sha512-S3qZcTqMEVthgdnxhOW1BDcXJ0kCzrhF/zQYPTwtRMeETn9DW3BEvQrfAMsMN02mi3TMytWR+ODuNrcfO7OGWw== - vary@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -11981,16 +11515,6 @@ void-elements@^3.1.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" integrity sha1-YU9/v42AHwu18GYfWy9XhXUOTwk= -vue-color@2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/vue-color/-/vue-color-2.8.1.tgz#a090f3dcf8ed6f07afdb865cac84b19a73302e70" - integrity sha512-BoLCEHisXi2QgwlhZBg9UepvzZZmi4176vbr+31Shen5WWZwSLVgdScEPcB+yrAtuHAz42309C0A4+WiL9lNBw== - dependencies: - clamp "^1.0.1" - lodash.throttle "^4.0.0" - material-colors "^1.0.0" - tinycolor2 "^1.1.2" - vue-eslint-parser@^7.10.0: version "7.10.0" resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.10.0.tgz#ea4e4b10fd10aa35c8a79ac783488d8abcd29be8" @@ -12004,11 +11528,6 @@ vue-eslint-parser@^7.10.0: lodash "^4.17.21" semver "^6.3.0" -vue-json-pretty@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/vue-json-pretty/-/vue-json-pretty-1.8.1.tgz#538bb57fc718544152105aef659b4c88475365ee" - integrity sha512-GHi8q6QLx8fw8XDhAgztlC6emupptpmV5a+yd4UxteEoPqGHXwpgscTbTTxwH2GEdmYXHAt+GLg5tAsenLZKDA== - vue-loader@16.5.0: version "16.5.0" resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-16.5.0.tgz#09c4e0712466899e34b99a686524f19165fb2892" @@ -12151,14 +11670,6 @@ webpack-merge@^5.7.3: clone-deep "^4.0.1" wildcard "^2.0.0" -webpack-sources@^1.0.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - webpack-sources@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.2.0.tgz#058926f39e3d443193b6c31547229806ffd02bac" @@ -12374,27 +11885,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^2.0.0: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write-json-file@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" - integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - pify "^3.0.0" - sort-keys "^2.0.0" - write-file-atomic "^2.0.0" - ws@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.1.0.tgz#75e5ec608f66d3d3934ec6dbc4ebc8a34a68638c" From b9cb6d1c10729869cbb57ce50c8174ad7474db75 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 18:33:41 +0900 Subject: [PATCH 08/32] refactor: refactoring imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将来ESMに移行しやすいように Related: #7658 なんかmochaが起動しなくなってるけど理由不明 すぐ直したい --- index.js | 10 ++ package.json | 4 +- src/argv.ts | 25 ++-- src/boot/index.ts | 8 +- src/boot/master.ts | 16 +-- src/boot/worker.ts | 2 +- src/config/index.ts | 2 +- src/config/load.ts | 12 +- src/daemons/janitor.ts | 2 +- src/daemons/queue-stats.ts | 2 +- src/db/elasticsearch.ts | 2 +- src/db/logger.ts | 2 +- src/db/postgre.ts | 134 +++++++++--------- src/db/redis.ts | 2 +- src/index.ts | 2 +- src/mfm/to-html.ts | 8 +- src/misc/antenna-cache.ts | 6 +- src/misc/app-lock.ts | 5 +- src/misc/captcha.ts | 4 +- src/misc/check-hit-antenna.ts | 14 +- src/misc/check-word-mute.ts | 4 +- src/misc/convert-host.ts | 2 +- src/misc/count-same-renotes.ts | 2 +- src/misc/detect-url-mime.ts | 6 +- src/misc/download-text-file.ts | 6 +- src/misc/download-url.ts | 6 +- src/misc/extract-custom-emojis-from-mfm.ts | 2 +- src/misc/extract-hashtags.ts | 2 +- src/misc/fetch-meta.ts | 2 +- src/misc/fetch-proxy-account.ts | 6 +- src/misc/fetch.ts | 2 +- src/misc/gen-avatar.ts | 2 +- src/misc/gen-id.ts | 10 +- src/misc/get-user-name.ts | 2 +- src/misc/is-quote.ts | 2 +- src/misc/keypair-store.ts | 8 +- src/misc/license.ts | 8 +- src/misc/populate-emojis.ts | 16 +-- src/misc/reaction-lib.ts | 8 +- src/misc/show-machine-info.ts | 2 +- src/models/entities/abuse-user-report.ts | 4 +- src/models/entities/access-token.ts | 6 +- src/models/entities/ad.ts | 2 +- src/models/entities/announcement-read.ts | 6 +- src/models/entities/announcement.ts | 2 +- src/models/entities/antenna-note.ts | 6 +- src/models/entities/antenna.ts | 8 +- src/models/entities/app.ts | 4 +- src/models/entities/attestation-challenge.ts | 4 +- src/models/entities/auth-session.ts | 6 +- src/models/entities/blocking.ts | 4 +- src/models/entities/channel-following.ts | 6 +- src/models/entities/channel-note-pining.ts | 6 +- src/models/entities/channel.ts | 6 +- src/models/entities/clip-note.ts | 6 +- src/models/entities/clip.ts | 4 +- src/models/entities/drive-file.ts | 6 +- src/models/entities/drive-folder.ts | 4 +- src/models/entities/emoji.ts | 2 +- src/models/entities/follow-request.ts | 4 +- src/models/entities/following.ts | 4 +- src/models/entities/gallery-like.ts | 6 +- src/models/entities/gallery-post.ts | 6 +- src/models/entities/games/reversi/game.ts | 4 +- src/models/entities/games/reversi/matching.ts | 4 +- src/models/entities/hashtag.ts | 4 +- src/models/entities/instance.ts | 2 +- src/models/entities/log.ts | 2 +- src/models/entities/messaging-message.ts | 8 +- src/models/entities/meta.ts | 6 +- src/models/entities/moderation-log.ts | 4 +- src/models/entities/muted-note.ts | 8 +- src/models/entities/muting.ts | 4 +- src/models/entities/note-favorite.ts | 6 +- src/models/entities/note-reaction.ts | 6 +- src/models/entities/note-unread.ts | 8 +- src/models/entities/note-watching.ts | 6 +- src/models/entities/note.ts | 10 +- src/models/entities/notification.ts | 14 +- src/models/entities/page-like.ts | 6 +- src/models/entities/page.ts | 6 +- src/models/entities/password-reset-request.ts | 4 +- src/models/entities/poll-vote.ts | 6 +- src/models/entities/poll.ts | 8 +- src/models/entities/promo-note.ts | 6 +- src/models/entities/promo-read.ts | 6 +- src/models/entities/registration-tickets.ts | 2 +- src/models/entities/registry-item.ts | 4 +- src/models/entities/relay.ts | 2 +- src/models/entities/signin.ts | 4 +- src/models/entities/sw-subscription.ts | 4 +- src/models/entities/user-group-invitation.ts | 6 +- src/models/entities/user-group-joining.ts | 6 +- src/models/entities/user-group.ts | 4 +- src/models/entities/user-keypair.ts | 4 +- src/models/entities/user-list-joining.ts | 6 +- src/models/entities/user-list.ts | 4 +- src/models/entities/user-note-pining.ts | 6 +- src/models/entities/user-profile.ts | 8 +- src/models/entities/user-publickey.ts | 4 +- src/models/entities/user-security-key.ts | 4 +- src/models/entities/user.ts | 4 +- src/models/index.ts | 126 ++++++++-------- src/models/repositories/abuse-user-report.ts | 6 +- src/models/repositories/antenna.ts | 6 +- src/models/repositories/app.ts | 6 +- src/models/repositories/auth-session.ts | 8 +- src/models/repositories/blocking.ts | 10 +- src/models/repositories/channel.ts | 8 +- src/models/repositories/clip.ts | 8 +- src/models/repositories/drive-file.ts | 20 +-- src/models/repositories/drive-folder.ts | 8 +- src/models/repositories/emoji.ts | 2 +- .../repositories/federation-instance.ts | 2 +- src/models/repositories/follow-request.ts | 6 +- src/models/repositories/following.ts | 10 +- src/models/repositories/gallery-like.ts | 4 +- src/models/repositories/gallery-post.ts | 10 +- src/models/repositories/games/reversi/game.ts | 6 +- .../repositories/games/reversi/matching.ts | 8 +- src/models/repositories/hashtag.ts | 4 +- src/models/repositories/messaging-message.ts | 8 +- src/models/repositories/moderation-logs.ts | 6 +- src/models/repositories/muting.ts | 10 +- src/models/repositories/note-favorite.ts | 6 +- src/models/repositories/note-reaction.ts | 10 +- src/models/repositories/note.ts | 18 +-- src/models/repositories/notification.ts | 16 +-- src/models/repositories/page-like.ts | 6 +- src/models/repositories/page.ts | 12 +- src/models/repositories/relay.ts | 2 +- src/models/repositories/signin.ts | 2 +- .../repositories/user-group-invitation.ts | 4 +- src/models/repositories/user-group.ts | 6 +- src/models/repositories/user-list.ts | 6 +- src/models/repositories/user.ts | 16 +-- src/prelude/array.ts | 2 +- src/queue/index.ts | 24 ++-- src/queue/initialize.ts | 2 +- src/queue/logger.ts | 2 +- src/queue/processors/db/delete-drive-files.ts | 8 +- src/queue/processors/db/export-blocking.ts | 12 +- src/queue/processors/db/export-following.ts | 12 +- src/queue/processors/db/export-mute.ts | 12 +- src/queue/processors/db/export-notes.ts | 14 +- src/queue/processors/db/export-user-lists.ts | 12 +- src/queue/processors/db/import-following.ts | 16 +-- src/queue/processors/db/import-user-lists.ts | 18 +-- src/queue/processors/db/index.ts | 18 +-- src/queue/processors/deliver.ts | 22 +-- src/queue/processors/inbox.ts | 26 ++-- .../object-storage/clean-remote-files.ts | 6 +- .../processors/object-storage/delete-file.ts | 4 +- src/queue/processors/object-storage/index.ts | 6 +- src/queue/queues.ts | 6 +- src/queue/types.ts | 6 +- src/remote/activitypub/audience.ts | 10 +- src/remote/activitypub/db-resolver.ts | 16 +-- src/remote/activitypub/deliver-manager.ts | 6 +- .../activitypub/kernel/accept/follow.ts | 10 +- src/remote/activitypub/kernel/accept/index.ts | 10 +- src/remote/activitypub/kernel/add/index.ts | 8 +- .../activitypub/kernel/announce/index.ts | 10 +- .../activitypub/kernel/announce/note.ts | 20 +-- src/remote/activitypub/kernel/block/index.ts | 8 +- src/remote/activitypub/kernel/create/index.ts | 12 +- src/remote/activitypub/kernel/create/note.ts | 12 +- src/remote/activitypub/kernel/delete/index.ts | 8 +- src/remote/activitypub/kernel/delete/note.ts | 12 +- src/remote/activitypub/kernel/flag/index.ts | 10 +- src/remote/activitypub/kernel/follow.ts | 8 +- src/remote/activitypub/kernel/index.ts | 38 ++--- src/remote/activitypub/kernel/like.ts | 8 +- src/remote/activitypub/kernel/read.ts | 10 +- .../activitypub/kernel/reject/follow.ts | 10 +- src/remote/activitypub/kernel/reject/index.ts | 10 +- src/remote/activitypub/kernel/remove/index.ts | 8 +- .../activitypub/kernel/undo/announce.ts | 8 +- src/remote/activitypub/kernel/undo/block.ts | 8 +- src/remote/activitypub/kernel/undo/follow.ts | 12 +- src/remote/activitypub/kernel/undo/index.ts | 16 +-- src/remote/activitypub/kernel/undo/like.ts | 8 +- src/remote/activitypub/kernel/update/index.ts | 12 +- src/remote/activitypub/logger.ts | 2 +- src/remote/activitypub/misc/get-note-html.ts | 4 +- src/remote/activitypub/misc/html-to-mfm.ts | 6 +- src/remote/activitypub/misc/ld-signature.ts | 4 +- src/remote/activitypub/models/image.ts | 14 +- src/remote/activitypub/models/mention.ts | 10 +- src/remote/activitypub/models/note.ts | 52 +++---- src/remote/activitypub/models/person.ts | 50 +++---- src/remote/activitypub/models/question.ts | 12 +- src/remote/activitypub/models/tag.ts | 4 +- src/remote/activitypub/perform.ts | 6 +- src/remote/activitypub/renderer/accept.ts | 4 +- src/remote/activitypub/renderer/add.ts | 4 +- src/remote/activitypub/renderer/announce.ts | 4 +- src/remote/activitypub/renderer/block.ts | 4 +- src/remote/activitypub/renderer/create.ts | 4 +- src/remote/activitypub/renderer/delete.ts | 4 +- src/remote/activitypub/renderer/document.ts | 4 +- src/remote/activitypub/renderer/emoji.ts | 4 +- .../activitypub/renderer/follow-relay.ts | 6 +- .../activitypub/renderer/follow-user.ts | 6 +- src/remote/activitypub/renderer/follow.ts | 6 +- src/remote/activitypub/renderer/hashtag.ts | 2 +- src/remote/activitypub/renderer/image.ts | 4 +- src/remote/activitypub/renderer/index.ts | 10 +- src/remote/activitypub/renderer/key.ts | 6 +- src/remote/activitypub/renderer/like.ts | 10 +- src/remote/activitypub/renderer/mention.ts | 6 +- src/remote/activitypub/renderer/note.ts | 22 +-- src/remote/activitypub/renderer/person.ts | 22 +-- src/remote/activitypub/renderer/question.ts | 8 +- src/remote/activitypub/renderer/read.ts | 6 +- src/remote/activitypub/renderer/reject.ts | 4 +- src/remote/activitypub/renderer/remove.ts | 4 +- src/remote/activitypub/renderer/undo.ts | 4 +- src/remote/activitypub/renderer/update.ts | 4 +- src/remote/activitypub/renderer/vote.ts | 10 +- src/remote/activitypub/request.ts | 8 +- src/remote/activitypub/resolver.ts | 12 +- src/remote/logger.ts | 2 +- src/remote/resolve-user.ts | 14 +- src/remote/webfinger.ts | 4 +- src/server/activitypub.ts | 30 ++-- src/server/activitypub/featured.ts | 12 +- src/server/activitypub/followers.ts | 18 +-- src/server/activitypub/following.ts | 20 +-- src/server/activitypub/outbox.ts | 28 ++-- src/server/api/2fa.ts | 2 +- src/server/api/api-handler.ts | 8 +- src/server/api/authenticate.ts | 8 +- src/server/api/call.ts | 12 +- src/server/api/common/generate-block-query.ts | 4 +- .../api/common/generate-channel-query.ts | 4 +- .../api/common/generate-muted-note-query.ts | 4 +- .../api/common/generate-muted-user-query.ts | 4 +- .../api/common/generate-native-user-token.ts | 2 +- .../api/common/generate-replies-query.ts | 2 +- .../api/common/generate-visibility-query.ts | 4 +- src/server/api/common/getters.ts | 8 +- src/server/api/common/inject-featured.ts | 10 +- src/server/api/common/inject-promo.ts | 6 +- .../api/common/read-messaging-message.ts | 26 ++-- src/server/api/common/read-notification.ts | 8 +- src/server/api/common/signin.ts | 10 +- src/server/api/common/signup.ts | 18 +-- src/server/api/define.ts | 10 +- src/server/api/endpoints.ts | 10 +- .../api/endpoints/admin/abuse-user-reports.ts | 8 +- .../api/endpoints/admin/accounts/create.ts | 6 +- src/server/api/endpoints/admin/ad/create.ts | 6 +- src/server/api/endpoints/admin/ad/delete.ts | 8 +- src/server/api/endpoints/admin/ad/list.ts | 8 +- src/server/api/endpoints/admin/ad/update.ts | 8 +- .../endpoints/admin/announcements/create.ts | 6 +- .../endpoints/admin/announcements/delete.ts | 8 +- .../api/endpoints/admin/announcements/list.ts | 8 +- .../endpoints/admin/announcements/update.ts | 8 +- .../admin/delete-all-files-of-a-user.ts | 8 +- src/server/api/endpoints/admin/delete-logs.ts | 4 +- .../admin/drive/clean-remote-files.ts | 4 +- .../api/endpoints/admin/drive/cleanup.ts | 6 +- src/server/api/endpoints/admin/drive/files.ts | 8 +- .../api/endpoints/admin/drive/show-file.ts | 8 +- src/server/api/endpoints/admin/emoji/add.ts | 14 +- src/server/api/endpoints/admin/emoji/copy.ts | 16 +-- .../api/endpoints/admin/emoji/list-remote.ts | 10 +- src/server/api/endpoints/admin/emoji/list.ts | 10 +- .../api/endpoints/admin/emoji/remove.ts | 10 +- .../api/endpoints/admin/emoji/update.ts | 8 +- .../admin/federation/delete-all-files.ts | 6 +- .../refresh-remote-instance-metadata.ts | 8 +- .../admin/federation/remove-all-following.ts | 6 +- .../admin/federation/update-instance.ts | 6 +- .../api/endpoints/admin/get-index-stats.ts | 2 +- .../api/endpoints/admin/get-table-stats.ts | 2 +- src/server/api/endpoints/admin/invite.ts | 6 +- src/server/api/endpoints/admin/logs.ts | 4 +- .../api/endpoints/admin/moderators/add.ts | 6 +- .../api/endpoints/admin/moderators/remove.ts | 6 +- .../api/endpoints/admin/promo/create.ts | 10 +- src/server/api/endpoints/admin/queue/clear.ts | 6 +- .../endpoints/admin/queue/deliver-delayed.ts | 4 +- .../endpoints/admin/queue/inbox-delayed.ts | 4 +- src/server/api/endpoints/admin/queue/jobs.ts | 4 +- src/server/api/endpoints/admin/queue/stats.ts | 4 +- src/server/api/endpoints/admin/relays/add.ts | 6 +- src/server/api/endpoints/admin/relays/list.ts | 4 +- .../api/endpoints/admin/relays/remove.ts | 4 +- .../api/endpoints/admin/reset-password.ts | 6 +- .../admin/resolve-abuse-user-report.ts | 6 +- .../api/endpoints/admin/resync-chart.ts | 6 +- src/server/api/endpoints/admin/send-email.ts | 4 +- src/server/api/endpoints/admin/server-info.ts | 4 +- .../endpoints/admin/show-moderation-logs.ts | 8 +- src/server/api/endpoints/admin/show-user.ts | 6 +- src/server/api/endpoints/admin/show-users.ts | 4 +- .../api/endpoints/admin/silence-user.ts | 8 +- .../api/endpoints/admin/suspend-user.ts | 16 +-- .../api/endpoints/admin/unsilence-user.ts | 8 +- .../api/endpoints/admin/unsuspend-user.ts | 10 +- src/server/api/endpoints/admin/update-meta.ts | 10 +- src/server/api/endpoints/admin/vacuum.ts | 4 +- src/server/api/endpoints/announcements.ts | 8 +- src/server/api/endpoints/antennas/create.ts | 12 +- src/server/api/endpoints/antennas/delete.ts | 10 +- src/server/api/endpoints/antennas/list.ts | 4 +- src/server/api/endpoints/antennas/notes.ts | 16 +-- src/server/api/endpoints/antennas/show.ts | 8 +- src/server/api/endpoints/antennas/update.ts | 10 +- src/server/api/endpoints/ap/get.ts | 6 +- src/server/api/endpoints/ap/show.ts | 24 ++-- src/server/api/endpoints/app/create.ts | 10 +- src/server/api/endpoints/app/show.ts | 8 +- src/server/api/endpoints/auth/accept.ts | 10 +- .../api/endpoints/auth/session/generate.ts | 10 +- src/server/api/endpoints/auth/session/show.ts | 6 +- .../api/endpoints/auth/session/userkey.ts | 6 +- src/server/api/endpoints/blocking/create.ts | 12 +- src/server/api/endpoints/blocking/delete.ts | 12 +- src/server/api/endpoints/blocking/list.ts | 8 +- src/server/api/endpoints/channels/create.ts | 12 +- src/server/api/endpoints/channels/featured.ts | 4 +- src/server/api/endpoints/channels/follow.ts | 12 +- src/server/api/endpoints/channels/followed.ts | 8 +- src/server/api/endpoints/channels/owned.ts | 8 +- src/server/api/endpoints/channels/show.ts | 8 +- src/server/api/endpoints/channels/timeline.ts | 12 +- src/server/api/endpoints/channels/unfollow.ts | 10 +- src/server/api/endpoints/channels/update.ts | 8 +- .../api/endpoints/charts/active-users.ts | 6 +- src/server/api/endpoints/charts/drive.ts | 6 +- src/server/api/endpoints/charts/federation.ts | 6 +- src/server/api/endpoints/charts/hashtag.ts | 6 +- src/server/api/endpoints/charts/instance.ts | 6 +- src/server/api/endpoints/charts/network.ts | 6 +- src/server/api/endpoints/charts/notes.ts | 6 +- src/server/api/endpoints/charts/user/drive.ts | 8 +- .../api/endpoints/charts/user/following.ts | 8 +- src/server/api/endpoints/charts/user/notes.ts | 8 +- .../api/endpoints/charts/user/reactions.ts | 8 +- src/server/api/endpoints/charts/users.ts | 6 +- src/server/api/endpoints/clips/add-note.ts | 12 +- src/server/api/endpoints/clips/create.ts | 6 +- src/server/api/endpoints/clips/delete.ts | 8 +- src/server/api/endpoints/clips/list.ts | 4 +- src/server/api/endpoints/clips/notes.ts | 16 +-- src/server/api/endpoints/clips/show.ts | 8 +- src/server/api/endpoints/clips/update.ts | 8 +- src/server/api/endpoints/drive.ts | 6 +- src/server/api/endpoints/drive/files.ts | 8 +- .../endpoints/drive/files/attached-notes.ts | 8 +- .../endpoints/drive/files/check-existence.ts | 4 +- .../api/endpoints/drive/files/create.ts | 12 +- .../api/endpoints/drive/files/delete.ts | 12 +- .../api/endpoints/drive/files/find-by-hash.ts | 4 +- src/server/api/endpoints/drive/files/find.ts | 6 +- src/server/api/endpoints/drive/files/show.ts | 10 +- .../api/endpoints/drive/files/update.ts | 10 +- .../endpoints/drive/files/upload-from-url.ts | 10 +- src/server/api/endpoints/drive/folders.ts | 8 +- .../api/endpoints/drive/folders/create.ts | 12 +- .../api/endpoints/drive/folders/delete.ts | 10 +- .../api/endpoints/drive/folders/find.ts | 6 +- .../api/endpoints/drive/folders/show.ts | 8 +- .../api/endpoints/drive/folders/update.ts | 10 +- src/server/api/endpoints/drive/stream.ts | 8 +- src/server/api/endpoints/endpoint.ts | 4 +- src/server/api/endpoints/endpoints.ts | 4 +- src/server/api/endpoints/federation/dns.ts | 6 +- .../api/endpoints/federation/followers.ts | 8 +- .../api/endpoints/federation/following.ts | 8 +- .../api/endpoints/federation/instances.ts | 8 +- .../api/endpoints/federation/show-instance.ts | 6 +- .../federation/update-remote-user.ts | 8 +- src/server/api/endpoints/federation/users.ts | 8 +- src/server/api/endpoints/following/create.ts | 12 +- src/server/api/endpoints/following/delete.ts | 12 +- .../endpoints/following/requests/accept.ts | 10 +- .../endpoints/following/requests/cancel.ts | 12 +- .../api/endpoints/following/requests/list.ts | 4 +- .../endpoints/following/requests/reject.ts | 10 +- src/server/api/endpoints/gallery/featured.ts | 4 +- src/server/api/endpoints/gallery/popular.ts | 4 +- src/server/api/endpoints/gallery/posts.ts | 8 +- .../api/endpoints/gallery/posts/create.ts | 14 +- .../api/endpoints/gallery/posts/delete.ts | 8 +- .../api/endpoints/gallery/posts/like.ts | 10 +- .../api/endpoints/gallery/posts/show.ts | 8 +- .../api/endpoints/gallery/posts/unlike.ts | 8 +- .../api/endpoints/gallery/posts/update.ts | 12 +- .../api/endpoints/games/reversi/games.ts | 8 +- .../api/endpoints/games/reversi/games/show.ts | 10 +- .../games/reversi/games/surrender.ts | 10 +- .../endpoints/games/reversi/invitations.ts | 4 +- .../api/endpoints/games/reversi/match.ts | 20 +-- .../endpoints/games/reversi/match/cancel.ts | 4 +- .../api/endpoints/get-online-users-count.ts | 6 +- src/server/api/endpoints/hashtags/list.ts | 4 +- src/server/api/endpoints/hashtags/search.ts | 4 +- src/server/api/endpoints/hashtags/show.ts | 8 +- src/server/api/endpoints/hashtags/trend.ts | 12 +- src/server/api/endpoints/hashtags/users.ts | 6 +- src/server/api/endpoints/i.ts | 4 +- src/server/api/endpoints/i/2fa/done.ts | 4 +- src/server/api/endpoints/i/2fa/key-done.ts | 10 +- .../api/endpoints/i/2fa/password-less.ts | 4 +- .../api/endpoints/i/2fa/register-key.ts | 8 +- src/server/api/endpoints/i/2fa/register.ts | 6 +- src/server/api/endpoints/i/2fa/remove-key.ts | 6 +- src/server/api/endpoints/i/2fa/unregister.ts | 4 +- src/server/api/endpoints/i/apps.ts | 4 +- src/server/api/endpoints/i/authorized-apps.ts | 4 +- src/server/api/endpoints/i/change-password.ts | 4 +- src/server/api/endpoints/i/delete-account.ts | 8 +- src/server/api/endpoints/i/export-blocking.ts | 6 +- .../api/endpoints/i/export-following.ts | 6 +- src/server/api/endpoints/i/export-mute.ts | 6 +- src/server/api/endpoints/i/export-notes.ts | 6 +- .../api/endpoints/i/export-user-lists.ts | 6 +- src/server/api/endpoints/i/favorites.ts | 8 +- src/server/api/endpoints/i/gallery/likes.ts | 8 +- src/server/api/endpoints/i/gallery/posts.ts | 8 +- .../endpoints/i/get-word-muted-notes-count.ts | 4 +- .../api/endpoints/i/import-following.ts | 12 +- .../api/endpoints/i/import-user-lists.ts | 12 +- src/server/api/endpoints/i/notifications.ts | 14 +- src/server/api/endpoints/i/page-likes.ts | 8 +- src/server/api/endpoints/i/pages.ts | 8 +- src/server/api/endpoints/i/pin.ts | 10 +- .../i/read-all-messaging-messages.ts | 6 +- .../api/endpoints/i/read-all-unread-notes.ts | 6 +- .../api/endpoints/i/read-announcement.ts | 12 +- .../api/endpoints/i/regenerate-token.ts | 8 +- .../api/endpoints/i/registry/get-all.ts | 4 +- .../api/endpoints/i/registry/get-detail.ts | 6 +- src/server/api/endpoints/i/registry/get.ts | 6 +- .../endpoints/i/registry/keys-with-type.ts | 4 +- src/server/api/endpoints/i/registry/keys.ts | 4 +- src/server/api/endpoints/i/registry/remove.ts | 6 +- src/server/api/endpoints/i/registry/scopes.ts | 4 +- src/server/api/endpoints/i/registry/set.ts | 8 +- src/server/api/endpoints/i/revoke-token.ts | 8 +- src/server/api/endpoints/i/signin-history.ts | 8 +- src/server/api/endpoints/i/unpin.ts | 10 +- src/server/api/endpoints/i/update-email.ts | 12 +- src/server/api/endpoints/i/update.ts | 28 ++-- .../api/endpoints/i/user-group-invites.ts | 8 +- src/server/api/endpoints/messaging/history.ts | 6 +- .../api/endpoints/messaging/messages.ts | 14 +- .../endpoints/messaging/messages/create.ts | 16 +-- .../endpoints/messaging/messages/delete.ts | 10 +- .../api/endpoints/messaging/messages/read.ts | 10 +- src/server/api/endpoints/meta.ts | 10 +- src/server/api/endpoints/miauth/gen-token.ts | 8 +- src/server/api/endpoints/mute/create.ts | 16 +-- src/server/api/endpoints/mute/delete.ts | 12 +- src/server/api/endpoints/mute/list.ts | 8 +- src/server/api/endpoints/my/apps.ts | 4 +- src/server/api/endpoints/notes.ts | 8 +- src/server/api/endpoints/notes/children.ts | 14 +- src/server/api/endpoints/notes/clips.ts | 10 +- .../api/endpoints/notes/conversation.ts | 12 +- src/server/api/endpoints/notes/create.ts | 24 ++-- src/server/api/endpoints/notes/delete.ts | 12 +- .../api/endpoints/notes/favorites/create.ts | 12 +- .../api/endpoints/notes/favorites/delete.ts | 10 +- src/server/api/endpoints/notes/featured.ts | 8 +- .../api/endpoints/notes/global-timeline.ts | 22 +-- .../api/endpoints/notes/hybrid-timeline.ts | 26 ++-- .../api/endpoints/notes/local-timeline.ts | 26 ++-- src/server/api/endpoints/notes/mentions.ts | 16 +-- .../endpoints/notes/polls/recommendation.ts | 4 +- src/server/api/endpoints/notes/polls/vote.ts | 26 ++-- src/server/api/endpoints/notes/reactions.ts | 12 +- .../api/endpoints/notes/reactions/create.ts | 10 +- .../api/endpoints/notes/reactions/delete.ts | 10 +- src/server/api/endpoints/notes/renotes.ts | 18 +-- src/server/api/endpoints/notes/replies.ts | 14 +- .../api/endpoints/notes/search-by-tag.ts | 18 +-- src/server/api/endpoints/notes/search.ts | 18 +-- src/server/api/endpoints/notes/show.ts | 10 +- src/server/api/endpoints/notes/state.ts | 6 +- src/server/api/endpoints/notes/timeline.ts | 22 +-- src/server/api/endpoints/notes/translate.ts | 14 +- src/server/api/endpoints/notes/unrenote.ts | 12 +- .../api/endpoints/notes/user-list-timeline.ts | 14 +- .../api/endpoints/notes/watching/create.ts | 10 +- .../api/endpoints/notes/watching/delete.ts | 10 +- .../api/endpoints/notifications/create.ts | 4 +- .../notifications/mark-all-as-read.ts | 6 +- .../api/endpoints/notifications/read.ts | 12 +- src/server/api/endpoints/page-push.ts | 10 +- src/server/api/endpoints/pages/create.ts | 12 +- src/server/api/endpoints/pages/delete.ts | 8 +- src/server/api/endpoints/pages/featured.ts | 4 +- src/server/api/endpoints/pages/like.ts | 10 +- src/server/api/endpoints/pages/show.ts | 10 +- src/server/api/endpoints/pages/unlike.ts | 8 +- src/server/api/endpoints/pages/update.ts | 8 +- src/server/api/endpoints/ping.ts | 2 +- src/server/api/endpoints/pinned-users.ts | 10 +- src/server/api/endpoints/promo/read.ts | 12 +- .../api/endpoints/request-reset-password.ts | 14 +- src/server/api/endpoints/reset-db.ts | 6 +- src/server/api/endpoints/reset-password.ts | 8 +- src/server/api/endpoints/room/show.ts | 10 +- src/server/api/endpoints/room/update.ts | 6 +- src/server/api/endpoints/server-info.ts | 2 +- src/server/api/endpoints/stats.ts | 6 +- src/server/api/endpoints/sw/register.ts | 8 +- .../api/endpoints/username/available.ts | 4 +- src/server/api/endpoints/users.ts | 8 +- src/server/api/endpoints/users/clips.ts | 8 +- src/server/api/endpoints/users/followers.ts | 12 +- src/server/api/endpoints/users/following.ts | 12 +- .../api/endpoints/users/gallery/posts.ts | 8 +- .../users/get-frequently-replied-users.ts | 12 +- .../api/endpoints/users/groups/create.ts | 10 +- .../api/endpoints/users/groups/delete.ts | 8 +- .../users/groups/invitations/accept.ts | 12 +- .../users/groups/invitations/reject.ts | 8 +- .../api/endpoints/users/groups/invite.ts | 16 +-- .../api/endpoints/users/groups/joined.ts | 4 +- .../api/endpoints/users/groups/owned.ts | 4 +- src/server/api/endpoints/users/groups/pull.ts | 10 +- src/server/api/endpoints/users/groups/show.ts | 8 +- .../api/endpoints/users/groups/transfer.ts | 10 +- .../api/endpoints/users/groups/update.ts | 8 +- .../api/endpoints/users/lists/create.ts | 8 +- .../api/endpoints/users/lists/delete.ts | 8 +- src/server/api/endpoints/users/lists/list.ts | 4 +- src/server/api/endpoints/users/lists/pull.ts | 12 +- src/server/api/endpoints/users/lists/push.ts | 12 +- src/server/api/endpoints/users/lists/show.ts | 8 +- .../api/endpoints/users/lists/update.ts | 8 +- src/server/api/endpoints/users/notes.ts | 18 +-- src/server/api/endpoints/users/pages.ts | 8 +- .../api/endpoints/users/recommendation.ts | 8 +- src/server/api/endpoints/users/relation.ts | 6 +- .../api/endpoints/users/report-abuse.ts | 14 +- .../users/search-by-username-and-host.ts | 4 +- src/server/api/endpoints/users/search.ts | 6 +- src/server/api/endpoints/users/show.ts | 14 +- src/server/api/endpoints/users/stats.ts | 8 +- src/server/api/index.ts | 16 +-- src/server/api/limiter.ts | 10 +- src/server/api/logger.ts | 2 +- src/server/api/openapi/description.ts | 6 +- src/server/api/openapi/gen-spec.ts | 10 +- src/server/api/openapi/schemas.ts | 46 +++--- src/server/api/private/signin.ts | 12 +- src/server/api/private/signup.ts | 8 +- src/server/api/service/discord.ts | 16 +-- src/server/api/service/github.ts | 16 +-- src/server/api/service/twitter.ts | 14 +- src/server/api/stream/channels/admin.ts | 2 +- src/server/api/stream/channels/antenna.ts | 8 +- src/server/api/stream/channels/channel.ts | 12 +- src/server/api/stream/channels/drive.ts | 2 +- .../api/stream/channels/games/reversi-game.ts | 14 +- .../api/stream/channels/games/reversi.ts | 6 +- .../api/stream/channels/global-timeline.ts | 14 +- src/server/api/stream/channels/hashtag.ts | 12 +- .../api/stream/channels/home-timeline.ts | 12 +- .../api/stream/channels/hybrid-timeline.ts | 16 +-- src/server/api/stream/channels/index.ts | 34 ++--- .../api/stream/channels/local-timeline.ts | 16 +-- src/server/api/stream/channels/main.ts | 4 +- .../api/stream/channels/messaging-index.ts | 2 +- src/server/api/stream/channels/messaging.ts | 8 +- src/server/api/stream/channels/queue-stats.ts | 2 +- .../api/stream/channels/server-stats.ts | 2 +- src/server/api/stream/channels/user-list.ts | 12 +- src/server/api/stream/index.ts | 28 ++-- src/server/api/streaming.ts | 8 +- src/server/file/index.ts | 10 +- src/server/file/send-drive-file.ts | 26 ++-- src/server/index.ts | 26 ++-- src/server/nodeinfo.ts | 10 +- src/server/proxy/index.ts | 2 +- src/server/proxy/proxy-media.ts | 10 +- src/server/web/feed.ts | 6 +- src/server/web/index.ts | 42 +++--- src/server/web/manifest.ts | 2 +- src/server/web/url-preview.ts | 10 +- src/server/well-known.ts | 12 +- src/services/add-note-to-antenna.ts | 14 +- src/services/blocking/create.ts | 22 +-- src/services/blocking/delete.ts | 14 +- .../chart/charts/classes/active-users.ts | 10 +- src/services/chart/charts/classes/drive.ts | 10 +- .../chart/charts/classes/federation.ts | 8 +- src/services/chart/charts/classes/hashtag.ts | 10 +- src/services/chart/charts/classes/instance.ts | 14 +- src/services/chart/charts/classes/network.ts | 6 +- src/services/chart/charts/classes/notes.ts | 10 +- .../chart/charts/classes/per-user-drive.ts | 10 +- .../charts/classes/per-user-following.ts | 10 +- .../chart/charts/classes/per-user-notes.ts | 12 +- .../charts/classes/per-user-reactions.ts | 12 +- .../chart/charts/classes/test-grouped.ts | 6 +- .../chart/charts/classes/test-unique.ts | 6 +- src/services/chart/charts/classes/test.ts | 6 +- src/services/chart/charts/classes/users.ts | 10 +- src/services/chart/core.ts | 8 +- src/services/chart/entities.ts | 10 +- src/services/chart/index.ts | 26 ++-- src/services/create-notification.ts | 14 +- src/services/create-system-user.ts | 14 +- src/services/drive/add-file.ts | 32 ++--- src/services/drive/delete-file.ts | 28 ++-- .../drive/generate-video-thumbnail.ts | 2 +- src/services/drive/internal-storage.ts | 10 +- src/services/drive/logger.ts | 2 +- src/services/drive/s3.ts | 4 +- src/services/drive/upload-from-url.ts | 16 +-- src/services/fetch-instance-metadata.ts | 10 +- src/services/following/create.ts | 32 ++--- src/services/following/delete.ts | 20 +-- src/services/following/requests/accept-all.ts | 6 +- src/services/following/requests/accept.ts | 18 +-- src/services/following/requests/cancel.ts | 16 +-- src/services/following/requests/create.ts | 16 +-- src/services/following/requests/reject.ts | 16 +-- src/services/i/pin.ts | 24 ++-- src/services/i/update.ts | 14 +- src/services/insert-moderation-log.ts | 6 +- src/services/instance-actor.ts | 8 +- src/services/logger.ts | 10 +- src/services/messages/create.ts | 26 ++-- src/services/messages/delete.ts | 16 +-- src/services/note/create.ts | 68 ++++----- src/services/note/delete.ts | 30 ++-- src/services/note/polls/update.ts | 14 +- src/services/note/polls/vote.ts | 12 +- src/services/note/reaction/create.ts | 30 ++-- src/services/note/reaction/delete.ts | 20 +-- src/services/note/read.ts | 18 +-- src/services/note/unread.ts | 10 +- src/services/note/unwatch.ts | 6 +- src/services/note/watch.ts | 10 +- src/services/push-notification.ts | 10 +- .../register-or-fetch-instance-doc.ts | 12 +- src/services/relay.ts | 16 +-- src/services/send-email-notification.ts | 12 +- src/services/send-email.ts | 6 +- src/services/stream.ts | 18 +-- src/services/suspend-user.ts | 12 +- src/services/unsuspend-user.ts | 14 +- src/services/update-hashtag.ts | 12 +- src/services/user-list/push.ts | 16 +-- src/tools/accept-migration.ts | 2 +- src/tools/add-emoji.ts | 4 +- src/tools/demote-admin.ts | 4 +- src/tools/mark-admin.ts | 4 +- src/tools/refresh-question.ts | 2 +- src/tools/resync-remote-user.ts | 6 +- src/tools/show-signin-history.ts | 2 +- src/tsconfig.json | 1 + test/tsconfig.json | 1 + 663 files changed, 3194 insertions(+), 3134 deletions(-) diff --git a/index.js b/index.js index 9b91b0a03e..aa103e667e 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,13 @@ +/* +import * as fs from 'fs'; + +if (fs.existsSync('./built')) { + import('./built/index.js').then(built => built()); +} else { + console.log('Built code is not found. Probably an error occurred during a build or you just forgot to build.'); +} +*/ + const fs = require('fs'); if (fs.existsSync('./built')) { diff --git a/package.json b/package.json index 1f7d570f56..a871012a6c 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "main": "./index.js", "private": true, "scripts": { - "start": "node ./index.js", - "start:test": "cross-env NODE_ENV=test node ./index.js", + "start": "node --experimental-json-modules ./index.js", + "start:test": "cross-env NODE_ENV=test node --experimental-json-modules ./index.js", "init": "npm run migrate", "ormconfig": "node ./built/ormconfig.js", "migrate": "ts-node ./node_modules/typeorm/cli.js migration:run", diff --git a/src/argv.ts b/src/argv.ts index 8e00bcf47d..5d1aeb70a0 100644 --- a/src/argv.ts +++ b/src/argv.ts @@ -1,20 +1,19 @@ import { Command } from 'commander'; -import config from '@/config'; +import config from '@/config/index.js'; const program = new Command(); -program - .version(config.version) - .option('--no-daemons', 'Disable daemon processes (for debbuging)') - .option('--disable-clustering', 'Disable clustering') - .option('--only-server', 'Run server only (without job queue processing)') - .option('--only-queue', 'Pocessing job queue only (without server)') - .option('--quiet', 'Suppress all logs') - .option('--verbose', 'Enable all logs') - .option('--with-log-time', 'Include timestamp for each logs') - .option('--slow', 'Delay all requests (for debbuging)') - .option('--color', 'This option is a dummy for some external program\'s (e.g. forever) issue.') - .parse(process.argv); +program.version(config.version); +program.option('--no-daemons', 'Disable daemon processes (for debbuging)'); +program.option('--disable-clustering', 'Disable clustering'); +program.option('--only-server', 'Run server only (without job queue processing)'); +program.option('--only-queue', 'Pocessing job queue only (without server)'); +program.option('--quiet', 'Suppress all logs'); +program.option('--verbose', 'Enable all logs'); +program.option('--with-log-time', 'Include timestamp for each logs'); +program.option('--slow', 'Delay all requests (for debbuging)'); +program.option('--color', 'This option is a dummy for some external program\'s (e.g. forever) issue.'); +program.parse(process.argv); if (process.env.MK_ONLY_QUEUE) program.onlyQueue = true; if (process.env.NODE_ENV === 'test') program.disableClustering = true; diff --git a/src/boot/index.ts b/src/boot/index.ts index 602f6b0e48..091793e530 100644 --- a/src/boot/index.ts +++ b/src/boot/index.ts @@ -2,13 +2,13 @@ import * as cluster from 'cluster'; import * as chalk from 'chalk'; import Xev from 'xev'; -import Logger from '../services/logger'; -import { program } from '../argv'; +import Logger from '@/services/logger.js'; +import { program } from '../argv.js'; // for typeorm import 'reflect-metadata'; -import { masterMain } from './master'; -import { workerMain } from './worker'; +import { masterMain } from './master.js'; +import { workerMain } from './worker.js'; const logger = new Logger('core', 'cyan'); const clusterLogger = logger.createSubLogger('cluster', 'orange', false); diff --git a/src/boot/master.ts b/src/boot/master.ts index 473e215bac..93ef9a458b 100644 --- a/src/boot/master.ts +++ b/src/boot/master.ts @@ -5,14 +5,14 @@ import * as portscanner from 'portscanner'; import * as isRoot from 'is-root'; import { getConnection } from 'typeorm'; -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'; -const meta = require('../meta.json'); +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 * as meta from '../meta.json'; const logger = new Logger('core', 'cyan'); const bootLogger = logger.createSubLogger('boot', 'magenta', false); diff --git a/src/boot/worker.ts b/src/boot/worker.ts index 362fa3f26b..881e6c723d 100644 --- a/src/boot/worker.ts +++ b/src/boot/worker.ts @@ -1,5 +1,5 @@ import * as cluster from 'cluster'; -import { initDb } from '../db/postgre'; +import { initDb } from '../db/postgre.js'; /** * Init worker process diff --git a/src/config/index.ts b/src/config/index.ts index 7bfdca4612..3e53b00036 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,3 +1,3 @@ -import load from './load'; +import load from './load.js'; export default load(); diff --git a/src/config/load.ts b/src/config/load.ts index 0929e80414..920efad4d6 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -3,14 +3,20 @@ */ import * as fs from 'fs'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; import * as yaml from 'js-yaml'; -import { Source, Mixin } from './types'; -const meta = require('../meta.json'); +import { Source, Mixin } from './types.js'; +import * as meta from '../meta.json'; + +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); /** * Path of configuration directory */ -const dir = `${__dirname}/../../.config`; +const dir = `${_dirname}/../../.config`; /** * Path of configuration file diff --git a/src/daemons/janitor.ts b/src/daemons/janitor.ts index c079086427..2bffbc55d1 100644 --- a/src/daemons/janitor.ts +++ b/src/daemons/janitor.ts @@ -1,7 +1,7 @@ // TODO: 消したい const interval = 30 * 60 * 1000; -import { AttestationChallenges } from '../models'; +import { AttestationChallenges } from '@/models/index.js'; import { LessThan } from 'typeorm'; /** diff --git a/src/daemons/queue-stats.ts b/src/daemons/queue-stats.ts index 77f09b18d6..945bb1bd02 100644 --- a/src/daemons/queue-stats.ts +++ b/src/daemons/queue-stats.ts @@ -1,5 +1,5 @@ import Xev from 'xev'; -import { deliverQueue, inboxQueue } from '../queue/queues'; +import { deliverQueue, inboxQueue } from '../queue/queues.js'; const ev = new Xev(); diff --git a/src/db/elasticsearch.ts b/src/db/elasticsearch.ts index 58455b510d..b21685069c 100644 --- a/src/db/elasticsearch.ts +++ b/src/db/elasticsearch.ts @@ -1,5 +1,5 @@ import * as elasticsearch from '@elastic/elasticsearch'; -import config from '@/config'; +import config from '@/config/index.js'; const index = { settings: { diff --git a/src/db/logger.ts b/src/db/logger.ts index 1f702c18e2..22f4c6b1b0 100644 --- a/src/db/logger.ts +++ b/src/db/logger.ts @@ -1,3 +1,3 @@ -import Logger from '../services/logger'; +import Logger from '@/services/logger.js'; export const dbLogger = new Logger('db'); diff --git a/src/db/postgre.ts b/src/db/postgre.ts index bc691319cf..881f1e4da3 100644 --- a/src/db/postgre.ts +++ b/src/db/postgre.ts @@ -3,75 +3,75 @@ const types = require('pg').types; types.setTypeParser(20, Number); import { createConnection, Logger, getConnection } from 'typeorm'; -import config from '@/config'; -import { entities as charts } from '../services/chart/entities'; -import { dbLogger } from './logger'; +import config from '@/config/index.js'; +import { entities as charts } from '@/services/chart/entities.js'; +import { dbLogger } from './logger.js'; import * as highlight from 'cli-highlight'; -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'; +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'; const sqlLogger = dbLogger.createSubLogger('sql', 'white', false); diff --git a/src/db/redis.ts b/src/db/redis.ts index a10422846f..97500e02b3 100644 --- a/src/db/redis.ts +++ b/src/db/redis.ts @@ -1,5 +1,5 @@ import * as redis from 'redis'; -import config from '@/config'; +import config from '@/config/index.js'; export function createConnection() { return redis.createClient( diff --git a/src/index.ts b/src/index.ts index c4a1088c2e..7c131b2618 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,7 @@ Error.stackTraceLimit = Infinity; require('events').EventEmitter.defaultMaxListeners = 128; -import boot from './boot'; +import boot from './boot/index.js'; export default function() { return boot(); diff --git a/src/mfm/to-html.ts b/src/mfm/to-html.ts index aa39443c64..6ce7d35efa 100644 --- a/src/mfm/to-html.ts +++ b/src/mfm/to-html.ts @@ -1,9 +1,9 @@ import { JSDOM } from 'jsdom'; import * as mfm from 'mfm-js'; -import config from '@/config'; -import { intersperse } from '../prelude/array'; -import { IMentionedRemoteUsers } from '../models/entities/note'; -import { wellKnownServices } from '../well-known-services'; +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'; export function toHtml(nodes: mfm.MfmNode[] | null, mentionedRemoteUsers: IMentionedRemoteUsers = []) { if (nodes == null) { diff --git a/src/misc/antenna-cache.ts b/src/misc/antenna-cache.ts index 6be1c18db5..dcf96c1610 100644 --- a/src/misc/antenna-cache.ts +++ b/src/misc/antenna-cache.ts @@ -1,6 +1,6 @@ -import { Antennas } from '../models'; -import { Antenna } from '../models/entities/antenna'; -import { subsdcriber } from '../db/redis'; +import { Antennas } from '@/models/index.js'; +import { Antenna } from '@/models/entities/antenna.js'; +import { subsdcriber } from '../db/redis.js'; let antennasFetched = false; let antennas: Antenna[] = []; diff --git a/src/misc/app-lock.ts b/src/misc/app-lock.ts index 9ae2cba478..52ac680715 100644 --- a/src/misc/app-lock.ts +++ b/src/misc/app-lock.ts @@ -1,5 +1,6 @@ -import { redisClient } from '../db/redis'; +import { redisClient } from '../db/redis.js'; import { promisify } from 'util'; +import * as redisLock from 'redis-lock'; /** * Retry delay (ms) for lock acquisition @@ -8,7 +9,7 @@ const retryDelay = 100; const lock: (key: string, timeout?: number) => Promise<() => void> = redisClient - ? promisify(require('redis-lock')(redisClient, retryDelay)) + ? promisify(redisLock(redisClient, retryDelay)) : async () => () => { }; /** diff --git a/src/misc/captcha.ts b/src/misc/captcha.ts index 727c86af0f..4623565c3c 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'; -import config from '@/config'; +import { getAgentByUrl } from './fetch.js'; +import config from '@/config/index.js'; 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 3dfcb54c49..fdba66b640 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'; -import { Note } from '../models/entities/note'; -import { User } from '../models/entities/user'; -import { UserListJoinings, UserGroupJoinings } from '../models'; -import { getFullApAccount } from './convert-host'; -import { PackedNote } from '../models/repositories/note'; -import { parseAcct } from '@/misc/acct'; +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'; /** * noteUserFollowers / antennaUserFollowing はどちらか一方が指定されていればよい diff --git a/src/misc/check-word-mute.ts b/src/misc/check-word-mute.ts index 5af267d75d..f12e552ebd 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'; -import { User } from '../models/entities/user'; +import { Note } from '@/models/entities/note.js'; +import { User } from '@/models/entities/user.js'; type NoteLike = { userId: Note['userId']; diff --git a/src/misc/convert-host.ts b/src/misc/convert-host.ts index 7b0b0acf10..2e705cb6b1 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'; +import config from '@/config/index.js'; 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 bc1072080a..b7f8ce90c8 100644 --- a/src/misc/count-same-renotes.ts +++ b/src/misc/count-same-renotes.ts @@ -1,4 +1,4 @@ -import { Notes } from '../models'; +import { Notes } from '@/models/index.js'; export async function countSameRenotes(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise { // 指定したユーザーの指定したノートのリノートがいくつあるか数える diff --git a/src/misc/detect-url-mime.ts b/src/misc/detect-url-mime.ts index 274c291737..cd143cf2fb 100644 --- a/src/misc/detect-url-mime.ts +++ b/src/misc/detect-url-mime.ts @@ -1,6 +1,6 @@ -import { createTemp } from './create-temp'; -import { downloadUrl } from './download-url'; -import { detectType } from './get-file-info'; +import { createTemp } from './create-temp.js'; +import { downloadUrl } from './download-url.js'; +import { detectType } from './get-file-info.js'; 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 d6fd17fc13..745604c19c 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'; -import { createTemp } from './create-temp'; -import { downloadUrl } from './download-url'; +import Logger from '@/services/logger.js'; +import { createTemp } from './create-temp.js'; +import { downloadUrl } from './download-url.js'; const logger = new Logger('download-text-file'); diff --git a/src/misc/download-url.ts b/src/misc/download-url.ts index dafeff6fc8..f01f34e6db 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'; +import { getAgentByUrl } from './fetch.js'; import { AbortController } from 'abort-controller'; -import config from '@/config'; +import config from '@/config/index.js'; import * as chalk from 'chalk'; -import Logger from '../services/logger'; +import Logger from '@/services/logger.js'; 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 b29ce281b3..a0319d8dd5 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'; +import { unique } from '@/prelude/array.js'; 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 b0a74df219..0b0418eefd 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'; +import { unique } from '@/prelude/array.js'; 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 e7a945dc9e..3d7e69f2da 100644 --- a/src/misc/fetch-meta.ts +++ b/src/misc/fetch-meta.ts @@ -1,4 +1,4 @@ -import { Meta } from '../models/entities/meta'; +import { Meta } from '@/models/entities/meta.js'; import { getConnection } from 'typeorm'; let cache: Meta; diff --git a/src/misc/fetch-proxy-account.ts b/src/misc/fetch-proxy-account.ts index 537edf2891..ed8a4c794d 100644 --- a/src/misc/fetch-proxy-account.ts +++ b/src/misc/fetch-proxy-account.ts @@ -1,6 +1,6 @@ -import { fetchMeta } from './fetch-meta'; -import { ILocalUser } from '../models/entities/user'; -import { Users } from '../models'; +import { fetchMeta } from './fetch-meta.js'; +import { ILocalUser } from '@/models/entities/user.js'; +import { Users } from '@/models/index.js'; export async function fetchProxyAccount(): Promise { const meta = await fetchMeta(); diff --git a/src/misc/fetch.ts b/src/misc/fetch.ts index f7756f9256..11e8a69205 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'; +import config from '@/config/index.js'; import { URL } from 'url'; export async function getJson(url: string, accept = 'application/json, */*', timeout = 10000, headers?: HeadersInit) { diff --git a/src/misc/gen-avatar.ts b/src/misc/gen-avatar.ts index 7ff28b2e88..f03ca9f96d 100644 --- a/src/misc/gen-avatar.ts +++ b/src/misc/gen-avatar.ts @@ -2,7 +2,7 @@ * Random avatar generator */ -const p = require('pureimage'); +import * as p from 'pureimage'; import * as gen from 'random-seed'; import { WriteStream } from 'fs'; diff --git a/src/misc/gen-id.ts b/src/misc/gen-id.ts index 8e7e0b6113..fcf476857f 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'; -import { genMeid } from './id/meid'; -import { genMeidg } from './id/meidg'; -import { genObjectId } from './id/object-id'; -import config from '@/config'; +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'; const metohd = config.id.toLowerCase(); diff --git a/src/misc/get-user-name.ts b/src/misc/get-user-name.ts index b6b45118b0..805dbba529 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'; +import { User } from '@/models/entities/user.js'; 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 0a2a72f4a0..779f548b03 100644 --- a/src/misc/is-quote.ts +++ b/src/misc/is-quote.ts @@ -1,4 +1,4 @@ -import { Note } from '../models/entities/note'; +import { Note } from '@/models/entities/note.js'; 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 c78fdd7555..3d505c0abb 100644 --- a/src/misc/keypair-store.ts +++ b/src/misc/keypair-store.ts @@ -1,7 +1,7 @@ -import { UserKeypairs } from '../models'; -import { User } from '../models/entities/user'; -import { UserKeypair } from '../models/entities/user-keypair'; -import { Cache } from './cache'; +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'; const cache = new Cache(Infinity); diff --git a/src/misc/license.ts b/src/misc/license.ts index d36af665cd..8b12923ca1 100644 --- a/src/misc/license.ts +++ b/src/misc/license.ts @@ -1,6 +1,12 @@ import * as fs from 'fs'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; -const license = fs.readFileSync(__dirname + '/../../LICENSE', 'utf-8'); +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); + +const license = fs.readFileSync(_dirname + '/../../LICENSE', 'utf-8'); const licenseHtml = license .replace(/\r\n/g, '\n') diff --git a/src/misc/populate-emojis.ts b/src/misc/populate-emojis.ts index 42aaaf0705..e1ec87a95b 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'; -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'; -import { query } from '@/prelude/url'; +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'; const cache = new Cache(1000 * 60 * 60 * 12); diff --git a/src/misc/reaction-lib.ts b/src/misc/reaction-lib.ts index b393154d9c..beff1b32bc 100644 --- a/src/misc/reaction-lib.ts +++ b/src/misc/reaction-lib.ts @@ -1,7 +1,7 @@ -import { emojiRegex } from './emoji-regex'; -import { fetchMeta } from './fetch-meta'; -import { Emojis } from '../models'; -import { toPunyNullable } from './convert-host'; +import { emojiRegex } from './emoji-regex.js'; +import { fetchMeta } from './fetch-meta.js'; +import { Emojis } from '@/models/index.js'; +import { toPunyNullable } from './convert-host.js'; const legacies: Record = { 'like': '👍', diff --git a/src/misc/show-machine-info.ts b/src/misc/show-machine-info.ts index 2aae019be2..5ce466af26 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'; +import Logger from '@/services/logger.js'; export async function showMachineInfo(parentLogger: Logger) { const logger = parentLogger.createSubLogger('machine'); diff --git a/src/models/entities/abuse-user-report.ts b/src/models/entities/abuse-user-report.ts index c0cff139f6..cb13921222 100644 --- a/src/models/entities/abuse-user-report.ts +++ b/src/models/entities/abuse-user-report.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class AbuseUserReport { diff --git a/src/models/entities/access-token.ts b/src/models/entities/access-token.ts index 5f41b3c1fc..c2d034af87 100644 --- a/src/models/entities/access-token.ts +++ b/src/models/entities/access-token.ts @@ -1,7 +1,7 @@ import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm'; -import { User } from './user'; -import { App } from './app'; -import { id } from '../id'; +import { User } from './user.js'; +import { App } from './app.js'; +import { id } from '../id.js'; @Entity() export class AccessToken { diff --git a/src/models/entities/ad.ts b/src/models/entities/ad.ts index b2fc04c4f0..1b0cfa06d3 100644 --- a/src/models/entities/ad.ts +++ b/src/models/entities/ad.ts @@ -1,5 +1,5 @@ import { Entity, Index, Column, PrimaryColumn } from 'typeorm'; -import { id } from '../id'; +import { id } from '../id.js'; @Entity() export class Ad { diff --git a/src/models/entities/announcement-read.ts b/src/models/entities/announcement-read.ts index 892beb826f..56ee2e6905 100644 --- a/src/models/entities/announcement-read.ts +++ b/src/models/entities/announcement-read.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { Announcement } from './announcement'; -import { id } from '../id'; +import { User } from './user.js'; +import { Announcement } from './announcement.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'announcementId'], { unique: true }) diff --git a/src/models/entities/announcement.ts b/src/models/entities/announcement.ts index 06d379c229..1569ca89c7 100644 --- a/src/models/entities/announcement.ts +++ b/src/models/entities/announcement.ts @@ -1,5 +1,5 @@ import { Entity, Index, Column, PrimaryColumn } from 'typeorm'; -import { id } from '../id'; +import { id } from '../id.js'; @Entity() export class Announcement { diff --git a/src/models/entities/antenna-note.ts b/src/models/entities/antenna-note.ts index 9b911524ef..ecf2973919 100644 --- a/src/models/entities/antenna-note.ts +++ b/src/models/entities/antenna-note.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm'; -import { Note } from './note'; -import { Antenna } from './antenna'; -import { id } from '../id'; +import { Note } from './note.js'; +import { Antenna } from './antenna.js'; +import { id } from '../id.js'; @Entity() @Index(['noteId', 'antennaId'], { unique: true }) diff --git a/src/models/entities/antenna.ts b/src/models/entities/antenna.ts index bcfe09a829..5dc814e1d5 100644 --- a/src/models/entities/antenna.ts +++ b/src/models/entities/antenna.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { UserList } from './user-list'; -import { UserGroupJoining } from './user-group-joining'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { UserList } from './user-list.js'; +import { UserGroupJoining } from './user-group-joining.js'; @Entity() export class Antenna { diff --git a/src/models/entities/app.ts b/src/models/entities/app.ts index ea87546311..c3a6a0a107 100644 --- a/src/models/entities/app.ts +++ b/src/models/entities/app.ts @@ -1,6 +1,6 @@ import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class App { diff --git a/src/models/entities/attestation-challenge.ts b/src/models/entities/attestation-challenge.ts index 942747c02f..26a212e0c6 100644 --- a/src/models/entities/attestation-challenge.ts +++ b/src/models/entities/attestation-challenge.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class AttestationChallenge { diff --git a/src/models/entities/auth-session.ts b/src/models/entities/auth-session.ts index 4eec27e3f6..f0480abcc6 100644 --- a/src/models/entities/auth-session.ts +++ b/src/models/entities/auth-session.ts @@ -1,7 +1,7 @@ import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm'; -import { User } from './user'; -import { App } from './app'; -import { id } from '../id'; +import { User } from './user.js'; +import { App } from './app.js'; +import { id } from '../id.js'; @Entity() export class AuthSession { diff --git a/src/models/entities/blocking.ts b/src/models/entities/blocking.ts index 48487cb086..2fff80cfc1 100644 --- a/src/models/entities/blocking.ts +++ b/src/models/entities/blocking.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() @Index(['blockerId', 'blockeeId'], { unique: true }) diff --git a/src/models/entities/channel-following.ts b/src/models/entities/channel-following.ts index fca801e5ab..6e5c9cba04 100644 --- a/src/models/entities/channel-following.ts +++ b/src/models/entities/channel-following.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { Channel } from './channel'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { Channel } from './channel.js'; @Entity() @Index(['followerId', 'followeeId'], { unique: true }) diff --git a/src/models/entities/channel-note-pining.ts b/src/models/entities/channel-note-pining.ts index 26a7eb501f..751af4a183 100644 --- a/src/models/entities/channel-note-pining.ts +++ b/src/models/entities/channel-note-pining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note'; -import { Channel } from './channel'; -import { id } from '../id'; +import { Note } from './note.js'; +import { Channel } from './channel.js'; +import { id } from '../id.js'; @Entity() @Index(['channelId', 'noteId'], { unique: true }) diff --git a/src/models/entities/channel.ts b/src/models/entities/channel.ts index f2d713612d..adf937c0b4 100644 --- a/src/models/entities/channel.ts +++ b/src/models/entities/channel.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { DriveFile } from './drive-file'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { DriveFile } from './drive-file.js'; @Entity() export class Channel { diff --git a/src/models/entities/clip-note.ts b/src/models/entities/clip-note.ts index 7d96b2ef7a..41d92b0c74 100644 --- a/src/models/entities/clip-note.ts +++ b/src/models/entities/clip-note.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm'; -import { Note } from './note'; -import { Clip } from './clip'; -import { id } from '../id'; +import { Note } from './note.js'; +import { Clip } from './clip.js'; +import { id } from '../id.js'; @Entity() @Index(['noteId', 'clipId'], { unique: true }) diff --git a/src/models/entities/clip.ts b/src/models/entities/clip.ts index 66b5b8847e..1cdf4c52eb 100644 --- a/src/models/entities/clip.ts +++ b/src/models/entities/clip.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class Clip { diff --git a/src/models/entities/drive-file.ts b/src/models/entities/drive-file.ts index 698dfac222..41d68a1334 100644 --- a/src/models/entities/drive-file.ts +++ b/src/models/entities/drive-file.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { DriveFolder } from './drive-folder'; -import { id } from '../id'; +import { User } from './user.js'; +import { DriveFolder } from './drive-folder.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'folderId', 'id']) diff --git a/src/models/entities/drive-folder.ts b/src/models/entities/drive-folder.ts index a80d075855..f137dd5c6a 100644 --- a/src/models/entities/drive-folder.ts +++ b/src/models/entities/drive-folder.ts @@ -1,6 +1,6 @@ import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class DriveFolder { diff --git a/src/models/entities/emoji.ts b/src/models/entities/emoji.ts index d6080ae099..3da4c6b416 100644 --- a/src/models/entities/emoji.ts +++ b/src/models/entities/emoji.ts @@ -1,5 +1,5 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; -import { id } from '../id'; +import { id } from '../id.js'; @Entity() @Index(['name', 'host'], { unique: true }) diff --git a/src/models/entities/follow-request.ts b/src/models/entities/follow-request.ts index 22ec263962..e661c9933a 100644 --- a/src/models/entities/follow-request.ts +++ b/src/models/entities/follow-request.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() @Index(['followerId', 'followeeId'], { unique: true }) diff --git a/src/models/entities/following.ts b/src/models/entities/following.ts index ee3286a1a1..5f9b548dab 100644 --- a/src/models/entities/following.ts +++ b/src/models/entities/following.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() @Index(['followerId', 'followeeId'], { unique: true }) diff --git a/src/models/entities/gallery-like.ts b/src/models/entities/gallery-like.ts index 7d084a2275..f1610b8aae 100644 --- a/src/models/entities/gallery-like.ts +++ b/src/models/entities/gallery-like.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { GalleryPost } from './gallery-post'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { GalleryPost } from './gallery-post.js'; @Entity() @Index(['userId', 'postId'], { unique: true }) diff --git a/src/models/entities/gallery-post.ts b/src/models/entities/gallery-post.ts index f59cd671f3..cc4ed640a4 100644 --- a/src/models/entities/gallery-post.ts +++ b/src/models/entities/gallery-post.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { DriveFile } from './drive-file'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { DriveFile } from './drive-file.js'; @Entity() export class GalleryPost { diff --git a/src/models/entities/games/reversi/game.ts b/src/models/entities/games/reversi/game.ts index 9deacaf5c6..b63c72e9fb 100644 --- a/src/models/entities/games/reversi/game.ts +++ b/src/models/entities/games/reversi/game.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from '../../user'; -import { id } from '../../../id'; +import { User } from '../../user.js'; +import { id } from '../../../id.js'; @Entity() export class ReversiGame { diff --git a/src/models/entities/games/reversi/matching.ts b/src/models/entities/games/reversi/matching.ts index 477a29316e..690a080b2b 100644 --- a/src/models/entities/games/reversi/matching.ts +++ b/src/models/entities/games/reversi/matching.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from '../../user'; -import { id } from '../../../id'; +import { User } from '../../user.js'; +import { id } from '../../../id.js'; @Entity() export class ReversiMatching { diff --git a/src/models/entities/hashtag.ts b/src/models/entities/hashtag.ts index 842cdaa562..b99ac80b58 100644 --- a/src/models/entities/hashtag.ts +++ b/src/models/entities/hashtag.ts @@ -1,6 +1,6 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class Hashtag { diff --git a/src/models/entities/instance.ts b/src/models/entities/instance.ts index 7c8719e06a..f4637096fa 100644 --- a/src/models/entities/instance.ts +++ b/src/models/entities/instance.ts @@ -1,5 +1,5 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { id } from '../id'; +import { id } from '../id.js'; @Entity() export class Instance { diff --git a/src/models/entities/log.ts b/src/models/entities/log.ts index 182a9fbed8..17c5cba7d6 100644 --- a/src/models/entities/log.ts +++ b/src/models/entities/log.ts @@ -1,5 +1,5 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { id } from '../id'; +import { id } from '../id.js'; @Entity() export class Log { diff --git a/src/models/entities/messaging-message.ts b/src/models/entities/messaging-message.ts index ac0764674c..04a1637f44 100644 --- a/src/models/entities/messaging-message.ts +++ b/src/models/entities/messaging-message.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { DriveFile } from './drive-file'; -import { id } from '../id'; -import { UserGroup } from './user-group'; +import { User } from './user.js'; +import { DriveFile } from './drive-file.js'; +import { id } from '../id.js'; +import { UserGroup } from './user-group.js'; @Entity() export class MessagingMessage { diff --git a/src/models/entities/meta.ts b/src/models/entities/meta.ts index 2a0632c87c..a03891622d 100644 --- a/src/models/entities/meta.ts +++ b/src/models/entities/meta.ts @@ -1,7 +1,7 @@ import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { Clip } from './clip'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { Clip } from './clip.js'; @Entity() export class Meta { diff --git a/src/models/entities/moderation-log.ts b/src/models/entities/moderation-log.ts index 33d3d683ae..d96b63f523 100644 --- a/src/models/entities/moderation-log.ts +++ b/src/models/entities/moderation-log.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class ModerationLog { diff --git a/src/models/entities/muted-note.ts b/src/models/entities/muted-note.ts index 521876688c..07763b2dbf 100644 --- a/src/models/entities/muted-note.ts +++ b/src/models/entities/muted-note.ts @@ -1,8 +1,8 @@ import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm'; -import { Note } from './note'; -import { User } from './user'; -import { id } from '../id'; -import { mutedNoteReasons } from '../../types'; +import { Note } from './note.js'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { mutedNoteReasons } from '../../types.js'; @Entity() @Index(['noteId', 'userId'], { unique: true }) diff --git a/src/models/entities/muting.ts b/src/models/entities/muting.ts index 0084213bcc..9c9134949f 100644 --- a/src/models/entities/muting.ts +++ b/src/models/entities/muting.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() @Index(['muterId', 'muteeId'], { unique: true }) diff --git a/src/models/entities/note-favorite.ts b/src/models/entities/note-favorite.ts index 0713c3ae56..54792d225b 100644 --- a/src/models/entities/note-favorite.ts +++ b/src/models/entities/note-favorite.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note'; -import { User } from './user'; -import { id } from '../id'; +import { Note } from './note.js'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note-reaction.ts b/src/models/entities/note-reaction.ts index 674dc3639e..5bca5c3d36 100644 --- a/src/models/entities/note-reaction.ts +++ b/src/models/entities/note-reaction.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { Note } from './note'; -import { id } from '../id'; +import { User } from './user.js'; +import { Note } from './note.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note-unread.ts b/src/models/entities/note-unread.ts index 57dda4fafd..5a88c7f7d5 100644 --- a/src/models/entities/note-unread.ts +++ b/src/models/entities/note-unread.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { Note } from './note'; -import { id } from '../id'; -import { Channel } from './channel'; +import { User } from './user.js'; +import { Note } from './note.js'; +import { id } from '../id.js'; +import { Channel } from './channel.js'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note-watching.ts b/src/models/entities/note-watching.ts index 741a1c0c8b..458fac3a40 100644 --- a/src/models/entities/note-watching.ts +++ b/src/models/entities/note-watching.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { Note } from './note'; -import { id } from '../id'; +import { User } from './user.js'; +import { Note } from './note.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note.ts b/src/models/entities/note.ts index 9a85532637..74d69de13c 100644 --- a/src/models/entities/note.ts +++ b/src/models/entities/note.ts @@ -1,9 +1,9 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { DriveFile } from './drive-file'; -import { id } from '../id'; -import { noteVisibilities } from '../../types'; -import { Channel } from './channel'; +import { User } from './user.js'; +import { DriveFile } from './drive-file.js'; +import { id } from '../id.js'; +import { noteVisibilities } from '../../types.js'; +import { Channel } from './channel.js'; @Entity() @Index('IDX_NOTE_TAGS', { synchronize: false }) diff --git a/src/models/entities/notification.ts b/src/models/entities/notification.ts index 988fdb341f..1114910a80 100644 --- a/src/models/entities/notification.ts +++ b/src/models/entities/notification.ts @@ -1,11 +1,11 @@ import { Entity, Index, JoinColumn, ManyToOne, Column, PrimaryColumn } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { Note } from './note'; -import { FollowRequest } from './follow-request'; -import { UserGroupInvitation } from './user-group-invitation'; -import { AccessToken } from './access-token'; -import { notificationTypes } from '../../types'; +import { User } from './user.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 { notificationTypes } from '../../types.js'; @Entity() export class Notification { diff --git a/src/models/entities/page-like.ts b/src/models/entities/page-like.ts index ca84ece8fd..49f3f0ef52 100644 --- a/src/models/entities/page-like.ts +++ b/src/models/entities/page-like.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { Page } from './page'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { Page } from './page.js'; @Entity() @Index(['userId', 'pageId'], { unique: true }) diff --git a/src/models/entities/page.ts b/src/models/entities/page.ts index ed0411a3d0..7bc35aa69a 100644 --- a/src/models/entities/page.ts +++ b/src/models/entities/page.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; -import { DriveFile } from './drive-file'; +import { User } from './user.js'; +import { id } from '../id.js'; +import { DriveFile } from './drive-file.js'; @Entity() @Index(['userId', 'name'], { unique: true }) diff --git a/src/models/entities/password-reset-request.ts b/src/models/entities/password-reset-request.ts index 6d41d38a93..95ba14db18 100644 --- a/src/models/entities/password-reset-request.ts +++ b/src/models/entities/password-reset-request.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typeorm'; -import { id } from '../id'; -import { User } from './user'; +import { id } from '../id.js'; +import { User } from './user.js'; @Entity() export class PasswordResetRequest { diff --git a/src/models/entities/poll-vote.ts b/src/models/entities/poll-vote.ts index 709376f909..f8b5ad7d81 100644 --- a/src/models/entities/poll-vote.ts +++ b/src/models/entities/poll-vote.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { Note } from './note'; -import { id } from '../id'; +import { User } from './user.js'; +import { Note } from './note.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'noteId', 'choice'], { unique: true }) diff --git a/src/models/entities/poll.ts b/src/models/entities/poll.ts index e3bbb1c3f2..a201b1198b 100644 --- a/src/models/entities/poll.ts +++ b/src/models/entities/poll.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm'; -import { id } from '../id'; -import { Note } from './note'; -import { User } from './user'; -import { noteVisibilities } from '../../types'; +import { id } from '../id.js'; +import { Note } from './note.js'; +import { User } from './user.js'; +import { noteVisibilities } from '../../types.js'; @Entity() export class Poll { diff --git a/src/models/entities/promo-note.ts b/src/models/entities/promo-note.ts index 474f1cb235..d21b2adac3 100644 --- a/src/models/entities/promo-note.ts +++ b/src/models/entities/promo-note.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm'; -import { Note } from './note'; -import { User } from './user'; -import { id } from '../id'; +import { Note } from './note.js'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class PromoNote { diff --git a/src/models/entities/promo-read.ts b/src/models/entities/promo-read.ts index 2e0977b6b5..d949061b99 100644 --- a/src/models/entities/promo-read.ts +++ b/src/models/entities/promo-read.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note'; -import { User } from './user'; -import { id } from '../id'; +import { Note } from './note.js'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/registration-tickets.ts b/src/models/entities/registration-tickets.ts index d962f78a78..139e40f85e 100644 --- a/src/models/entities/registration-tickets.ts +++ b/src/models/entities/registration-tickets.ts @@ -1,5 +1,5 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; -import { id } from '../id'; +import { id } from '../id.js'; @Entity() export class RegistrationTicket { diff --git a/src/models/entities/registry-item.ts b/src/models/entities/registry-item.ts index 54d2ef2082..f1904e6120 100644 --- a/src/models/entities/registry-item.ts +++ b/src/models/entities/registry-item.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; // TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい @Entity() diff --git a/src/models/entities/relay.ts b/src/models/entities/relay.ts index 4c82ccb125..94d1929574 100644 --- a/src/models/entities/relay.ts +++ b/src/models/entities/relay.ts @@ -1,5 +1,5 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; -import { id } from '../id'; +import { id } from '../id.js'; @Entity() export class Relay { diff --git a/src/models/entities/signin.ts b/src/models/entities/signin.ts index 7e047084b1..1db5c48ca1 100644 --- a/src/models/entities/signin.ts +++ b/src/models/entities/signin.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class Signin { diff --git a/src/models/entities/sw-subscription.ts b/src/models/entities/sw-subscription.ts index 7c3f6f0a6c..254dd70b4f 100644 --- a/src/models/entities/sw-subscription.ts +++ b/src/models/entities/sw-subscription.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class SwSubscription { diff --git a/src/models/entities/user-group-invitation.ts b/src/models/entities/user-group-invitation.ts index 6fe8f20134..9e71c78e1d 100644 --- a/src/models/entities/user-group-invitation.ts +++ b/src/models/entities/user-group-invitation.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { UserGroup } from './user-group'; -import { id } from '../id'; +import { User } from './user.js'; +import { UserGroup } from './user-group.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'userGroupId'], { unique: true }) diff --git a/src/models/entities/user-group-joining.ts b/src/models/entities/user-group-joining.ts index e09c3230f1..fbed44c79f 100644 --- a/src/models/entities/user-group-joining.ts +++ b/src/models/entities/user-group-joining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { UserGroup } from './user-group'; -import { id } from '../id'; +import { User } from './user.js'; +import { UserGroup } from './user-group.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'userGroupId'], { unique: true }) diff --git a/src/models/entities/user-group.ts b/src/models/entities/user-group.ts index f4bac03223..ae4cd5485f 100644 --- a/src/models/entities/user-group.ts +++ b/src/models/entities/user-group.ts @@ -1,6 +1,6 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class UserGroup { diff --git a/src/models/entities/user-keypair.ts b/src/models/entities/user-keypair.ts index 603321d758..026f823f7b 100644 --- a/src/models/entities/user-keypair.ts +++ b/src/models/entities/user-keypair.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class UserKeypair { diff --git a/src/models/entities/user-list-joining.ts b/src/models/entities/user-list-joining.ts index bb7dc40b95..91cff3cd54 100644 --- a/src/models/entities/user-list-joining.ts +++ b/src/models/entities/user-list-joining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { UserList } from './user-list'; -import { id } from '../id'; +import { User } from './user.js'; +import { UserList } from './user-list.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'userListId'], { unique: true }) diff --git a/src/models/entities/user-list.ts b/src/models/entities/user-list.ts index 35a83ef8c3..51031e3c1f 100644 --- a/src/models/entities/user-list.ts +++ b/src/models/entities/user-list.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class UserList { diff --git a/src/models/entities/user-note-pining.ts b/src/models/entities/user-note-pining.ts index 04a6f8f645..0495c4b2f5 100644 --- a/src/models/entities/user-note-pining.ts +++ b/src/models/entities/user-note-pining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note'; -import { User } from './user'; -import { id } from '../id'; +import { Note } from './note.js'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/user-profile.ts b/src/models/entities/user-profile.ts index 3a9043fac6..fd05522797 100644 --- a/src/models/entities/user-profile.ts +++ b/src/models/entities/user-profile.ts @@ -1,8 +1,8 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm'; -import { id } from '../id'; -import { User } from './user'; -import { Page } from './page'; -import { notificationTypes } from '../../types'; +import { id } from '../id.js'; +import { User } from './user.js'; +import { Page } from './page.js'; +import { notificationTypes } from '../../types.js'; // TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも // ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン diff --git a/src/models/entities/user-publickey.ts b/src/models/entities/user-publickey.ts index 21edc3e9e2..adfff74f8a 100644 --- a/src/models/entities/user-publickey.ts +++ b/src/models/entities/user-publickey.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class UserPublickey { diff --git a/src/models/entities/user-security-key.ts b/src/models/entities/user-security-key.ts index d54c728e53..ec8ac81c47 100644 --- a/src/models/entities/user-security-key.ts +++ b/src/models/entities/user-security-key.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm'; -import { User } from './user'; -import { id } from '../id'; +import { User } from './user.js'; +import { id } from '../id.js'; @Entity() export class UserSecurityKey { diff --git a/src/models/entities/user.ts b/src/models/entities/user.ts index 060ec06b9a..36c5068205 100644 --- a/src/models/entities/user.ts +++ b/src/models/entities/user.ts @@ -1,6 +1,6 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm'; -import { DriveFile } from './drive-file'; -import { id } from '../id'; +import { DriveFile } from './drive-file.js'; +import { id } from '../id.js'; @Entity() @Index(['usernameLower', 'host'], { unique: true }) diff --git a/src/models/index.ts b/src/models/index.ts index 9f8bd104e9..51ee88bb7f 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,67 +1,67 @@ import { getRepository, getCustomRepository } from 'typeorm'; -import { Announcement } from './entities/announcement'; -import { AnnouncementRead } from './entities/announcement-read'; -import { Instance } from './entities/instance'; -import { Poll } from './entities/poll'; -import { PollVote } from './entities/poll-vote'; -import { Meta } from './entities/meta'; -import { SwSubscription } from './entities/sw-subscription'; -import { NoteWatching } from './entities/note-watching'; -import { NoteUnread } from './entities/note-unread'; -import { RegistrationTicket } from './entities/registration-tickets'; -import { UserRepository } from './repositories/user'; -import { NoteRepository } from './repositories/note'; -import { DriveFileRepository } from './repositories/drive-file'; -import { DriveFolderRepository } from './repositories/drive-folder'; -import { Log } from './entities/log'; -import { AccessToken } from './entities/access-token'; -import { UserNotePining } from './entities/user-note-pining'; -import { SigninRepository } from './repositories/signin'; -import { MessagingMessageRepository } from './repositories/messaging-message'; -import { ReversiGameRepository } from './repositories/games/reversi/game'; -import { UserListRepository } from './repositories/user-list'; -import { UserListJoining } from './entities/user-list-joining'; -import { UserGroupRepository } from './repositories/user-group'; -import { UserGroupJoining } from './entities/user-group-joining'; -import { UserGroupInvitationRepository } from './repositories/user-group-invitation'; -import { FollowRequestRepository } from './repositories/follow-request'; -import { MutingRepository } from './repositories/muting'; -import { BlockingRepository } from './repositories/blocking'; -import { NoteReactionRepository } from './repositories/note-reaction'; -import { NotificationRepository } from './repositories/notification'; -import { NoteFavoriteRepository } from './repositories/note-favorite'; -import { ReversiMatchingRepository } from './repositories/games/reversi/matching'; -import { UserPublickey } from './entities/user-publickey'; -import { UserKeypair } from './entities/user-keypair'; -import { AppRepository } from './repositories/app'; -import { FollowingRepository } from './repositories/following'; -import { AbuseUserReportRepository } from './repositories/abuse-user-report'; -import { AuthSessionRepository } from './repositories/auth-session'; -import { UserProfile } from './entities/user-profile'; -import { AttestationChallenge } from './entities/attestation-challenge'; -import { UserSecurityKey } from './entities/user-security-key'; -import { HashtagRepository } from './repositories/hashtag'; -import { PageRepository } from './repositories/page'; -import { PageLikeRepository } from './repositories/page-like'; -import { GalleryPostRepository } from './repositories/gallery-post'; -import { GalleryLikeRepository } from './repositories/gallery-like'; -import { ModerationLogRepository } from './repositories/moderation-logs'; -import { UsedUsername } from './entities/used-username'; -import { ClipRepository } from './repositories/clip'; -import { ClipNote } from './entities/clip-note'; -import { AntennaRepository } from './repositories/antenna'; -import { AntennaNote } from './entities/antenna-note'; -import { PromoNote } from './entities/promo-note'; -import { PromoRead } from './entities/promo-read'; -import { EmojiRepository } from './repositories/emoji'; -import { RelayRepository } from './repositories/relay'; -import { ChannelRepository } from './repositories/channel'; -import { MutedNote } from './entities/muted-note'; -import { ChannelFollowing } from './entities/channel-following'; -import { ChannelNotePining } from './entities/channel-note-pining'; -import { RegistryItem } from './entities/registry-item'; -import { Ad } from './entities/ad'; -import { PasswordResetRequest } from './entities/password-reset-request'; +import { Announcement } from './entities/announcement.js'; +import { AnnouncementRead } from './entities/announcement-read.js'; +import { Instance } from './entities/instance.js'; +import { Poll } from './entities/poll.js'; +import { PollVote } from './entities/poll-vote.js'; +import { Meta } from './entities/meta.js'; +import { SwSubscription } from './entities/sw-subscription.js'; +import { NoteWatching } from './entities/note-watching.js'; +import { NoteUnread } from './entities/note-unread.js'; +import { RegistrationTicket } from './entities/registration-tickets.js'; +import { UserRepository } from './repositories/user.js'; +import { NoteRepository } from './repositories/note.js'; +import { DriveFileRepository } from './repositories/drive-file.js'; +import { DriveFolderRepository } from './repositories/drive-folder.js'; +import { Log } from './entities/log.js'; +import { AccessToken } from './entities/access-token.js'; +import { UserNotePining } from './entities/user-note-pining.js'; +import { SigninRepository } from './repositories/signin.js'; +import { MessagingMessageRepository } from './repositories/messaging-message.js'; +import { ReversiGameRepository } from './repositories/games/reversi/game.js'; +import { UserListRepository } from './repositories/user-list.js'; +import { UserListJoining } from './entities/user-list-joining.js'; +import { UserGroupRepository } from './repositories/user-group.js'; +import { UserGroupJoining } from './entities/user-group-joining.js'; +import { UserGroupInvitationRepository } from './repositories/user-group-invitation.js'; +import { FollowRequestRepository } from './repositories/follow-request.js'; +import { MutingRepository } from './repositories/muting.js'; +import { BlockingRepository } from './repositories/blocking.js'; +import { NoteReactionRepository } from './repositories/note-reaction.js'; +import { NotificationRepository } from './repositories/notification.js'; +import { NoteFavoriteRepository } from './repositories/note-favorite.js'; +import { ReversiMatchingRepository } from './repositories/games/reversi/matching.js'; +import { UserPublickey } from './entities/user-publickey.js'; +import { UserKeypair } from './entities/user-keypair.js'; +import { AppRepository } from './repositories/app.js'; +import { FollowingRepository } from './repositories/following.js'; +import { AbuseUserReportRepository } from './repositories/abuse-user-report.js'; +import { AuthSessionRepository } from './repositories/auth-session.js'; +import { UserProfile } from './entities/user-profile.js'; +import { AttestationChallenge } from './entities/attestation-challenge.js'; +import { UserSecurityKey } from './entities/user-security-key.js'; +import { HashtagRepository } from './repositories/hashtag.js'; +import { PageRepository } from './repositories/page.js'; +import { PageLikeRepository } from './repositories/page-like.js'; +import { GalleryPostRepository } from './repositories/gallery-post.js'; +import { GalleryLikeRepository } from './repositories/gallery-like.js'; +import { ModerationLogRepository } from './repositories/moderation-logs.js'; +import { UsedUsername } from './entities/used-username.js'; +import { ClipRepository } from './repositories/clip.js'; +import { ClipNote } from './entities/clip-note.js'; +import { AntennaRepository } from './repositories/antenna.js'; +import { AntennaNote } from './entities/antenna-note.js'; +import { PromoNote } from './entities/promo-note.js'; +import { PromoRead } from './entities/promo-read.js'; +import { EmojiRepository } from './repositories/emoji.js'; +import { RelayRepository } from './repositories/relay.js'; +import { ChannelRepository } from './repositories/channel.js'; +import { MutedNote } from './entities/muted-note.js'; +import { ChannelFollowing } from './entities/channel-following.js'; +import { ChannelNotePining } from './entities/channel-note-pining.js'; +import { RegistryItem } from './entities/registry-item.js'; +import { Ad } from './entities/ad.js'; +import { PasswordResetRequest } from './entities/password-reset-request.js'; export const Announcements = getRepository(Announcement); export const AnnouncementReads = getRepository(AnnouncementRead); diff --git a/src/models/repositories/abuse-user-report.ts b/src/models/repositories/abuse-user-report.ts index cb33d2506e..16a121576f 100644 --- a/src/models/repositories/abuse-user-report.ts +++ b/src/models/repositories/abuse-user-report.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '..'; -import { AbuseUserReport } from '../entities/abuse-user-report'; -import { awaitAll } from '../../prelude/await-all'; +import { Users } from '../index.js'; +import { AbuseUserReport } from '../entities/abuse-user-report.js'; +import { awaitAll } from '../../prelude/await-all.js'; @EntityRepository(AbuseUserReport) export class AbuseUserReportRepository extends Repository { diff --git a/src/models/repositories/antenna.ts b/src/models/repositories/antenna.ts index 787e5c8e2b..5117bcb033 100644 --- a/src/models/repositories/antenna.ts +++ b/src/models/repositories/antenna.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Antenna } from '../entities/antenna'; -import { SchemaType } from '@/misc/schema'; -import { AntennaNotes, UserGroupJoinings } from '..'; +import { Antenna } from '../entities/antenna.js'; +import { SchemaType } from '@/misc/schema.js'; +import { AntennaNotes, UserGroupJoinings } from '../index.js'; export type PackedAntenna = SchemaType; diff --git a/src/models/repositories/app.ts b/src/models/repositories/app.ts index c919a9bdb1..3c96909ddd 100644 --- a/src/models/repositories/app.ts +++ b/src/models/repositories/app.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { App } from '../entities/app'; -import { AccessTokens } from '..'; -import { SchemaType } from '@/misc/schema'; +import { App } from '../entities/app.js'; +import { AccessTokens } from '../index.js'; +import { SchemaType } from '@/misc/schema.js'; export type PackedApp = SchemaType; diff --git a/src/models/repositories/auth-session.ts b/src/models/repositories/auth-session.ts index f513357e1b..0eac1348c7 100644 --- a/src/models/repositories/auth-session.ts +++ b/src/models/repositories/auth-session.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Apps } from '..'; -import { AuthSession } from '../entities/auth-session'; -import { awaitAll } from '../../prelude/await-all'; -import { User } from '../entities/user'; +import { Apps } from '../index.js'; +import { AuthSession } from '../entities/auth-session.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { User } from '../entities/user.js'; @EntityRepository(AuthSession) export class AuthSessionRepository extends Repository { diff --git a/src/models/repositories/blocking.ts b/src/models/repositories/blocking.ts index 9a4f3f6c68..41b9ed5ab9 100644 --- a/src/models/repositories/blocking.ts +++ b/src/models/repositories/blocking.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '..'; -import { Blocking } from '../entities/blocking'; -import { awaitAll } from '../../prelude/await-all'; -import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { Users } from '../index.js'; +import { Blocking } from '../entities/blocking.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { SchemaType } from '@/misc/schema.js'; +import { User } from '../entities/user.js'; export type PackedBlocking = SchemaType; diff --git a/src/models/repositories/channel.ts b/src/models/repositories/channel.ts index 007b110015..c889fc164b 100644 --- a/src/models/repositories/channel.ts +++ b/src/models/repositories/channel.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Channel } from '../entities/channel'; -import { SchemaType } from '@/misc/schema'; -import { DriveFiles, ChannelFollowings, NoteUnreads } from '..'; -import { User } from '../entities/user'; +import { Channel } from '../entities/channel.js'; +import { SchemaType } from '@/misc/schema.js'; +import { DriveFiles, ChannelFollowings, NoteUnreads } from '../index.js'; +import { User } from '../entities/user.js'; export type PackedChannel = SchemaType; diff --git a/src/models/repositories/clip.ts b/src/models/repositories/clip.ts index 293807b125..3fae8a7aee 100644 --- a/src/models/repositories/clip.ts +++ b/src/models/repositories/clip.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Clip } from '../entities/clip'; -import { SchemaType } from '@/misc/schema'; -import { Users } from '..'; -import { awaitAll } from '../../prelude/await-all'; +import { Clip } from '../entities/clip.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Users } from '../index.js'; +import { awaitAll } from '../../prelude/await-all.js'; export type PackedClip = SchemaType; diff --git a/src/models/repositories/drive-file.ts b/src/models/repositories/drive-file.ts index 675faca8e3..3edd9dd66a 100644 --- a/src/models/repositories/drive-file.ts +++ b/src/models/repositories/drive-file.ts @@ -1,14 +1,14 @@ import { EntityRepository, Repository } from 'typeorm'; -import { DriveFile } from '../entities/drive-file'; -import { Users, DriveFolders } from '..'; -import { User } from '../entities/user'; -import { toPuny } from '@/misc/convert-host'; -import { awaitAll } from '../../prelude/await-all'; -import { SchemaType } from '@/misc/schema'; -import config from '@/config'; -import { query, appendQuery } from '../../prelude/url'; -import { Meta } from '../entities/meta'; -import { fetchMeta } from '@/misc/fetch-meta'; +import { DriveFile } from '../entities/drive-file.js'; +import { Users, DriveFolders } from '../index.js'; +import { User } from '../entities/user.js'; +import { toPuny } from '@/misc/convert-host.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { SchemaType } from '@/misc/schema.js'; +import config from '@/config/index.js'; +import { query, appendQuery } from '../../prelude/url.js'; +import { Meta } from '../entities/meta.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; export type PackedDriveFile = SchemaType; diff --git a/src/models/repositories/drive-folder.ts b/src/models/repositories/drive-folder.ts index d1922c96f8..e78c50149c 100644 --- a/src/models/repositories/drive-folder.ts +++ b/src/models/repositories/drive-folder.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { DriveFolders, DriveFiles } from '..'; -import { DriveFolder } from '../entities/drive-folder'; -import { awaitAll } from '../../prelude/await-all'; -import { SchemaType } from '@/misc/schema'; +import { DriveFolders, DriveFiles } from '../index.js'; +import { DriveFolder } from '../entities/drive-folder.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { SchemaType } from '@/misc/schema.js'; export type PackedDriveFolder = SchemaType; diff --git a/src/models/repositories/emoji.ts b/src/models/repositories/emoji.ts index 3490a6ac86..ecef68325a 100644 --- a/src/models/repositories/emoji.ts +++ b/src/models/repositories/emoji.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Emoji } from '../entities/emoji'; +import { Emoji } from '../entities/emoji.js'; @EntityRepository(Emoji) export class EmojiRepository extends Repository { diff --git a/src/models/repositories/federation-instance.ts b/src/models/repositories/federation-instance.ts index 15e8023ee9..ad14cfc962 100644 --- a/src/models/repositories/federation-instance.ts +++ b/src/models/repositories/federation-instance.ts @@ -1,4 +1,4 @@ -import config from '@/config'; +import config from '@/config/index.js'; export const packedFederationInstanceSchema = { type: 'object' as const, diff --git a/src/models/repositories/follow-request.ts b/src/models/repositories/follow-request.ts index 31e5fb2d90..6fe86972e5 100644 --- a/src/models/repositories/follow-request.ts +++ b/src/models/repositories/follow-request.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { FollowRequest } from '../entities/follow-request'; -import { Users } from '..'; -import { User } from '../entities/user'; +import { FollowRequest } from '../entities/follow-request.js'; +import { Users } from '../index.js'; +import { User } from '../entities/user.js'; @EntityRepository(FollowRequest) export class FollowRequestRepository extends Repository { diff --git a/src/models/repositories/following.ts b/src/models/repositories/following.ts index 3aed83f320..0cc3626c26 100644 --- a/src/models/repositories/following.ts +++ b/src/models/repositories/following.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '..'; -import { Following } from '../entities/following'; -import { awaitAll } from '../../prelude/await-all'; -import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { Users } from '../index.js'; +import { Following } from '../entities/following.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { SchemaType } from '@/misc/schema.js'; +import { User } from '../entities/user.js'; type LocalFollowerFollowing = Following & { followerHost: null; diff --git a/src/models/repositories/gallery-like.ts b/src/models/repositories/gallery-like.ts index e01c17cff5..550405d659 100644 --- a/src/models/repositories/gallery-like.ts +++ b/src/models/repositories/gallery-like.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm'; -import { GalleryLike } from '../entities/gallery-like'; -import { GalleryPosts } from '..'; +import { GalleryLike } from '../entities/gallery-like.js'; +import { GalleryPosts } from '../index.js'; @EntityRepository(GalleryLike) export class GalleryLikeRepository extends Repository { diff --git a/src/models/repositories/gallery-post.ts b/src/models/repositories/gallery-post.ts index f1d6fe6326..b2c989481a 100644 --- a/src/models/repositories/gallery-post.ts +++ b/src/models/repositories/gallery-post.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { GalleryPost } from '../entities/gallery-post'; -import { SchemaType } from '../../misc/schema'; -import { Users, DriveFiles, GalleryLikes } from '..'; -import { awaitAll } from '../../prelude/await-all'; -import { User } from '../entities/user'; +import { GalleryPost } from '../entities/gallery-post.js'; +import { SchemaType } from '../../misc/schema.js'; +import { Users, DriveFiles, GalleryLikes } from '../index.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { User } from '../entities/user.js'; export type PackedGalleryPost = SchemaType; diff --git a/src/models/repositories/games/reversi/game.ts b/src/models/repositories/games/reversi/game.ts index 344cf7b20e..0a1d67f960 100644 --- a/src/models/repositories/games/reversi/game.ts +++ b/src/models/repositories/games/reversi/game.ts @@ -1,7 +1,7 @@ -import { User } from '@/models/entities/user'; +import { User } from '@/models/entities/user.js'; import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '../../..'; -import { ReversiGame } from '../../../entities/games/reversi/game'; +import { Users } from '../../../index.js'; +import { ReversiGame } from '../../../entities/games/reversi/game.js'; @EntityRepository(ReversiGame) export class ReversiGameRepository extends Repository { diff --git a/src/models/repositories/games/reversi/matching.ts b/src/models/repositories/games/reversi/matching.ts index 013021eb90..942194410b 100644 --- a/src/models/repositories/games/reversi/matching.ts +++ b/src/models/repositories/games/reversi/matching.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { ReversiMatching } from '../../../entities/games/reversi/matching'; -import { Users } from '../../..'; -import { awaitAll } from '../../../../prelude/await-all'; -import { User } from '@/models/entities/user'; +import { ReversiMatching } from '../../../entities/games/reversi/matching.js'; +import { Users } from '../../../index.js'; +import { awaitAll } from '../../../../prelude/await-all.js'; +import { User } from '@/models/entities/user.js'; @EntityRepository(ReversiMatching) export class ReversiMatchingRepository extends Repository { diff --git a/src/models/repositories/hashtag.ts b/src/models/repositories/hashtag.ts index 3fee2f771d..f16e2dcd86 100644 --- a/src/models/repositories/hashtag.ts +++ b/src/models/repositories/hashtag.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Hashtag } from '../entities/hashtag'; -import { SchemaType } from '@/misc/schema'; +import { Hashtag } from '../entities/hashtag.js'; +import { SchemaType } from '@/misc/schema.js'; export type PackedHashtag = SchemaType; diff --git a/src/models/repositories/messaging-message.ts b/src/models/repositories/messaging-message.ts index c77b14ca7f..1413105c55 100644 --- a/src/models/repositories/messaging-message.ts +++ b/src/models/repositories/messaging-message.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { MessagingMessage } from '../entities/messaging-message'; -import { Users, DriveFiles, UserGroups } from '..'; -import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { MessagingMessage } from '../entities/messaging-message.js'; +import { Users, DriveFiles, UserGroups } from '../index.js'; +import { SchemaType } from '@/misc/schema.js'; +import { User } from '../entities/user.js'; export type PackedMessagingMessage = SchemaType; diff --git a/src/models/repositories/moderation-logs.ts b/src/models/repositories/moderation-logs.ts index 3d4c075701..ea074a4532 100644 --- a/src/models/repositories/moderation-logs.ts +++ b/src/models/repositories/moderation-logs.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '..'; -import { ModerationLog } from '../entities/moderation-log'; -import { awaitAll } from '../../prelude/await-all'; +import { Users } from '../index.js'; +import { ModerationLog } from '../entities/moderation-log.js'; +import { awaitAll } from '../../prelude/await-all.js'; @EntityRepository(ModerationLog) export class ModerationLogRepository extends Repository { diff --git a/src/models/repositories/muting.ts b/src/models/repositories/muting.ts index 32e681bf0b..78dfa29215 100644 --- a/src/models/repositories/muting.ts +++ b/src/models/repositories/muting.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '..'; -import { Muting } from '../entities/muting'; -import { awaitAll } from '../../prelude/await-all'; -import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { Users } from '../index.js'; +import { Muting } from '../entities/muting.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { SchemaType } from '@/misc/schema.js'; +import { User } from '../entities/user.js'; export type PackedMuting = SchemaType; diff --git a/src/models/repositories/note-favorite.ts b/src/models/repositories/note-favorite.ts index e58b258fcb..a192bbbc07 100644 --- a/src/models/repositories/note-favorite.ts +++ b/src/models/repositories/note-favorite.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { NoteFavorite } from '../entities/note-favorite'; -import { Notes } from '..'; -import { User } from '../entities/user'; +import { NoteFavorite } from '../entities/note-favorite.js'; +import { Notes } from '../index.js'; +import { User } from '../entities/user.js'; @EntityRepository(NoteFavorite) export class NoteFavoriteRepository extends Repository { diff --git a/src/models/repositories/note-reaction.ts b/src/models/repositories/note-reaction.ts index 5de9e1be65..6c72008d24 100644 --- a/src/models/repositories/note-reaction.ts +++ b/src/models/repositories/note-reaction.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { NoteReaction } from '../entities/note-reaction'; -import { Users } from '..'; -import { SchemaType } from '@/misc/schema'; -import { convertLegacyReaction } from '@/misc/reaction-lib'; -import { User } from '../entities/user'; +import { NoteReaction } from '../entities/note-reaction.js'; +import { Users } from '../index.js'; +import { SchemaType } from '@/misc/schema.js'; +import { convertLegacyReaction } from '@/misc/reaction-lib.js'; +import { User } from '../entities/user.js'; export type PackedNoteReaction = SchemaType; diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index df0ca8c6ad..60a5e1ab3d 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -1,14 +1,14 @@ import { EntityRepository, Repository, In } from 'typeorm'; import * as mfm from 'mfm-js'; -import { Note } from '../entities/note'; -import { User } from '../entities/user'; -import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '..'; -import { SchemaType } from '@/misc/schema'; -import { nyaize } from '@/misc/nyaize'; -import { awaitAll } from '../../prelude/await-all'; -import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib'; -import { NoteReaction } from '../entities/note-reaction'; -import { aggregateNoteEmojis, populateEmojis, prefetchEmojis } from '@/misc/populate-emojis'; +import { Note } from '../entities/note.js'; +import { User } from '../entities/user.js'; +import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index.js'; +import { SchemaType } from '@/misc/schema.js'; +import { nyaize } from '@/misc/nyaize.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib.js'; +import { NoteReaction } from '../entities/note-reaction.js'; +import { aggregateNoteEmojis, populateEmojis, prefetchEmojis } from '@/misc/populate-emojis.js'; export type PackedNote = SchemaType; diff --git a/src/models/repositories/notification.ts b/src/models/repositories/notification.ts index 94a2c3c91a..8199534e34 100644 --- a/src/models/repositories/notification.ts +++ b/src/models/repositories/notification.ts @@ -1,12 +1,12 @@ import { EntityRepository, In, Repository } from 'typeorm'; -import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '..'; -import { Notification } from '../entities/notification'; -import { awaitAll } from '../../prelude/await-all'; -import { SchemaType } from '@/misc/schema'; -import { Note } from '../entities/note'; -import { NoteReaction } from '../entities/note-reaction'; -import { User } from '../entities/user'; -import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis'; +import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '../index.js'; +import { Notification } from '../entities/notification.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Note } from '../entities/note.js'; +import { NoteReaction } from '../entities/note-reaction.js'; +import { User } from '../entities/user.js'; +import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis.js'; export type PackedNotification = SchemaType; diff --git a/src/models/repositories/page-like.ts b/src/models/repositories/page-like.ts index cfef950f3b..81147a9ee0 100644 --- a/src/models/repositories/page-like.ts +++ b/src/models/repositories/page-like.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { PageLike } from '../entities/page-like'; -import { Pages } from '..'; -import { User } from '../entities/user'; +import { PageLike } from '../entities/page-like.js'; +import { Pages } from '../index.js'; +import { User } from '../entities/user.js'; @EntityRepository(PageLike) export class PageLikeRepository extends Repository { diff --git a/src/models/repositories/page.ts b/src/models/repositories/page.ts index a162a50321..45f8c81786 100644 --- a/src/models/repositories/page.ts +++ b/src/models/repositories/page.ts @@ -1,10 +1,10 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Page } from '../entities/page'; -import { SchemaType } from '@/misc/schema'; -import { Users, DriveFiles, PageLikes } from '..'; -import { awaitAll } from '../../prelude/await-all'; -import { DriveFile } from '../entities/drive-file'; -import { User } from '../entities/user'; +import { Page } from '../entities/page.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Users, DriveFiles, PageLikes } from '../index.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { DriveFile } from '../entities/drive-file.js'; +import { User } from '../entities/user.js'; export type PackedPage = SchemaType; diff --git a/src/models/repositories/relay.ts b/src/models/repositories/relay.ts index 601bb5eb39..c1b04a8ea0 100644 --- a/src/models/repositories/relay.ts +++ b/src/models/repositories/relay.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Relay } from '../entities/relay'; +import { Relay } from '../entities/relay.js'; @EntityRepository(Relay) export class RelayRepository extends Repository { diff --git a/src/models/repositories/signin.ts b/src/models/repositories/signin.ts index f5b90c0e9e..8490ac6a59 100644 --- a/src/models/repositories/signin.ts +++ b/src/models/repositories/signin.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Signin } from '../entities/signin'; +import { Signin } from '../entities/signin.js'; @EntityRepository(Signin) export class SigninRepository extends Repository { diff --git a/src/models/repositories/user-group-invitation.ts b/src/models/repositories/user-group-invitation.ts index 2aa890361c..6552f23d96 100644 --- a/src/models/repositories/user-group-invitation.ts +++ b/src/models/repositories/user-group-invitation.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserGroupInvitation } from '../entities/user-group-invitation'; -import { UserGroups } from '..'; +import { UserGroupInvitation } from '../entities/user-group-invitation.js'; +import { UserGroups } from '../index.js'; @EntityRepository(UserGroupInvitation) export class UserGroupInvitationRepository extends Repository { diff --git a/src/models/repositories/user-group.ts b/src/models/repositories/user-group.ts index c7d73ebe26..6a2cd2caa2 100644 --- a/src/models/repositories/user-group.ts +++ b/src/models/repositories/user-group.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserGroup } from '../entities/user-group'; -import { UserGroupJoinings } from '..'; -import { SchemaType } from '@/misc/schema'; +import { UserGroup } from '../entities/user-group.js'; +import { UserGroupJoinings } from '../index.js'; +import { SchemaType } from '@/misc/schema.js'; export type PackedUserGroup = SchemaType; diff --git a/src/models/repositories/user-list.ts b/src/models/repositories/user-list.ts index 7710bebfcc..6027e346a2 100644 --- a/src/models/repositories/user-list.ts +++ b/src/models/repositories/user-list.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserList } from '../entities/user-list'; -import { UserListJoinings } from '..'; -import { SchemaType } from '@/misc/schema'; +import { UserList } from '../entities/user-list.js'; +import { UserListJoinings } from '../index.js'; +import { SchemaType } from '@/misc/schema.js'; export type PackedUserList = SchemaType; diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index 1a191fe864..494ab3c979 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; import { EntityRepository, Repository, In, Not } from 'typeorm'; -import { User, ILocalUser, IRemoteUser } from '../entities/user'; -import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '..'; -import config from '@/config'; -import { SchemaType } from '@/misc/schema'; -import { awaitAll } from '../../prelude/await-all'; -import { populateEmojis } from '@/misc/populate-emojis'; -import { getAntennas } from '@/misc/antenna-cache'; -import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const'; +import { User, ILocalUser, IRemoteUser } from '../entities/user.js'; +import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index.js'; +import config from '@/config/index.js'; +import { SchemaType } from '@/misc/schema.js'; +import { awaitAll } from '../../prelude/await-all.js'; +import { populateEmojis } from '@/misc/populate-emojis.js'; +import { getAntennas } from '@/misc/antenna-cache.js'; +import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const.js'; export type PackedUser = SchemaType; diff --git a/src/prelude/array.ts b/src/prelude/array.ts index d63f0475d0..3846c31af2 100644 --- a/src/prelude/array.ts +++ b/src/prelude/array.ts @@ -1,4 +1,4 @@ -import { EndoRelation, Predicate } from './relation'; +import { EndoRelation, Predicate } from './relation.js'; /** * Count the number of elements that satisfy the predicate diff --git a/src/queue/index.ts b/src/queue/index.ts index c7b7f0392c..7b6824f803 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -1,18 +1,18 @@ import * as httpSignature from 'http-signature'; -import config from '@/config'; -import { program } from '../argv'; +import config from '@/config/index.js'; +import { program } from '../argv.js'; -import processDeliver from './processors/deliver'; -import processInbox from './processors/inbox'; -import processDb from './processors/db'; -import procesObjectStorage from './processors/object-storage'; -import { queueLogger } from './logger'; -import { DriveFile } from '../models/entities/drive-file'; -import { getJobInfo } from './get-job-info'; -import { dbQueue, deliverQueue, inboxQueue, objectStorageQueue } from './queues'; -import { ThinUser } from './types'; -import { IActivity } from '@/remote/activitypub/type'; +import processDeliver from './processors/deliver.js'; +import processInbox from './processors/inbox.js'; +import processDb from './processors/db/index.js'; +import procesObjectStorage from './processors/object-storage/index.js'; +import { queueLogger } from './logger.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { getJobInfo } from './get-job-info.js'; +import { dbQueue, deliverQueue, inboxQueue, objectStorageQueue } from './queues.js'; +import { ThinUser } from './types.js'; +import { IActivity } from '@/remote/activitypub/type.js'; function renderError(e: Error): any { return { diff --git a/src/queue/initialize.ts b/src/queue/initialize.ts index 4c0e5f9d87..bed368967b 100644 --- a/src/queue/initialize.ts +++ b/src/queue/initialize.ts @@ -1,5 +1,5 @@ import * as Bull from 'bull'; -import config from '@/config'; +import config from '@/config/index.js'; export function initialize(name: string, limitPerSec = -1) { return new Bull(name, { diff --git a/src/queue/logger.ts b/src/queue/logger.ts index d6d0774680..2843a3c263 100644 --- a/src/queue/logger.ts +++ b/src/queue/logger.ts @@ -1,3 +1,3 @@ -import Logger from '../services/logger'; +import Logger from '@/services/logger.js'; export const queueLogger = new Logger('queue', 'orange'); diff --git a/src/queue/processors/db/delete-drive-files.ts b/src/queue/processors/db/delete-drive-files.ts index 874623204b..1d3876ac15 100644 --- a/src/queue/processors/db/delete-drive-files.ts +++ b/src/queue/processors/db/delete-drive-files.ts @@ -1,10 +1,10 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger'; -import { deleteFileSync } from '../../../services/drive/delete-file'; -import { Users, DriveFiles } from '../../../models'; +import { queueLogger } from '../../logger.js'; +import { deleteFileSync } from '@/services/drive/delete-file.js'; +import { Users, DriveFiles } from '@/models/index.js'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types'; +import { DbUserJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('delete-drive-files'); diff --git a/src/queue/processors/db/export-blocking.ts b/src/queue/processors/db/export-blocking.ts index 001b50a22c..41344826e8 100644 --- a/src/queue/processors/db/export-blocking.ts +++ b/src/queue/processors/db/export-blocking.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger'; -import addFile from '../../../services/drive/add-file'; -import dateFormat = require('dateformat'); -import { getFullApAccount } from '@/misc/convert-host'; -import { Users, Blockings } from '../../../models'; +import { queueLogger } from '../../logger.js'; +import addFile from '@/services/drive/add-file.js'; +import dateFormat from 'dateformat'; +import { getFullApAccount } from '@/misc/convert-host.js'; +import { Users, Blockings } from '@/models/index.js'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types'; +import { DbUserJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('export-blocking'); diff --git a/src/queue/processors/db/export-following.ts b/src/queue/processors/db/export-following.ts index c1ccb7af4c..c299479afd 100644 --- a/src/queue/processors/db/export-following.ts +++ b/src/queue/processors/db/export-following.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger'; -import addFile from '../../../services/drive/add-file'; -import dateFormat = require('dateformat'); -import { getFullApAccount } from '@/misc/convert-host'; -import { Users, Followings } from '../../../models'; +import { queueLogger } from '../../logger.js'; +import addFile from '@/services/drive/add-file.js'; +import dateFormat from 'dateformat'; +import { getFullApAccount } from '@/misc/convert-host.js'; +import { Users, Followings } from '@/models/index.js'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types'; +import { DbUserJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('export-following'); diff --git a/src/queue/processors/db/export-mute.ts b/src/queue/processors/db/export-mute.ts index 55d45cc29c..8a16ab0b1e 100644 --- a/src/queue/processors/db/export-mute.ts +++ b/src/queue/processors/db/export-mute.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger'; -import addFile from '../../../services/drive/add-file'; -import dateFormat = require('dateformat'); -import { getFullApAccount } from '@/misc/convert-host'; -import { Users, Mutings } from '../../../models'; +import { queueLogger } from '../../logger.js'; +import addFile from '@/services/drive/add-file.js'; +import dateFormat from 'dateformat'; +import { getFullApAccount } from '@/misc/convert-host.js'; +import { Users, Mutings } from '@/models/index.js'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types'; +import { DbUserJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('export-mute'); diff --git a/src/queue/processors/db/export-notes.ts b/src/queue/processors/db/export-notes.ts index 2d09c0d201..9a2f71b9cc 100644 --- a/src/queue/processors/db/export-notes.ts +++ b/src/queue/processors/db/export-notes.ts @@ -2,14 +2,14 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger'; -import addFile from '../../../services/drive/add-file'; -import dateFormat = require('dateformat'); -import { Users, Notes, Polls } from '../../../models'; +import { queueLogger } from '../../logger.js'; +import addFile from '@/services/drive/add-file.js'; +import dateFormat from 'dateformat'; +import { Users, Notes, Polls } from '@/models/index.js'; import { MoreThan } from 'typeorm'; -import { Note } from '../../../models/entities/note'; -import { Poll } from '../../../models/entities/poll'; -import { DbUserJobData } from '@/queue/types'; +import { Note } from '@/models/entities/note.js'; +import { Poll } from '@/models/entities/poll.js'; +import { DbUserJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('export-notes'); diff --git a/src/queue/processors/db/export-user-lists.ts b/src/queue/processors/db/export-user-lists.ts index 3f793e064f..6b54638f08 100644 --- a/src/queue/processors/db/export-user-lists.ts +++ b/src/queue/processors/db/export-user-lists.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger'; -import addFile from '../../../services/drive/add-file'; -import dateFormat = require('dateformat'); -import { getFullApAccount } from '@/misc/convert-host'; -import { Users, UserLists, UserListJoinings } from '../../../models'; +import { queueLogger } from '../../logger.js'; +import addFile from '@/services/drive/add-file.js'; +import dateFormat from 'dateformat'; +import { getFullApAccount } from '@/misc/convert-host.js'; +import { Users, UserLists, UserListJoinings } from '@/models/index.js'; import { In } from 'typeorm'; -import { DbUserJobData } from '@/queue/types'; +import { DbUserJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('export-user-lists'); diff --git a/src/queue/processors/db/import-following.ts b/src/queue/processors/db/import-following.ts index 1156b5cafa..bc8166c72c 100644 --- a/src/queue/processors/db/import-following.ts +++ b/src/queue/processors/db/import-following.ts @@ -1,13 +1,13 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger'; -import follow from '../../../services/following/create'; -import { parseAcct } from '@/misc/acct'; -import { resolveUser } from '../../../remote/resolve-user'; -import { downloadTextFile } from '@/misc/download-text-file'; -import { isSelfHost, toPuny } from '@/misc/convert-host'; -import { Users, DriveFiles } from '../../../models'; -import { DbUserImportJobData } from '@/queue/types'; +import { queueLogger } from '../../logger.js'; +import follow from '@/services/following/create.js'; +import { parseAcct } from '@/misc/acct.js'; +import { resolveUser } from '@/remote/resolve-user.js'; +import { downloadTextFile } from '@/misc/download-text-file.js'; +import { isSelfHost, toPuny } from '@/misc/convert-host.js'; +import { Users, DriveFiles } from '@/models/index.js'; +import { DbUserImportJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('import-following'); diff --git a/src/queue/processors/db/import-user-lists.ts b/src/queue/processors/db/import-user-lists.ts index d04ead869a..6748e748ec 100644 --- a/src/queue/processors/db/import-user-lists.ts +++ b/src/queue/processors/db/import-user-lists.ts @@ -1,14 +1,14 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger'; -import { parseAcct } from '@/misc/acct'; -import { resolveUser } from '../../../remote/resolve-user'; -import { pushUserToUserList } from '../../../services/user-list/push'; -import { downloadTextFile } from '@/misc/download-text-file'; -import { isSelfHost, toPuny } from '@/misc/convert-host'; -import { DriveFiles, Users, UserLists, UserListJoinings } from '../../../models'; -import { genId } from '@/misc/gen-id'; -import { DbUserImportJobData } from '@/queue/types'; +import { queueLogger } from '../../logger.js'; +import { parseAcct } from '@/misc/acct.js'; +import { resolveUser } from '@/remote/resolve-user.js'; +import { pushUserToUserList } from '@/services/user-list/push.js'; +import { downloadTextFile } from '@/misc/download-text-file.js'; +import { isSelfHost, toPuny } from '@/misc/convert-host.js'; +import { DriveFiles, Users, UserLists, UserListJoinings } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { DbUserImportJobData } from '@/queue/types.js'; const logger = queueLogger.createSubLogger('import-user-lists'); diff --git a/src/queue/processors/db/index.ts b/src/queue/processors/db/index.ts index b56b7bfa2c..0936daf7aa 100644 --- a/src/queue/processors/db/index.ts +++ b/src/queue/processors/db/index.ts @@ -1,13 +1,13 @@ import * as Bull from 'bull'; -import { DbJobData } from '@/queue/types'; -import { deleteDriveFiles } from './delete-drive-files'; -import { exportNotes } from './export-notes'; -import { exportFollowing } from './export-following'; -import { exportMute } from './export-mute'; -import { exportBlocking } from './export-blocking'; -import { exportUserLists } from './export-user-lists'; -import { importFollowing } from './import-following'; -import { importUserLists } from './import-user-lists'; +import { DbJobData } from '@/queue/types.js'; +import { deleteDriveFiles } from './delete-drive-files.js'; +import { exportNotes } from './export-notes.js'; +import { exportFollowing } from './export-following.js'; +import { exportMute } from './export-mute.js'; +import { exportBlocking } from './export-blocking.js'; +import { exportUserLists } from './export-user-lists.js'; +import { importFollowing } from './import-following.js'; +import { importUserLists } from './import-user-lists.js'; const jobs = { deleteDriveFiles, diff --git a/src/queue/processors/deliver.ts b/src/queue/processors/deliver.ts index f9c53fc8f1..aeb7fc5f92 100644 --- a/src/queue/processors/deliver.ts +++ b/src/queue/processors/deliver.ts @@ -1,16 +1,16 @@ import { URL } from 'url'; import * as Bull from 'bull'; -import request from '../../remote/activitypub/request'; -import { registerOrFetchInstanceDoc } from '../../services/register-or-fetch-instance-doc'; -import Logger from '../../services/logger'; -import { Instances } from '../../models'; -import { instanceChart } from '../../services/chart'; -import { fetchInstanceMetadata } from '../../services/fetch-instance-metadata'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { toPuny } from '@/misc/convert-host'; -import { Cache } from '@/misc/cache'; -import { Instance } from '../../models/entities/instance'; -import { DeliverJobData } from '../types'; +import request from '@/remote/activitypub/request.js'; +import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; +import Logger from '@/services/logger.js'; +import { Instances } from '@/models/index.js'; +import { instanceChart } from '@/services/chart/index.js'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { toPuny } from '@/misc/convert-host.js'; +import { Cache } from '@/misc/cache.js'; +import { Instance } from '@/models/entities/instance.js'; +import { DeliverJobData } from '../types.js'; const logger = new Logger('deliver'); diff --git a/src/queue/processors/inbox.ts b/src/queue/processors/inbox.ts index 5922c4c560..b13828096d 100644 --- a/src/queue/processors/inbox.ts +++ b/src/queue/processors/inbox.ts @@ -1,19 +1,19 @@ import { URL } from 'url'; import * as Bull from 'bull'; import * as httpSignature from 'http-signature'; -import perform from '../../remote/activitypub/perform'; -import Logger from '../../services/logger'; -import { registerOrFetchInstanceDoc } from '../../services/register-or-fetch-instance-doc'; -import { Instances } from '../../models'; -import { instanceChart } from '../../services/chart'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { toPuny, extractDbHost } from '@/misc/convert-host'; -import { getApId } from '../../remote/activitypub/type'; -import { fetchInstanceMetadata } from '../../services/fetch-instance-metadata'; -import { InboxJobData } from '../types'; -import DbResolver from '../../remote/activitypub/db-resolver'; -import { resolvePerson } from '../../remote/activitypub/models/person'; -import { LdSignature } from '../../remote/activitypub/misc/ld-signature'; +import perform from '@/remote/activitypub/perform.js'; +import Logger from '@/services/logger.js'; +import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; +import { Instances } from '@/models/index.js'; +import { instanceChart } from '@/services/chart/index.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { toPuny, extractDbHost } from '@/misc/convert-host.js'; +import { getApId } from '@/remote/activitypub/type.js'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; +import { InboxJobData } from '../types.js'; +import DbResolver from '@/remote/activitypub/db-resolver.js'; +import { resolvePerson } from '@/remote/activitypub/models/person.js'; +import { LdSignature } from '@/remote/activitypub/misc/ld-signature.js'; const logger = new Logger('inbox'); diff --git a/src/queue/processors/object-storage/clean-remote-files.ts b/src/queue/processors/object-storage/clean-remote-files.ts index a922755f4d..96cb912c1c 100644 --- a/src/queue/processors/object-storage/clean-remote-files.ts +++ b/src/queue/processors/object-storage/clean-remote-files.ts @@ -1,8 +1,8 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger'; -import { deleteFileSync } from '../../../services/drive/delete-file'; -import { DriveFiles } from '../../../models'; +import { queueLogger } from '../../logger.js'; +import { deleteFileSync } from '@/services/drive/delete-file.js'; +import { DriveFiles } from '@/models/index.js'; import { MoreThan, Not, IsNull } from 'typeorm'; const logger = queueLogger.createSubLogger('clean-remote-files'); diff --git a/src/queue/processors/object-storage/delete-file.ts b/src/queue/processors/object-storage/delete-file.ts index 31050998af..08f2977816 100644 --- a/src/queue/processors/object-storage/delete-file.ts +++ b/src/queue/processors/object-storage/delete-file.ts @@ -1,6 +1,6 @@ -import { ObjectStorageFileJobData } from '@/queue/types'; +import { ObjectStorageFileJobData } from '@/queue/types.js'; import * as Bull from 'bull'; -import { deleteObjectStorageFile } from '../../../services/drive/delete-file'; +import { deleteObjectStorageFile } from '@/services/drive/delete-file.js'; export default async (job: Bull.Job) => { const key: string = job.data.key; diff --git a/src/queue/processors/object-storage/index.ts b/src/queue/processors/object-storage/index.ts index 0d9570e179..b00d493719 100644 --- a/src/queue/processors/object-storage/index.ts +++ b/src/queue/processors/object-storage/index.ts @@ -1,7 +1,7 @@ import * as Bull from 'bull'; -import { ObjectStorageJobData } from '@/queue/types'; -import deleteFile from './delete-file'; -import cleanRemoteFiles from './clean-remote-files'; +import { ObjectStorageJobData } from '@/queue/types.js'; +import deleteFile from './delete-file.js'; +import cleanRemoteFiles from './clean-remote-files.js'; const jobs = { deleteFile, diff --git a/src/queue/queues.ts b/src/queue/queues.ts index 5e2754b83f..a3084ae4f6 100644 --- a/src/queue/queues.ts +++ b/src/queue/queues.ts @@ -1,6 +1,6 @@ -import config from '@/config'; -import { initialize as initializeQueue } from './initialize'; -import { DeliverJobData, InboxJobData, DbJobData, ObjectStorageJobData } from './types'; +import config from '@/config/index.js'; +import { initialize as initializeQueue } from './initialize.js'; +import { DeliverJobData, InboxJobData, DbJobData, ObjectStorageJobData } from './types.js'; export const deliverQueue = initializeQueue('deliver', config.deliverJobPerSec || 128); export const inboxQueue = initializeQueue('inbox', config.inboxJobPerSec || 16); diff --git a/src/queue/types.ts b/src/queue/types.ts index a782fc6b97..79067ca05f 100644 --- a/src/queue/types.ts +++ b/src/queue/types.ts @@ -1,6 +1,6 @@ -import { DriveFile } from '@/models/entities/drive-file'; -import { User } from '@/models/entities/user'; -import { IActivity } from '@/remote/activitypub/type'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { User } from '@/models/entities/user.js'; +import { IActivity } from '@/remote/activitypub/type.js'; import * as httpSignature from 'http-signature'; export type DeliverJobData = { diff --git a/src/remote/activitypub/audience.ts b/src/remote/activitypub/audience.ts index 85a70f8286..1ced62e50a 100644 --- a/src/remote/activitypub/audience.ts +++ b/src/remote/activitypub/audience.ts @@ -1,9 +1,9 @@ -import { ApObject, getApIds } from './type'; -import Resolver from './resolver'; -import { resolvePerson } from './models/person'; -import { unique, concat } from '../../prelude/array'; +import { ApObject, getApIds } from './type.js'; +import Resolver from './resolver.js'; +import { resolvePerson } from './models/person.js'; +import { unique, concat } from '../../prelude/array.js'; import * as promiseLimit from 'promise-limit'; -import { User, IRemoteUser } from '../../models/entities/user'; +import { User, IRemoteUser } from '@/models/entities/user.js'; type Visibility = 'public' | 'home' | 'followers' | 'specified'; diff --git a/src/remote/activitypub/db-resolver.ts b/src/remote/activitypub/db-resolver.ts index 9fc6f0c3b7..b73ac1e52a 100644 --- a/src/remote/activitypub/db-resolver.ts +++ b/src/remote/activitypub/db-resolver.ts @@ -1,11 +1,11 @@ -import config from '@/config'; -import { Note } from '../../models/entities/note'; -import { User, IRemoteUser } from '../../models/entities/user'; -import { UserPublickey } from '../../models/entities/user-publickey'; -import { MessagingMessage } from '../../models/entities/messaging-message'; -import { Notes, Users, UserPublickeys, MessagingMessages } from '../../models'; -import { IObject, getApId } from './type'; -import { resolvePerson } from './models/person'; +import config from '@/config/index.js'; +import { Note } from '@/models/entities/note.js'; +import { User, IRemoteUser } from '@/models/entities/user.js'; +import { UserPublickey } from '@/models/entities/user-publickey.js'; +import { MessagingMessage } from '@/models/entities/messaging-message.js'; +import { Notes, Users, UserPublickeys, MessagingMessages } from '@/models/index.js'; +import { IObject, getApId } from './type.js'; +import { resolvePerson } from './models/person.js'; import escapeRegexp = require('escape-regexp'); export default class DbResolver { diff --git a/src/remote/activitypub/deliver-manager.ts b/src/remote/activitypub/deliver-manager.ts index f112b02b4f..b4b2df6ee4 100644 --- a/src/remote/activitypub/deliver-manager.ts +++ b/src/remote/activitypub/deliver-manager.ts @@ -1,6 +1,6 @@ -import { Users, Followings } from '../../models'; -import { ILocalUser, IRemoteUser, User } from '../../models/entities/user'; -import { deliver } from '../../queue'; +import { Users, Followings } from '@/models/index.js'; +import { ILocalUser, IRemoteUser, User } from '@/models/entities/user.js'; +import { deliver } from '@/queue/index.js'; //#region types interface IRecipe { diff --git a/src/remote/activitypub/kernel/accept/follow.ts b/src/remote/activitypub/kernel/accept/follow.ts index 71c1bed9de..393516addf 100644 --- a/src/remote/activitypub/kernel/accept/follow.ts +++ b/src/remote/activitypub/kernel/accept/follow.ts @@ -1,8 +1,8 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import accept from '../../../../services/following/requests/accept'; -import { IFollow } from '../../type'; -import DbResolver from '../../db-resolver'; -import { relayAccepted } from '../../../../services/relay'; +import { IRemoteUser } from '@/models/entities/user.js'; +import accept from '@/services/following/requests/accept.js'; +import { IFollow } from '../../type.js'; +import DbResolver from '../../db-resolver.js'; +import { relayAccepted } from '@/services/relay.js'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { // ※ activityはこっちから投げたフォローリクエストなので、activity.actorは存在するローカルユーザーである必要がある diff --git a/src/remote/activitypub/kernel/accept/index.ts b/src/remote/activitypub/kernel/accept/index.ts index 79cdbb2ef7..354bd4f6e1 100644 --- a/src/remote/activitypub/kernel/accept/index.ts +++ b/src/remote/activitypub/kernel/accept/index.ts @@ -1,8 +1,8 @@ -import Resolver from '../../resolver'; -import { IRemoteUser } from '../../../../models/entities/user'; -import acceptFollow from './follow'; -import { IAccept, isFollow, getApType } from '../../type'; -import { apLogger } from '../../logger'; +import Resolver from '../../resolver.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import acceptFollow from './follow.js'; +import { IAccept, isFollow, getApType } from '../../type.js'; +import { apLogger } from '../../logger.js'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/add/index.ts b/src/remote/activitypub/kernel/add/index.ts index a5b2687416..9a2fac1e74 100644 --- a/src/remote/activitypub/kernel/add/index.ts +++ b/src/remote/activitypub/kernel/add/index.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import { IAdd } from '../../type'; -import { resolveNote } from '../../models/note'; -import { addPinned } from '../../../../services/i/pin'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { IAdd } from '../../type.js'; +import { resolveNote } from '../../models/note.js'; +import { addPinned } from '@/services/i/pin.js'; export default async (actor: IRemoteUser, activity: IAdd): Promise => { if ('actor' in activity && actor.uri !== activity.actor) { diff --git a/src/remote/activitypub/kernel/announce/index.ts b/src/remote/activitypub/kernel/announce/index.ts index 28ad2fbcc1..7e2e73bdd5 100644 --- a/src/remote/activitypub/kernel/announce/index.ts +++ b/src/remote/activitypub/kernel/announce/index.ts @@ -1,8 +1,8 @@ -import Resolver from '../../resolver'; -import { IRemoteUser } from '../../../../models/entities/user'; -import announceNote from './note'; -import { IAnnounce, getApId } from '../../type'; -import { apLogger } from '../../logger'; +import Resolver from '../../resolver.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import announceNote from './note.js'; +import { IAnnounce, getApId } from '../../type.js'; +import { apLogger } from '../../logger.js'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/announce/note.ts b/src/remote/activitypub/kernel/announce/note.ts index d5176897bc..9a6402e3b8 100644 --- a/src/remote/activitypub/kernel/announce/note.ts +++ b/src/remote/activitypub/kernel/announce/note.ts @@ -1,13 +1,13 @@ -import Resolver from '../../resolver'; -import post from '../../../../services/note/create'; -import { IRemoteUser } from '../../../../models/entities/user'; -import { IAnnounce, getApId } from '../../type'; -import { fetchNote, resolveNote } from '../../models/note'; -import { apLogger } from '../../logger'; -import { extractDbHost } from '@/misc/convert-host'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { getApLock } from '@/misc/app-lock'; -import { parseAudience } from '../../audience'; +import Resolver from '../../resolver.js'; +import post from '@/services/note/create.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { IAnnounce, getApId } from '../../type.js'; +import { fetchNote, resolveNote } from '../../models/note.js'; +import { apLogger } from '../../logger.js'; +import { extractDbHost } from '@/misc/convert-host.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { getApLock } from '@/misc/app-lock.js'; +import { parseAudience } from '../../audience.js'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/block/index.ts b/src/remote/activitypub/kernel/block/index.ts index 6c794e1250..9e4f1b316e 100644 --- a/src/remote/activitypub/kernel/block/index.ts +++ b/src/remote/activitypub/kernel/block/index.ts @@ -1,7 +1,7 @@ -import { IBlock } from '../../type'; -import block from '../../../../services/blocking/create'; -import { IRemoteUser } from '../../../../models/entities/user'; -import DbResolver from '../../db-resolver'; +import { IBlock } from '../../type.js'; +import block from '@/services/blocking/create.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import DbResolver from '../../db-resolver.js'; export default async (actor: IRemoteUser, activity: IBlock): Promise => { // ※ activity.objectにブロック対象があり、それは存在するローカルユーザーのはず diff --git a/src/remote/activitypub/kernel/create/index.ts b/src/remote/activitypub/kernel/create/index.ts index f1a3ebff43..4aa10d85df 100644 --- a/src/remote/activitypub/kernel/create/index.ts +++ b/src/remote/activitypub/kernel/create/index.ts @@ -1,9 +1,9 @@ -import Resolver from '../../resolver'; -import { IRemoteUser } from '../../../../models/entities/user'; -import createNote from './note'; -import { ICreate, getApId, isPost, getApType } from '../../type'; -import { apLogger } from '../../logger'; -import { toArray, concat, unique } from '../../../../prelude/array'; +import Resolver from '../../resolver.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import createNote from './note.js'; +import { ICreate, getApId, isPost, getApType } from '../../type.js'; +import { apLogger } from '../../logger.js'; +import { toArray, concat, unique } from '../../../../prelude/array.js'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/create/note.ts b/src/remote/activitypub/kernel/create/note.ts index 69499d303e..b0a7be5ea5 100644 --- a/src/remote/activitypub/kernel/create/note.ts +++ b/src/remote/activitypub/kernel/create/note.ts @@ -1,9 +1,9 @@ -import Resolver from '../../resolver'; -import { IRemoteUser } from '../../../../models/entities/user'; -import { createNote, fetchNote } from '../../models/note'; -import { getApId, IObject, ICreate } from '../../type'; -import { getApLock } from '@/misc/app-lock'; -import { extractDbHost } from '@/misc/convert-host'; +import Resolver from '../../resolver.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { createNote, fetchNote } from '../../models/note.js'; +import { getApId, IObject, ICreate } from '../../type.js'; +import { getApLock } from '@/misc/app-lock.js'; +import { extractDbHost } from '@/misc/convert-host.js'; /** * 投稿作成アクティビティを捌きます diff --git a/src/remote/activitypub/kernel/delete/index.ts b/src/remote/activitypub/kernel/delete/index.ts index 4fb3d40577..130b0aeec9 100644 --- a/src/remote/activitypub/kernel/delete/index.ts +++ b/src/remote/activitypub/kernel/delete/index.ts @@ -1,7 +1,7 @@ -import deleteNote from './note'; -import { IRemoteUser } from '../../../../models/entities/user'; -import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type'; -import { toSingle } from '../../../../prelude/array'; +import deleteNote from './note.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type.js'; +import { toSingle } from '../../../../prelude/array.js'; /** * 削除アクティビティを捌きます diff --git a/src/remote/activitypub/kernel/delete/note.ts b/src/remote/activitypub/kernel/delete/note.ts index 1a7844f68b..ad5e1a2edc 100644 --- a/src/remote/activitypub/kernel/delete/note.ts +++ b/src/remote/activitypub/kernel/delete/note.ts @@ -1,9 +1,9 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import deleteNode from '../../../../services/note/delete'; -import { apLogger } from '../../logger'; -import DbResolver from '../../db-resolver'; -import { getApLock } from '@/misc/app-lock'; -import { deleteMessage } from '../../../../services/messages/delete'; +import { IRemoteUser } from '@/models/entities/user.js'; +import deleteNode from '@/services/note/delete.js'; +import { apLogger } from '../../logger.js'; +import DbResolver from '../../db-resolver.js'; +import { getApLock } from '@/misc/app-lock.js'; +import { deleteMessage } from '@/services/messages/delete.js'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/flag/index.ts b/src/remote/activitypub/kernel/flag/index.ts index 5f5357a3ed..62f3ac5ed5 100644 --- a/src/remote/activitypub/kernel/flag/index.ts +++ b/src/remote/activitypub/kernel/flag/index.ts @@ -1,9 +1,9 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import config from '@/config'; -import { IFlag, getApIds } from '../../type'; -import { AbuseUserReports, Users } from '../../../../models'; +import { IRemoteUser } from '@/models/entities/user.js'; +import config from '@/config/index.js'; +import { IFlag, getApIds } from '../../type.js'; +import { AbuseUserReports, Users } from '@/models/index.js'; import { In } from 'typeorm'; -import { genId } from '@/misc/gen-id'; +import { genId } from '@/misc/gen-id.js'; export default async (actor: IRemoteUser, activity: IFlag): Promise => { // objectは `(User|Note) | (User|Note)[]` だけど、全パターンDBスキーマと対応させられないので diff --git a/src/remote/activitypub/kernel/follow.ts b/src/remote/activitypub/kernel/follow.ts index 3e2063302a..49c1a7ee01 100644 --- a/src/remote/activitypub/kernel/follow.ts +++ b/src/remote/activitypub/kernel/follow.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '../../../models/entities/user'; -import follow from '../../../services/following/create'; -import { IFollow } from '../type'; -import DbResolver from '../db-resolver'; +import { IRemoteUser } from '@/models/entities/user.js'; +import follow from '@/services/following/create.js'; +import { IFollow } from '../type.js'; +import DbResolver from '../db-resolver.js'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { const dbResolver = new DbResolver(); diff --git a/src/remote/activitypub/kernel/index.ts b/src/remote/activitypub/kernel/index.ts index ff75f80299..fa0df9753f 100644 --- a/src/remote/activitypub/kernel/index.ts +++ b/src/remote/activitypub/kernel/index.ts @@ -1,22 +1,22 @@ -import { IObject, isCreate, isDelete, isUpdate, isRead, isFollow, isAccept, isReject, isAdd, isRemove, isAnnounce, isLike, isUndo, isBlock, isCollectionOrOrderedCollection, isCollection, isFlag } from '../type'; -import { IRemoteUser } from '../../../models/entities/user'; -import create from './create'; -import performDeleteActivity from './delete'; -import performUpdateActivity from './update'; -import { performReadActivity } from './read'; -import follow from './follow'; -import undo from './undo'; -import like from './like'; -import announce from './announce'; -import accept from './accept'; -import reject from './reject'; -import add from './add'; -import remove from './remove'; -import block from './block'; -import flag from './flag'; -import { apLogger } from '../logger'; -import Resolver from '../resolver'; -import { toArray } from '../../../prelude/array'; +import { IObject, isCreate, isDelete, isUpdate, isRead, isFollow, isAccept, isReject, isAdd, isRemove, isAnnounce, isLike, isUndo, isBlock, isCollectionOrOrderedCollection, isCollection, isFlag } from '../type.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import create from './create/index.js'; +import performDeleteActivity from './delete/index.js'; +import performUpdateActivity from './update/index.js'; +import { performReadActivity } from './read.js'; +import follow from './follow.js'; +import undo from './undo/index.js'; +import like from './like.js'; +import announce from './announce/index.js'; +import accept from './accept/index.js'; +import reject from './reject/index.js'; +import add from './add/index.js'; +import remove from './remove/index.js'; +import block from './block/index.js'; +import flag from './flag/index.js'; +import { apLogger } from '../logger.js'; +import Resolver from '../resolver.js'; +import { toArray } from '../../../prelude/array.js'; export async function performActivity(actor: IRemoteUser, activity: IObject) { if (isCollectionOrOrderedCollection(activity)) { diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index 6ba03e4a48..715cc379b9 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '../../../models/entities/user'; -import { ILike, getApId } from '../type'; -import create from '../../../services/note/reaction/create'; -import { fetchNote, extractEmojis } from '../models/note'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { ILike, getApId } from '../type.js'; +import create from '@/services/note/reaction/create.js'; +import { fetchNote, extractEmojis } from '../models/note.js'; export default async (actor: IRemoteUser, activity: ILike) => { const targetUri = getApId(activity.object); diff --git a/src/remote/activitypub/kernel/read.ts b/src/remote/activitypub/kernel/read.ts index edbc8e68ed..93cc36ec46 100644 --- a/src/remote/activitypub/kernel/read.ts +++ b/src/remote/activitypub/kernel/read.ts @@ -1,8 +1,8 @@ -import { IRemoteUser } from '../../../models/entities/user'; -import { IRead, getApId } from '../type'; -import { isSelfHost, extractDbHost } from '@/misc/convert-host'; -import { MessagingMessages } from '../../../models'; -import { readUserMessagingMessage } from '../../../server/api/common/read-messaging-message'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { IRead, getApId } from '../type.js'; +import { isSelfHost, extractDbHost } from '@/misc/convert-host.js'; +import { MessagingMessages } from '@/models/index.js'; +import { readUserMessagingMessage } from '../../../server/api/common/read-messaging-message.js'; export const performReadActivity = async (actor: IRemoteUser, activity: IRead): Promise => { const id = await getApId(activity.object); diff --git a/src/remote/activitypub/kernel/reject/follow.ts b/src/remote/activitypub/kernel/reject/follow.ts index d97ced46b3..7099864e76 100644 --- a/src/remote/activitypub/kernel/reject/follow.ts +++ b/src/remote/activitypub/kernel/reject/follow.ts @@ -1,8 +1,8 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import reject from '../../../../services/following/requests/reject'; -import { IFollow } from '../../type'; -import DbResolver from '../../db-resolver'; -import { relayRejected } from '../../../../services/relay'; +import { IRemoteUser } from '@/models/entities/user.js'; +import reject from '@/services/following/requests/reject.js'; +import { IFollow } from '../../type.js'; +import DbResolver from '../../db-resolver.js'; +import { relayRejected } from '@/services/relay.js'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { // ※ activityはこっちから投げたフォローリクエストなので、activity.actorは存在するローカルユーザーである必要がある diff --git a/src/remote/activitypub/kernel/reject/index.ts b/src/remote/activitypub/kernel/reject/index.ts index d7a80fce7b..ed86a4aa2f 100644 --- a/src/remote/activitypub/kernel/reject/index.ts +++ b/src/remote/activitypub/kernel/reject/index.ts @@ -1,8 +1,8 @@ -import Resolver from '../../resolver'; -import { IRemoteUser } from '../../../../models/entities/user'; -import rejectFollow from './follow'; -import { IReject, isFollow, getApType } from '../../type'; -import { apLogger } from '../../logger'; +import Resolver from '../../resolver.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import rejectFollow from './follow.js'; +import { IReject, isFollow, getApType } from '../../type.js'; +import { apLogger } from '../../logger.js'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/remove/index.ts b/src/remote/activitypub/kernel/remove/index.ts index 32b8d66471..7d7b3386c0 100644 --- a/src/remote/activitypub/kernel/remove/index.ts +++ b/src/remote/activitypub/kernel/remove/index.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import { IRemove } from '../../type'; -import { resolveNote } from '../../models/note'; -import { removePinned } from '../../../../services/i/pin'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { IRemove } from '../../type.js'; +import { resolveNote } from '../../models/note.js'; +import { removePinned } from '@/services/i/pin.js'; export default async (actor: IRemoteUser, activity: IRemove): Promise => { if ('actor' in activity && actor.uri !== activity.actor) { diff --git a/src/remote/activitypub/kernel/undo/announce.ts b/src/remote/activitypub/kernel/undo/announce.ts index e08fea188d..d0c8c7cb66 100644 --- a/src/remote/activitypub/kernel/undo/announce.ts +++ b/src/remote/activitypub/kernel/undo/announce.ts @@ -1,7 +1,7 @@ -import { Notes } from '../../../../models'; -import { IRemoteUser } from '../../../../models/entities/user'; -import { IAnnounce, getApId } from '../../type'; -import deleteNote from '../../../../services/note/delete'; +import { Notes } from '@/models/index.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { IAnnounce, getApId } from '../../type.js'; +import deleteNote from '@/services/note/delete.js'; export const undoAnnounce = async (actor: IRemoteUser, activity: IAnnounce): Promise => { const uri = getApId(activity); diff --git a/src/remote/activitypub/kernel/undo/block.ts b/src/remote/activitypub/kernel/undo/block.ts index 73000fc3f1..844b067e2b 100644 --- a/src/remote/activitypub/kernel/undo/block.ts +++ b/src/remote/activitypub/kernel/undo/block.ts @@ -1,7 +1,7 @@ -import { IBlock } from '../../type'; -import unblock from '../../../../services/blocking/delete'; -import { IRemoteUser } from '../../../../models/entities/user'; -import DbResolver from '../../db-resolver'; +import { IBlock } from '../../type.js'; +import unblock from '@/services/blocking/delete.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import DbResolver from '../../db-resolver.js'; export default async (actor: IRemoteUser, activity: IBlock): Promise => { const dbResolver = new DbResolver(); diff --git a/src/remote/activitypub/kernel/undo/follow.ts b/src/remote/activitypub/kernel/undo/follow.ts index 73a164030b..cbf9b2e800 100644 --- a/src/remote/activitypub/kernel/undo/follow.ts +++ b/src/remote/activitypub/kernel/undo/follow.ts @@ -1,9 +1,9 @@ -import unfollow from '../../../../services/following/delete'; -import cancelRequest from '../../../../services/following/requests/cancel'; -import { IFollow } from '../../type'; -import { IRemoteUser } from '../../../../models/entities/user'; -import { FollowRequests, Followings } from '../../../../models'; -import DbResolver from '../../db-resolver'; +import unfollow from '@/services/following/delete.js'; +import cancelRequest from '@/services/following/requests/cancel.js'; +import { IFollow } from '../../type.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { FollowRequests, Followings } from '@/models/index.js'; +import DbResolver from '../../db-resolver.js'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { const dbResolver = new DbResolver(); diff --git a/src/remote/activitypub/kernel/undo/index.ts b/src/remote/activitypub/kernel/undo/index.ts index 0bab3c9666..a03a785c0b 100644 --- a/src/remote/activitypub/kernel/undo/index.ts +++ b/src/remote/activitypub/kernel/undo/index.ts @@ -1,11 +1,11 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import { IUndo, isFollow, isBlock, isLike, isAnnounce, getApType } from '../../type'; -import unfollow from './follow'; -import unblock from './block'; -import undoLike from './like'; -import { undoAnnounce } from './announce'; -import Resolver from '../../resolver'; -import { apLogger } from '../../logger'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { IUndo, isFollow, isBlock, isLike, isAnnounce, getApType } from '../../type.js'; +import unfollow from './follow.js'; +import unblock from './block.js'; +import undoLike from './like.js'; +import { undoAnnounce } from './announce.js'; +import Resolver from '../../resolver.js'; +import { apLogger } from '../../logger.js'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/undo/like.ts b/src/remote/activitypub/kernel/undo/like.ts index bd6930c66b..283e556b35 100644 --- a/src/remote/activitypub/kernel/undo/like.ts +++ b/src/remote/activitypub/kernel/undo/like.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import { ILike, getApId } from '../../type'; -import deleteReaction from '../../../../services/note/reaction/delete'; -import { fetchNote } from '../../models/note'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { ILike, getApId } from '../../type.js'; +import deleteReaction from '@/services/note/reaction/delete.js'; +import { fetchNote } from '../../models/note.js'; /** * Process Undo.Like activity diff --git a/src/remote/activitypub/kernel/update/index.ts b/src/remote/activitypub/kernel/update/index.ts index 6dd3e5f296..7888c698e3 100644 --- a/src/remote/activitypub/kernel/update/index.ts +++ b/src/remote/activitypub/kernel/update/index.ts @@ -1,9 +1,9 @@ -import { IRemoteUser } from '../../../../models/entities/user'; -import { getApType, IUpdate, isActor } from '../../type'; -import { apLogger } from '../../logger'; -import { updateQuestion } from '../../models/question'; -import Resolver from '../../resolver'; -import { updatePerson } from '../../models/person'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { getApType, IUpdate, isActor } from '../../type.js'; +import { apLogger } from '../../logger.js'; +import { updateQuestion } from '../../models/question.js'; +import Resolver from '../../resolver.js'; +import { updatePerson } from '../../models/person.js'; /** * Updateアクティビティを捌きます diff --git a/src/remote/activitypub/logger.ts b/src/remote/activitypub/logger.ts index e13add01db..cab51b3bf5 100644 --- a/src/remote/activitypub/logger.ts +++ b/src/remote/activitypub/logger.ts @@ -1,3 +1,3 @@ -import { remoteLogger } from '../logger'; +import { remoteLogger } from '../logger.js'; export const apLogger = remoteLogger.createSubLogger('ap', 'magenta'); diff --git a/src/remote/activitypub/misc/get-note-html.ts b/src/remote/activitypub/misc/get-note-html.ts index 683860d9cc..3800b40608 100644 --- a/src/remote/activitypub/misc/get-note-html.ts +++ b/src/remote/activitypub/misc/get-note-html.ts @@ -1,6 +1,6 @@ import * as mfm from 'mfm-js'; -import { Note } from '../../../models/entities/note'; -import { toHtml } from '../../../mfm/to-html'; +import { Note } from '@/models/entities/note.js'; +import { toHtml } from '../../../mfm/to-html.js'; export default function(note: Note) { let html = note.text ? toHtml(mfm.parse(note.text), JSON.parse(note.mentionedRemoteUsers)) : null; diff --git a/src/remote/activitypub/misc/html-to-mfm.ts b/src/remote/activitypub/misc/html-to-mfm.ts index 5cca04df21..bb1ba7925c 100644 --- a/src/remote/activitypub/misc/html-to-mfm.ts +++ b/src/remote/activitypub/misc/html-to-mfm.ts @@ -1,6 +1,6 @@ -import { IObject } from '../type'; -import { extractApHashtagObjects } from '../models/tag'; -import { fromHtml } from '../../../mfm/from-html'; +import { IObject } from '../type.js'; +import { extractApHashtagObjects } from '../models/tag.js'; +import { fromHtml } from '../../../mfm/from-html.js'; export function htmlToMfm(html: string, tag?: IObject | IObject[]) { const hashtagNames = extractApHashtagObjects(tag).map(x => x.name).filter((x): x is string => x != null); diff --git a/src/remote/activitypub/misc/ld-signature.ts b/src/remote/activitypub/misc/ld-signature.ts index dec07ea81b..c73cef81e1 100644 --- a/src/remote/activitypub/misc/ld-signature.ts +++ b/src/remote/activitypub/misc/ld-signature.ts @@ -1,8 +1,8 @@ import * as crypto from 'crypto'; import * as jsonld from 'jsonld'; -import { CONTEXTS } from './contexts'; +import { CONTEXTS } from './contexts.js'; import fetch from 'node-fetch'; -import { httpAgent, httpsAgent } from '@/misc/fetch'; +import { httpAgent, httpsAgent } from '@/misc/fetch.js'; // RsaSignature2017 based from https://github.com/transmute-industries/RsaSignature2017 diff --git a/src/remote/activitypub/models/image.ts b/src/remote/activitypub/models/image.ts index 7bec1d6030..ea2584407a 100644 --- a/src/remote/activitypub/models/image.ts +++ b/src/remote/activitypub/models/image.ts @@ -1,10 +1,10 @@ -import uploadFromUrl from '../../../services/drive/upload-from-url'; -import { IRemoteUser } from '../../../models/entities/user'; -import Resolver from '../resolver'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { apLogger } from '../logger'; -import { DriveFile } from '../../../models/entities/drive-file'; -import { DriveFiles } from '../../../models'; +import uploadFromUrl from '@/services/drive/upload-from-url.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import Resolver from '../resolver.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { apLogger } from '../logger.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { DriveFiles } from '@/models/index.js'; const logger = apLogger; diff --git a/src/remote/activitypub/models/mention.ts b/src/remote/activitypub/models/mention.ts index 5d10328ef4..e84429815d 100644 --- a/src/remote/activitypub/models/mention.ts +++ b/src/remote/activitypub/models/mention.ts @@ -1,9 +1,9 @@ -import { toArray, unique } from '../../../prelude/array'; -import { IObject, isMention, IApMention } from '../type'; -import { resolvePerson } from './person'; +import { toArray, unique } from '../../../prelude/array.js'; +import { IObject, isMention, IApMention } from '../type.js'; +import { resolvePerson } from './person.js'; import * as promiseLimit from 'promise-limit'; -import Resolver from '../resolver'; -import { User } from '../../../models/entities/user'; +import Resolver from '../resolver.js'; +import { User } from '@/models/entities/user.js'; export async function extractApMentions(tags: IObject | IObject[] | null | undefined) { const hrefs = unique(extractApMentionObjects(tags).map(x => x.href as string)); diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 6621ae3492..2a4f51bb3b 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -1,31 +1,31 @@ import * as promiseLimit from 'promise-limit'; -import config from '@/config'; -import Resolver from '../resolver'; -import post from '../../../services/note/create'; -import { resolvePerson, updatePerson } from './person'; -import { resolveImage } from './image'; -import { IRemoteUser } from '../../../models/entities/user'; -import { htmlToMfm } from '../misc/html-to-mfm'; -import { extractApHashtags } from './tag'; -import { unique, toArray, toSingle } from '../../../prelude/array'; -import { extractPollFromQuestion } from './question'; -import vote from '../../../services/note/polls/vote'; -import { apLogger } from '../logger'; -import { DriveFile } from '../../../models/entities/drive-file'; -import { deliverQuestionUpdate } from '../../../services/note/polls/update'; -import { extractDbHost, toPuny } from '@/misc/convert-host'; -import { Emojis, Polls, MessagingMessages } from '../../../models'; -import { Note } from '../../../models/entities/note'; -import { IObject, getOneApId, getApId, getOneApHrefNullable, validPost, IPost, isEmoji, getApType } from '../type'; -import { Emoji } from '../../../models/entities/emoji'; -import { genId } from '@/misc/gen-id'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { getApLock } from '@/misc/app-lock'; -import { createMessage } from '../../../services/messages/create'; -import { parseAudience } from '../audience'; -import { extractApMentions } from './mention'; -import DbResolver from '../db-resolver'; +import config from '@/config/index.js'; +import Resolver from '../resolver.js'; +import post from '@/services/note/create.js'; +import { resolvePerson, updatePerson } from './person.js'; +import { resolveImage } from './image.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { htmlToMfm } from '../misc/html-to-mfm.js'; +import { extractApHashtags } from './tag.js'; +import { unique, toArray, toSingle } from '../../../prelude/array.js'; +import { extractPollFromQuestion } from './question.js'; +import vote from '@/services/note/polls/vote.js'; +import { apLogger } from '../logger.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { deliverQuestionUpdate } from '@/services/note/polls/update.js'; +import { extractDbHost, toPuny } from '@/misc/convert-host.js'; +import { Emojis, Polls, MessagingMessages } from '@/models/index.js'; +import { Note } from '@/models/entities/note.js'; +import { IObject, getOneApId, getApId, getOneApHrefNullable, validPost, IPost, isEmoji, getApType } from '../type.js'; +import { Emoji } from '@/models/entities/emoji.js'; +import { genId } from '@/misc/gen-id.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { getApLock } from '@/misc/app-lock.js'; +import { createMessage } from '@/services/messages/create.js'; +import { parseAudience } from '../audience.js'; +import { extractApMentions } from './mention.js'; +import DbResolver from '../db-resolver.js'; const logger = apLogger; diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 1b2d0bbdcf..2b7d707ac8 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -2,32 +2,32 @@ import { URL } from 'url'; import * as promiseLimit from 'promise-limit'; import $, { Context } from 'cafy'; -import config from '@/config'; -import Resolver from '../resolver'; -import { resolveImage } from './image'; -import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue, getApType, isActor } from '../type'; -import { fromHtml } from '../../../mfm/from-html'; -import { htmlToMfm } from '../misc/html-to-mfm'; -import { resolveNote, extractEmojis } from './note'; -import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc'; -import { extractApHashtags } from './tag'; -import { apLogger } from '../logger'; -import { Note } from '../../../models/entities/note'; -import { updateUsertags } from '../../../services/update-hashtag'; -import { Users, Instances, DriveFiles, Followings, UserProfiles, UserPublickeys } from '../../../models'; -import { User, IRemoteUser } from '../../../models/entities/user'; -import { Emoji } from '../../../models/entities/emoji'; -import { UserNotePining } from '../../../models/entities/user-note-pining'; -import { genId } from '@/misc/gen-id'; -import { instanceChart, usersChart } from '../../../services/chart'; -import { UserPublickey } from '../../../models/entities/user-publickey'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; -import { toPuny } from '@/misc/convert-host'; -import { UserProfile } from '../../../models/entities/user-profile'; +import config from '@/config/index.js'; +import Resolver from '../resolver.js'; +import { resolveImage } from './image.js'; +import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue, getApType, isActor } from '../type.js'; +import { fromHtml } from '../../../mfm/from-html.js'; +import { htmlToMfm } from '../misc/html-to-mfm.js'; +import { resolveNote, extractEmojis } from './note.js'; +import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; +import { extractApHashtags } from './tag.js'; +import { apLogger } from '../logger.js'; +import { Note } from '@/models/entities/note.js'; +import { updateUsertags } from '@/services/update-hashtag.js'; +import { Users, Instances, DriveFiles, Followings, UserProfiles, UserPublickeys } from '@/models/index.js'; +import { User, IRemoteUser } from '@/models/entities/user.js'; +import { Emoji } from '@/models/entities/emoji.js'; +import { UserNotePining } from '@/models/entities/user-note-pining.js'; +import { genId } from '@/misc/gen-id.js'; +import { instanceChart, usersChart } from '@/services/chart/index.js'; +import { UserPublickey } from '@/models/entities/user-publickey.js'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; +import { toPuny } from '@/misc/convert-host.js'; +import { UserProfile } from '@/models/entities/user-profile.js'; import { getConnection } from 'typeorm'; -import { toArray } from '../../../prelude/array'; -import { fetchInstanceMetadata } from '../../../services/fetch-instance-metadata'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; +import { toArray } from '../../../prelude/array.js'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; const logger = apLogger; diff --git a/src/remote/activitypub/models/question.ts b/src/remote/activitypub/models/question.ts index 966b15af11..f954a38e8b 100644 --- a/src/remote/activitypub/models/question.ts +++ b/src/remote/activitypub/models/question.ts @@ -1,9 +1,9 @@ -import config from '@/config'; -import Resolver from '../resolver'; -import { IObject, IQuestion, isQuestion, } from '../type'; -import { apLogger } from '../logger'; -import { Notes, Polls } from '../../../models'; -import { IPoll } from '../../../models/entities/poll'; +import config from '@/config/index.js'; +import Resolver from '../resolver.js'; +import { IObject, IQuestion, isQuestion, } from '../type.js'; +import { apLogger } from '../logger.js'; +import { Notes, Polls } from '@/models/index.js'; +import { IPoll } from '@/models/entities/poll.js'; export async function extractPollFromQuestion(source: string | IObject, resolver?: Resolver): Promise { if (resolver == null) resolver = new Resolver(); diff --git a/src/remote/activitypub/models/tag.ts b/src/remote/activitypub/models/tag.ts index d25cb463fe..cb8c753365 100644 --- a/src/remote/activitypub/models/tag.ts +++ b/src/remote/activitypub/models/tag.ts @@ -1,5 +1,5 @@ -import { toArray } from '../../../prelude/array'; -import { IObject, isHashtag, IApHashtag } from '../type'; +import { toArray } from '../../../prelude/array.js'; +import { IObject, isHashtag, IApHashtag } from '../type.js'; export function extractApHashtags(tags: IObject | IObject[] | null | undefined) { if (tags == null) return []; diff --git a/src/remote/activitypub/perform.ts b/src/remote/activitypub/perform.ts index 12e72fdea5..3e18815586 100644 --- a/src/remote/activitypub/perform.ts +++ b/src/remote/activitypub/perform.ts @@ -1,6 +1,6 @@ -import { IObject } from './type'; -import { IRemoteUser } from '../../models/entities/user'; -import { performActivity } from './kernel'; +import { IObject } from './type.js'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { performActivity } from './kernel/index.js'; export default async (actor: IRemoteUser, activity: IObject): Promise => { await performActivity(actor, activity); diff --git a/src/remote/activitypub/renderer/accept.ts b/src/remote/activitypub/renderer/accept.ts index 8725a30e7c..f1037e95f2 100644 --- a/src/remote/activitypub/renderer/accept.ts +++ b/src/remote/activitypub/renderer/accept.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { User } from '@/models/entities/user'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; export default (object: any, user: { id: User['id']; host: null }) => ({ type: 'Accept', diff --git a/src/remote/activitypub/renderer/add.ts b/src/remote/activitypub/renderer/add.ts index 18f9ccacf5..fce541bcdc 100644 --- a/src/remote/activitypub/renderer/add.ts +++ b/src/remote/activitypub/renderer/add.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { ILocalUser } from '../../../models/entities/user'; +import config from '@/config/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; export default (user: ILocalUser, target: any, object: any) => ({ type: 'Add', diff --git a/src/remote/activitypub/renderer/announce.ts b/src/remote/activitypub/renderer/announce.ts index f577dbbc89..dfbe4714c9 100644 --- a/src/remote/activitypub/renderer/announce.ts +++ b/src/remote/activitypub/renderer/announce.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { Note } from '../../../models/entities/note'; +import config from '@/config/index.js'; +import { Note } from '@/models/entities/note.js'; export default (object: any, note: Note) => { const attributedTo = `${config.url}/users/${note.userId}`; diff --git a/src/remote/activitypub/renderer/block.ts b/src/remote/activitypub/renderer/block.ts index 26b7dd580a..4e9102e6f0 100644 --- a/src/remote/activitypub/renderer/block.ts +++ b/src/remote/activitypub/renderer/block.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { ILocalUser, IRemoteUser } from '../../../models/entities/user'; +import config from '@/config/index.js'; +import { ILocalUser, IRemoteUser } from '@/models/entities/user.js'; export default (blocker: ILocalUser, blockee: IRemoteUser) => ({ type: 'Block', diff --git a/src/remote/activitypub/renderer/create.ts b/src/remote/activitypub/renderer/create.ts index ff0840b9e6..103ce4bfd5 100644 --- a/src/remote/activitypub/renderer/create.ts +++ b/src/remote/activitypub/renderer/create.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { Note } from '../../../models/entities/note'; +import config from '@/config/index.js'; +import { Note } from '@/models/entities/note.js'; export default (object: any, note: Note) => { const activity = { diff --git a/src/remote/activitypub/renderer/delete.ts b/src/remote/activitypub/renderer/delete.ts index 710f0482a6..159a486e08 100644 --- a/src/remote/activitypub/renderer/delete.ts +++ b/src/remote/activitypub/renderer/delete.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { User } from '../../../models/entities/user'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; export default (object: any, user: { id: User['id']; host: null }) => ({ type: 'Delete', diff --git a/src/remote/activitypub/renderer/document.ts b/src/remote/activitypub/renderer/document.ts index f6e9dca45d..c973de4c4c 100644 --- a/src/remote/activitypub/renderer/document.ts +++ b/src/remote/activitypub/renderer/document.ts @@ -1,5 +1,5 @@ -import { DriveFile } from '../../../models/entities/drive-file'; -import { DriveFiles } from '../../../models'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { DriveFiles } from '@/models/index.js'; export default (file: DriveFile) => ({ type: 'Document', diff --git a/src/remote/activitypub/renderer/emoji.ts b/src/remote/activitypub/renderer/emoji.ts index b62259c32e..a58c0c1ad9 100644 --- a/src/remote/activitypub/renderer/emoji.ts +++ b/src/remote/activitypub/renderer/emoji.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { Emoji } from '../../../models/entities/emoji'; +import config from '@/config/index.js'; +import { Emoji } from '@/models/entities/emoji.js'; export default (emoji: Emoji) => ({ id: `${config.url}/emojis/${emoji.name}`, diff --git a/src/remote/activitypub/renderer/follow-relay.ts b/src/remote/activitypub/renderer/follow-relay.ts index d53bd05825..4340b70537 100644 --- a/src/remote/activitypub/renderer/follow-relay.ts +++ b/src/remote/activitypub/renderer/follow-relay.ts @@ -1,6 +1,6 @@ -import config from '@/config'; -import { Relay } from '../../../models/entities/relay'; -import { ILocalUser } from '../../../models/entities/user'; +import config from '@/config/index.js'; +import { Relay } from '@/models/entities/relay.js'; +import { ILocalUser } from '@/models/entities/user.js'; export function renderFollowRelay(relay: Relay, relayActor: ILocalUser) { const follow = { diff --git a/src/remote/activitypub/renderer/follow-user.ts b/src/remote/activitypub/renderer/follow-user.ts index 744361a24f..ad1d63b933 100644 --- a/src/remote/activitypub/renderer/follow-user.ts +++ b/src/remote/activitypub/renderer/follow-user.ts @@ -1,6 +1,6 @@ -import config from '@/config'; -import { Users } from '../../../models'; -import { User } from '../../../models/entities/user'; +import config from '@/config/index.js'; +import { Users } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; /** * Convert (local|remote)(Follower|Followee)ID to URL diff --git a/src/remote/activitypub/renderer/follow.ts b/src/remote/activitypub/renderer/follow.ts index 252b0b2838..9f80bf829b 100644 --- a/src/remote/activitypub/renderer/follow.ts +++ b/src/remote/activitypub/renderer/follow.ts @@ -1,6 +1,6 @@ -import config from '@/config'; -import { User } from '../../../models/entities/user'; -import { Users } from '../../../models'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; +import { Users } from '@/models/index.js'; export default (follower: { id: User['id']; host: User['host']; uri: User['host'] }, followee: { id: User['id']; host: User['host']; uri: User['host'] }, requestId?: string) => { const follow = { diff --git a/src/remote/activitypub/renderer/hashtag.ts b/src/remote/activitypub/renderer/hashtag.ts index a739a4b0b6..faa0efe924 100644 --- a/src/remote/activitypub/renderer/hashtag.ts +++ b/src/remote/activitypub/renderer/hashtag.ts @@ -1,4 +1,4 @@ -import config from '@/config'; +import config from '@/config/index.js'; export default (tag: string) => ({ type: 'Hashtag', diff --git a/src/remote/activitypub/renderer/image.ts b/src/remote/activitypub/renderer/image.ts index cbd4fbbe68..6440248a4a 100644 --- a/src/remote/activitypub/renderer/image.ts +++ b/src/remote/activitypub/renderer/image.ts @@ -1,5 +1,5 @@ -import { DriveFile } from '../../../models/entities/drive-file'; -import { DriveFiles } from '../../../models'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { DriveFiles } from '@/models/index.js'; export default (file: DriveFile) => ({ type: 'Image', diff --git a/src/remote/activitypub/renderer/index.ts b/src/remote/activitypub/renderer/index.ts index 84500e9491..5ab5b1cdbe 100644 --- a/src/remote/activitypub/renderer/index.ts +++ b/src/remote/activitypub/renderer/index.ts @@ -1,9 +1,9 @@ -import config from '@/config'; +import config from '@/config/index.js'; import { v4 as uuid } from 'uuid'; -import { IActivity } from '../type'; -import { LdSignature } from '../misc/ld-signature'; -import { getUserKeypair } from '@/misc/keypair-store'; -import { User } from '@/models/entities/user'; +import { IActivity } from '../type.js'; +import { LdSignature } from '../misc/ld-signature.js'; +import { getUserKeypair } from '@/misc/keypair-store.js'; +import { User } from '@/models/entities/user.js'; export const renderActivity = (x: any): IActivity | null => { if (x == null) return null; diff --git a/src/remote/activitypub/renderer/key.ts b/src/remote/activitypub/renderer/key.ts index 547059dd3c..4db1d83262 100644 --- a/src/remote/activitypub/renderer/key.ts +++ b/src/remote/activitypub/renderer/key.ts @@ -1,6 +1,6 @@ -import config from '@/config'; -import { ILocalUser } from '../../../models/entities/user'; -import { UserKeypair } from '../../../models/entities/user-keypair'; +import config from '@/config/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; +import { UserKeypair } from '@/models/entities/user-keypair.js'; import { createPublicKey } from 'crypto'; export default (user: ILocalUser, key: UserKeypair, postfix?: string) => ({ diff --git a/src/remote/activitypub/renderer/like.ts b/src/remote/activitypub/renderer/like.ts index 5967836846..6ec0bfb034 100644 --- a/src/remote/activitypub/renderer/like.ts +++ b/src/remote/activitypub/renderer/like.ts @@ -1,8 +1,8 @@ -import config from '@/config'; -import { NoteReaction } from '../../../models/entities/note-reaction'; -import { Note } from '../../../models/entities/note'; -import { Emojis } from '../../../models'; -import renderEmoji from './emoji'; +import config from '@/config/index.js'; +import { NoteReaction } from '@/models/entities/note-reaction.js'; +import { Note } from '@/models/entities/note.js'; +import { Emojis } from '@/models/index.js'; +import renderEmoji from './emoji.js'; export const renderLike = async (noteReaction: NoteReaction, note: Note) => { const reaction = noteReaction.reaction; diff --git a/src/remote/activitypub/renderer/mention.ts b/src/remote/activitypub/renderer/mention.ts index 14c4c40d47..c7e62e8840 100644 --- a/src/remote/activitypub/renderer/mention.ts +++ b/src/remote/activitypub/renderer/mention.ts @@ -1,6 +1,6 @@ -import config from '@/config'; -import { User, ILocalUser } from '../../../models/entities/user'; -import { Users } from '../../../models'; +import config from '@/config/index.js'; +import { User, ILocalUser } from '@/models/entities/user.js'; +import { Users } from '@/models/index.js'; export default (mention: User) => ({ type: 'Mention', diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts index 54dee07892..0f4513fca7 100644 --- a/src/remote/activitypub/renderer/note.ts +++ b/src/remote/activitypub/renderer/note.ts @@ -1,15 +1,15 @@ -import renderDocument from './document'; -import renderHashtag from './hashtag'; -import renderMention from './mention'; -import renderEmoji from './emoji'; -import config from '@/config'; -import toHtml from '../misc/get-note-html'; -import { Note, IMentionedRemoteUsers } from '../../../models/entities/note'; -import { DriveFile } from '../../../models/entities/drive-file'; -import { DriveFiles, Notes, Users, Emojis, Polls } from '../../../models'; +import renderDocument from './document.js'; +import renderHashtag from './hashtag.js'; +import renderMention from './mention.js'; +import renderEmoji from './emoji.js'; +import config from '@/config/index.js'; +import toHtml from '../misc/get-note-html.js'; +import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { DriveFiles, Notes, Users, Emojis, Polls } from '@/models/index.js'; import { In } from 'typeorm'; -import { Emoji } from '../../../models/entities/emoji'; -import { Poll } from '../../../models/entities/poll'; +import { Emoji } from '@/models/entities/emoji.js'; +import { Poll } from '@/models/entities/poll.js'; export default async function renderNote(note: Note, dive = true, isTalk = false): Promise { const getPromisedFiles = async (ids: string[]) => { diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts index 91b91bff92..edcb68ef6a 100644 --- a/src/remote/activitypub/renderer/person.ts +++ b/src/remote/activitypub/renderer/person.ts @@ -1,16 +1,16 @@ import { URL } from 'url'; import * as mfm from 'mfm-js'; -import renderImage from './image'; -import renderKey from './key'; -import config from '@/config'; -import { ILocalUser } from '../../../models/entities/user'; -import { toHtml } from '../../../mfm/to-html'; -import { getEmojis } from './note'; -import renderEmoji from './emoji'; -import { IIdentifier } from '../models/identifier'; -import renderHashtag from './hashtag'; -import { DriveFiles, UserProfiles } from '../../../models'; -import { getUserKeypair } from '@/misc/keypair-store'; +import renderImage from './image.js'; +import renderKey from './key.js'; +import config from '@/config/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; +import { toHtml } from '../../../mfm/to-html.js'; +import { getEmojis } from './note.js'; +import renderEmoji from './emoji.js'; +import { IIdentifier } from '../models/identifier.js'; +import renderHashtag from './hashtag.js'; +import { DriveFiles, UserProfiles } from '@/models/index.js'; +import { getUserKeypair } from '@/misc/keypair-store.js'; export async function renderPerson(user: ILocalUser) { const id = `${config.url}/users/${user.id}`; diff --git a/src/remote/activitypub/renderer/question.ts b/src/remote/activitypub/renderer/question.ts index 99670f80a1..388398a7d8 100644 --- a/src/remote/activitypub/renderer/question.ts +++ b/src/remote/activitypub/renderer/question.ts @@ -1,7 +1,7 @@ -import config from '@/config'; -import { User } from '@/models/entities/user'; -import { Note } from '../../../models/entities/note'; -import { Poll } from '../../../models/entities/poll'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { Poll } from '@/models/entities/poll.js'; export default async function renderQuestion(user: { id: User['id'] }, note: Note, poll: Poll) { const question = { diff --git a/src/remote/activitypub/renderer/read.ts b/src/remote/activitypub/renderer/read.ts index 1287f4ccb0..39a852fcb5 100644 --- a/src/remote/activitypub/renderer/read.ts +++ b/src/remote/activitypub/renderer/read.ts @@ -1,6 +1,6 @@ -import config from '@/config'; -import { User } from '@/models/entities/user'; -import { MessagingMessage } from '../../../models/entities/messaging-message'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; +import { MessagingMessage } from '@/models/entities/messaging-message.js'; export const renderReadActivity = (user: { id: User['id'] }, message: MessagingMessage) => ({ type: 'Read', diff --git a/src/remote/activitypub/renderer/reject.ts b/src/remote/activitypub/renderer/reject.ts index e1eb5b004e..474b67d680 100644 --- a/src/remote/activitypub/renderer/reject.ts +++ b/src/remote/activitypub/renderer/reject.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { User } from '@/models/entities/user'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; export default (object: any, user: { id: User['id'] }) => ({ type: 'Reject', diff --git a/src/remote/activitypub/renderer/remove.ts b/src/remote/activitypub/renderer/remove.ts index ff1fab8e57..1f6bc19404 100644 --- a/src/remote/activitypub/renderer/remove.ts +++ b/src/remote/activitypub/renderer/remove.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { User } from '@/models/entities/user'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; export default (user: { id: User['id'] }, target: any, object: any) => ({ type: 'Remove', diff --git a/src/remote/activitypub/renderer/undo.ts b/src/remote/activitypub/renderer/undo.ts index 627a6533ab..968d59fae6 100644 --- a/src/remote/activitypub/renderer/undo.ts +++ b/src/remote/activitypub/renderer/undo.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { ILocalUser, User } from '../../../models/entities/user'; +import config from '@/config/index.js'; +import { ILocalUser, User } from '@/models/entities/user.js'; export default (object: any, user: { id: User['id'] }) => { if (object == null) return null; diff --git a/src/remote/activitypub/renderer/update.ts b/src/remote/activitypub/renderer/update.ts index 4295fc64f3..c696a9c34b 100644 --- a/src/remote/activitypub/renderer/update.ts +++ b/src/remote/activitypub/renderer/update.ts @@ -1,5 +1,5 @@ -import config from '@/config'; -import { User } from '@/models/entities/user'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; export default (object: any, user: { id: User['id'] }) => { const activity = { diff --git a/src/remote/activitypub/renderer/vote.ts b/src/remote/activitypub/renderer/vote.ts index 529fdaafcd..201845a189 100644 --- a/src/remote/activitypub/renderer/vote.ts +++ b/src/remote/activitypub/renderer/vote.ts @@ -1,8 +1,8 @@ -import config from '@/config'; -import { Note } from '../../../models/entities/note'; -import { IRemoteUser, User } from '../../../models/entities/user'; -import { PollVote } from '../../../models/entities/poll-vote'; -import { Poll } from '../../../models/entities/poll'; +import config from '@/config/index.js'; +import { Note } from '@/models/entities/note.js'; +import { IRemoteUser, User } from '@/models/entities/user.js'; +import { PollVote } from '@/models/entities/poll-vote.js'; +import { Poll } from '@/models/entities/poll.js'; export default async function renderVote(user: { id: User['id'] }, vote: PollVote, note: Note, poll: Poll, pollOwner: IRemoteUser): Promise { return { diff --git a/src/remote/activitypub/request.ts b/src/remote/activitypub/request.ts index e4dca32329..2711c85874 100644 --- a/src/remote/activitypub/request.ts +++ b/src/remote/activitypub/request.ts @@ -3,13 +3,13 @@ import * as https from 'https'; import { sign } from 'http-signature'; import * as crypto from 'crypto'; -import config from '@/config'; -import { User } from '@/models/entities/user'; -import { getAgentByUrl } from '@/misc/fetch'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; +import { getAgentByUrl } from '@/misc/fetch.js'; import { URL } from 'url'; import got from 'got'; import * as Got from 'got'; -import { getUserKeypair } from '@/misc/keypair-store'; +import { getUserKeypair } from '@/misc/keypair-store.js'; export default async (user: { id: User['id'] }, url: string, object: any) => { const timeout = 10 * 1000; diff --git a/src/remote/activitypub/resolver.ts b/src/remote/activitypub/resolver.ts index 066bde0883..8351058312 100644 --- a/src/remote/activitypub/resolver.ts +++ b/src/remote/activitypub/resolver.ts @@ -1,9 +1,9 @@ -import config from '@/config'; -import { getJson } from '@/misc/fetch'; -import { ILocalUser } from '../../models/entities/user'; -import { getInstanceActor } from '../../services/instance-actor'; -import { signedGet } from './request'; -import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type'; +import config from '@/config/index.js'; +import { getJson } from '@/misc/fetch.js'; +import { ILocalUser } from '@/models/entities/user.js'; +import { getInstanceActor } from '@/services/instance-actor.js'; +import { signedGet } from './request.js'; +import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type.js'; export default class Resolver { private history: Set; diff --git a/src/remote/logger.ts b/src/remote/logger.ts index d7464e7fde..4921f53bd8 100644 --- a/src/remote/logger.ts +++ b/src/remote/logger.ts @@ -1,3 +1,3 @@ -import Logger from '../services/logger'; +import Logger from '@/services/logger.js'; export const remoteLogger = new Logger('remote', 'cyan'); diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts index 1bcecee3c1..1869204399 100644 --- a/src/remote/resolve-user.ts +++ b/src/remote/resolve-user.ts @@ -1,12 +1,12 @@ import { URL } from 'url'; -import webFinger from './webfinger'; -import config from '@/config'; -import { createPerson, updatePerson } from './activitypub/models/person'; -import { remoteLogger } from './logger'; +import webFinger from './webfinger.js'; +import config from '@/config/index.js'; +import { createPerson, updatePerson } from './activitypub/models/person.js'; +import { remoteLogger } from './logger.js'; import * as chalk from 'chalk'; -import { User, IRemoteUser } from '../models/entities/user'; -import { Users } from '../models'; -import { toPuny } from '@/misc/convert-host'; +import { User, IRemoteUser } from '@/models/entities/user.js'; +import { Users } from '@/models/index.js'; +import { toPuny } from '@/misc/convert-host.js'; const logger = remoteLogger.createSubLogger('resolve-user'); diff --git a/src/remote/webfinger.ts b/src/remote/webfinger.ts index 744ab3639a..e885e9d7cb 100644 --- a/src/remote/webfinger.ts +++ b/src/remote/webfinger.ts @@ -1,6 +1,6 @@ import { URL } from 'url'; -import { getJson } from '@/misc/fetch'; -import { query as urlQuery } from '../prelude/url'; +import { getJson } from '@/misc/fetch.js'; +import { query as urlQuery } from '../prelude/url.js'; type ILink = { href: string; diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts index 0ddc4683fe..834293a5a7 100644 --- a/src/server/activitypub.ts +++ b/src/server/activitypub.ts @@ -2,22 +2,22 @@ import * as Router from '@koa/router'; import * as json from 'koa-json-body'; import * as httpSignature from 'http-signature'; -import { renderActivity } from '../remote/activitypub/renderer'; -import renderNote from '../remote/activitypub/renderer/note'; -import renderKey from '../remote/activitypub/renderer/key'; -import { renderPerson } from '../remote/activitypub/renderer/person'; -import renderEmoji from '../remote/activitypub/renderer/emoji'; -import Outbox, { packActivity } from './activitypub/outbox'; -import Followers from './activitypub/followers'; -import Following from './activitypub/following'; -import Featured from './activitypub/featured'; -import { inbox as processInbox } from '../queue'; -import { isSelfHost } from '@/misc/convert-host'; -import { Notes, Users, Emojis, NoteReactions } from '../models'; -import { ILocalUser, User } from '../models/entities/user'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderNote from '@/remote/activitypub/renderer/note.js'; +import renderKey from '@/remote/activitypub/renderer/key.js'; +import { renderPerson } from '@/remote/activitypub/renderer/person.js'; +import renderEmoji from '@/remote/activitypub/renderer/emoji.js'; +import Outbox, { packActivity } from './activitypub/outbox.js'; +import Followers from './activitypub/followers.js'; +import Following from './activitypub/following.js'; +import Featured from './activitypub/featured.js'; +import { inbox as processInbox } from '@/queue/index.js'; +import { isSelfHost } from '@/misc/convert-host.js'; +import { Notes, Users, Emojis, NoteReactions } from '@/models/index.js'; +import { ILocalUser, User } from '@/models/entities/user.js'; import { In } from 'typeorm'; -import { renderLike } from '../remote/activitypub/renderer/like'; -import { getUserKeypair } from '@/misc/keypair-store'; +import { renderLike } from '@/remote/activitypub/renderer/like.js'; +import { getUserKeypair } from '@/misc/keypair-store.js'; // Init router const router = new Router(); diff --git a/src/server/activitypub/featured.ts b/src/server/activitypub/featured.ts index 02d4a30a5d..69de201137 100644 --- a/src/server/activitypub/featured.ts +++ b/src/server/activitypub/featured.ts @@ -1,10 +1,10 @@ import * as Router from '@koa/router'; -import config from '@/config'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderOrderedCollection from '../../remote/activitypub/renderer/ordered-collection'; -import { setResponseType } from '../activitypub'; -import renderNote from '../../remote/activitypub/renderer/note'; -import { Users, Notes, UserNotePinings } from '../../models'; +import config from '@/config/index.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; +import { setResponseType } from '../activitypub.js'; +import renderNote from '@/remote/activitypub/renderer/note.js'; +import { Users, Notes, UserNotePinings } from '@/models/index.js'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; diff --git a/src/server/activitypub/followers.ts b/src/server/activitypub/followers.ts index a4f2e666d0..13a3ae91ad 100644 --- a/src/server/activitypub/followers.ts +++ b/src/server/activitypub/followers.ts @@ -1,14 +1,14 @@ import * as Router from '@koa/router'; -import config from '@/config'; +import config from '@/config/index.js'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import * as url from '../../prelude/url'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderOrderedCollection from '../../remote/activitypub/renderer/ordered-collection'; -import renderOrderedCollectionPage from '../../remote/activitypub/renderer/ordered-collection-page'; -import renderFollowUser from '../../remote/activitypub/renderer/follow-user'; -import { setResponseType } from '../activitypub'; -import { Users, Followings } from '../../models'; +import { ID } from '@/misc/cafy-id.js'; +import * as url from '../../prelude/url.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; +import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; +import renderFollowUser from '@/remote/activitypub/renderer/follow-user.js'; +import { setResponseType } from '../activitypub.js'; +import { Users, Followings } from '@/models/index.js'; import { LessThan } from 'typeorm'; export default async (ctx: Router.RouterContext) => { diff --git a/src/server/activitypub/following.ts b/src/server/activitypub/following.ts index f5e5c62364..1f7938bec4 100644 --- a/src/server/activitypub/following.ts +++ b/src/server/activitypub/following.ts @@ -1,16 +1,16 @@ import * as Router from '@koa/router'; -import config from '@/config'; +import config from '@/config/index.js'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import * as url from '../../prelude/url'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderOrderedCollection from '../../remote/activitypub/renderer/ordered-collection'; -import renderOrderedCollectionPage from '../../remote/activitypub/renderer/ordered-collection-page'; -import renderFollowUser from '../../remote/activitypub/renderer/follow-user'; -import { setResponseType } from '../activitypub'; -import { Users, Followings } from '../../models'; +import { ID } from '@/misc/cafy-id.js'; +import * as url from '../../prelude/url.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; +import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; +import renderFollowUser from '@/remote/activitypub/renderer/follow-user.js'; +import { setResponseType } from '../activitypub.js'; +import { Users, Followings } from '@/models/index.js'; import { LessThan, FindConditions } from 'typeorm'; -import { Following } from '../../models/entities/following'; +import { Following } from '@/models/entities/following.js'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; diff --git a/src/server/activitypub/outbox.ts b/src/server/activitypub/outbox.ts index 338e177370..eed489e59d 100644 --- a/src/server/activitypub/outbox.ts +++ b/src/server/activitypub/outbox.ts @@ -1,20 +1,20 @@ import * as Router from '@koa/router'; -import config from '@/config'; +import config from '@/config/index.js'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderOrderedCollection from '../../remote/activitypub/renderer/ordered-collection'; -import renderOrderedCollectionPage from '../../remote/activitypub/renderer/ordered-collection-page'; -import { setResponseType } from '../activitypub'; -import renderNote from '../../remote/activitypub/renderer/note'; -import renderCreate from '../../remote/activitypub/renderer/create'; -import renderAnnounce from '../../remote/activitypub/renderer/announce'; -import { countIf } from '../../prelude/array'; -import * as url from '../../prelude/url'; -import { Users, Notes } from '../../models'; -import { makePaginationQuery } from '../api/common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; +import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; +import { setResponseType } from '../activitypub.js'; +import renderNote from '@/remote/activitypub/renderer/note.js'; +import renderCreate from '@/remote/activitypub/renderer/create.js'; +import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; +import { countIf } from '../../prelude/array.js'; +import * as url from '../../prelude/url.js'; +import { Users, Notes } from '@/models/index.js'; +import { makePaginationQuery } from '../api/common/make-pagination-query.js'; import { Brackets } from 'typeorm'; -import { Note } from '../../models/entities/note'; +import { Note } from '@/models/entities/note.js'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; diff --git a/src/server/api/2fa.ts b/src/server/api/2fa.ts index 77f0f8cd04..ee92caf55a 100644 --- a/src/server/api/2fa.ts +++ b/src/server/api/2fa.ts @@ -1,5 +1,5 @@ import * as crypto from 'crypto'; -import config from '@/config'; +import config from '@/config/index.js'; import * as jsrsasign from 'jsrsasign'; const ECC_PRELUDE = Buffer.from([0x04]); diff --git a/src/server/api/api-handler.ts b/src/server/api/api-handler.ts index cbace8917e..e2660d7b6f 100644 --- a/src/server/api/api-handler.ts +++ b/src/server/api/api-handler.ts @@ -1,9 +1,9 @@ import * as Koa from 'koa'; -import { IEndpoint } from './endpoints'; -import authenticate, { AuthenticationError } from './authenticate'; -import call from './call'; -import { ApiError } from './error'; +import { IEndpoint } from './endpoints.js'; +import authenticate, { AuthenticationError } from './authenticate.js'; +import call from './call.js'; +import { ApiError } from './error.js'; export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise((res) => { const body = ctx.request.body; diff --git a/src/server/api/authenticate.ts b/src/server/api/authenticate.ts index 6148ad33c5..cd5b01cd51 100644 --- a/src/server/api/authenticate.ts +++ b/src/server/api/authenticate.ts @@ -1,7 +1,7 @@ -import isNativeToken from './common/is-native-token'; -import { User } from '../../models/entities/user'; -import { Users, AccessTokens, Apps } from '../../models'; -import { AccessToken } from '../../models/entities/access-token'; +import isNativeToken from './common/is-native-token.js'; +import { User } from '@/models/entities/user.js'; +import { Users, AccessTokens, Apps } from '@/models/index.js'; +import { AccessToken } from '@/models/entities/access-token.js'; export class AuthenticationError extends Error { constructor(message: string) { diff --git a/src/server/api/call.ts b/src/server/api/call.ts index d50b6a1222..899a5a6c72 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -1,10 +1,10 @@ import { performance } from 'perf_hooks'; -import limiter from './limiter'; -import { User } from '../../models/entities/user'; -import endpoints from './endpoints'; -import { ApiError } from './error'; -import { apiLogger } from './logger'; -import { AccessToken } from '../../models/entities/access-token'; +import limiter from './limiter.js'; +import { User } from '@/models/entities/user.js'; +import endpoints from './endpoints.js'; +import { ApiError } from './error.js'; +import { apiLogger } from './logger.js'; +import { AccessToken } from '@/models/entities/access-token.js'; const accessDenied = { message: 'Access denied.', diff --git a/src/server/api/common/generate-block-query.ts b/src/server/api/common/generate-block-query.ts index 016da57aac..60db1e731b 100644 --- a/src/server/api/common/generate-block-query.ts +++ b/src/server/api/common/generate-block-query.ts @@ -1,5 +1,5 @@ -import { User } from '../../../models/entities/user'; -import { Blockings } from '../../../models'; +import { User } from '@/models/entities/user.js'; +import { Blockings } from '@/models/index.js'; import { Brackets, SelectQueryBuilder } from 'typeorm'; // ここでいうBlockedは被Blockedの意 diff --git a/src/server/api/common/generate-channel-query.ts b/src/server/api/common/generate-channel-query.ts index 74a6d68c40..333bb73b86 100644 --- a/src/server/api/common/generate-channel-query.ts +++ b/src/server/api/common/generate-channel-query.ts @@ -1,5 +1,5 @@ -import { User } from '../../../models/entities/user'; -import { ChannelFollowings } from '../../../models'; +import { User } from '@/models/entities/user.js'; +import { ChannelFollowings } from '@/models/index.js'; import { Brackets, SelectQueryBuilder } from 'typeorm'; export function generateChannelQuery(q: SelectQueryBuilder, me?: { id: User['id'] } | null) { diff --git a/src/server/api/common/generate-muted-note-query.ts b/src/server/api/common/generate-muted-note-query.ts index c7f9f7c5a3..f544e334d3 100644 --- a/src/server/api/common/generate-muted-note-query.ts +++ b/src/server/api/common/generate-muted-note-query.ts @@ -1,5 +1,5 @@ -import { User } from '../../../models/entities/user'; -import { MutedNotes } from '../../../models'; +import { User } from '@/models/entities/user.js'; +import { MutedNotes } from '@/models/index.js'; import { SelectQueryBuilder } from 'typeorm'; export function generateMutedNoteQuery(q: SelectQueryBuilder, me: { id: User['id'] }) { diff --git a/src/server/api/common/generate-muted-user-query.ts b/src/server/api/common/generate-muted-user-query.ts index f5e072ba93..79cb3ff894 100644 --- a/src/server/api/common/generate-muted-user-query.ts +++ b/src/server/api/common/generate-muted-user-query.ts @@ -1,5 +1,5 @@ -import { User } from '../../../models/entities/user'; -import { Mutings } from '../../../models'; +import { User } from '@/models/entities/user.js'; +import { Mutings } from '@/models/index.js'; import { SelectQueryBuilder, Brackets } from 'typeorm'; export function generateMutedUserQuery(q: SelectQueryBuilder, me: { id: User['id'] }, exclude?: User) { diff --git a/src/server/api/common/generate-native-user-token.ts b/src/server/api/common/generate-native-user-token.ts index 1f791c57ce..5d8a4c5378 100644 --- a/src/server/api/common/generate-native-user-token.ts +++ b/src/server/api/common/generate-native-user-token.ts @@ -1,3 +1,3 @@ -import { secureRndstr } from '@/misc/secure-rndstr'; +import { secureRndstr } from '@/misc/secure-rndstr.js'; export default () => secureRndstr(16, true); diff --git a/src/server/api/common/generate-replies-query.ts b/src/server/api/common/generate-replies-query.ts index 29b1e17c2e..e59a3334ef 100644 --- a/src/server/api/common/generate-replies-query.ts +++ b/src/server/api/common/generate-replies-query.ts @@ -1,4 +1,4 @@ -import { User } from '../../../models/entities/user'; +import { User } from '@/models/entities/user.js'; import { Brackets, SelectQueryBuilder } from 'typeorm'; export function generateRepliesQuery(q: SelectQueryBuilder, me?: { id: User['id'] } | null) { diff --git a/src/server/api/common/generate-visibility-query.ts b/src/server/api/common/generate-visibility-query.ts index 00a50f8211..715982934c 100644 --- a/src/server/api/common/generate-visibility-query.ts +++ b/src/server/api/common/generate-visibility-query.ts @@ -1,5 +1,5 @@ -import { User } from '../../../models/entities/user'; -import { Followings } from '../../../models'; +import { User } from '@/models/entities/user.js'; +import { Followings } from '@/models/index.js'; import { Brackets, SelectQueryBuilder } from 'typeorm'; export function generateVisibilityQuery(q: SelectQueryBuilder, me?: { id: User['id'] } | null) { diff --git a/src/server/api/common/getters.ts b/src/server/api/common/getters.ts index 73fbadfee6..c5a47876d0 100644 --- a/src/server/api/common/getters.ts +++ b/src/server/api/common/getters.ts @@ -1,7 +1,7 @@ -import { IdentifiableError } from '@/misc/identifiable-error'; -import { User } from '../../../models/entities/user'; -import { Note } from '../../../models/entities/note'; -import { Notes, Users } from '../../../models'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { User } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { Notes, Users } from '@/models/index.js'; /** * Get note for API processing diff --git a/src/server/api/common/inject-featured.ts b/src/server/api/common/inject-featured.ts index 3659b7f2b2..b7dd8028b5 100644 --- a/src/server/api/common/inject-featured.ts +++ b/src/server/api/common/inject-featured.ts @@ -1,9 +1,9 @@ import rndstr from 'rndstr'; -import { Note } from '../../../models/entities/note'; -import { User } from '../../../models/entities/user'; -import { Notes, UserProfiles, NoteReactions } from '../../../models'; -import { generateMutedUserQuery } from './generate-muted-user-query'; -import { generateBlockedUserQuery } from './generate-block-query'; +import { Note } from '@/models/entities/note.js'; +import { User } from '@/models/entities/user.js'; +import { Notes, UserProfiles, NoteReactions } from '@/models/index.js'; +import { generateMutedUserQuery } from './generate-muted-user-query.js'; +import { generateBlockedUserQuery } from './generate-block-query.js'; // TODO: リアクション、Renote、返信などをしたノートは除外する diff --git a/src/server/api/common/inject-promo.ts b/src/server/api/common/inject-promo.ts index 2c16ca4cf7..971770f32a 100644 --- a/src/server/api/common/inject-promo.ts +++ b/src/server/api/common/inject-promo.ts @@ -1,7 +1,7 @@ import rndstr from 'rndstr'; -import { Note } from '../../../models/entities/note'; -import { User } from '../../../models/entities/user'; -import { PromoReads, PromoNotes, Notes, Users } from '../../../models'; +import { Note } from '@/models/entities/note.js'; +import { User } from '@/models/entities/user.js'; +import { PromoReads, PromoNotes, Notes, Users } from '@/models/index.js'; export async function injectPromo(timeline: Note[], user?: User | null) { if (timeline.length < 5) return; diff --git a/src/server/api/common/read-messaging-message.ts b/src/server/api/common/read-messaging-message.ts index 6c9fcf973f..638aff3d58 100644 --- a/src/server/api/common/read-messaging-message.ts +++ b/src/server/api/common/read-messaging-message.ts @@ -1,17 +1,17 @@ -import { publishMainStream, publishGroupMessagingStream } from '../../../services/stream'; -import { publishMessagingStream } from '../../../services/stream'; -import { publishMessagingIndexStream } from '../../../services/stream'; -import { User, IRemoteUser } from '../../../models/entities/user'; -import { MessagingMessage } from '../../../models/entities/messaging-message'; -import { MessagingMessages, UserGroupJoinings, Users } from '../../../models'; +import { publishMainStream, publishGroupMessagingStream } from '@/services/stream.js'; +import { publishMessagingStream } from '@/services/stream.js'; +import { publishMessagingIndexStream } from '@/services/stream.js'; +import { User, IRemoteUser } from '@/models/entities/user.js'; +import { MessagingMessage } from '@/models/entities/messaging-message.js'; +import { MessagingMessages, UserGroupJoinings, Users } from '@/models/index.js'; import { In } from 'typeorm'; -import { IdentifiableError } from '@/misc/identifiable-error'; -import { UserGroup } from '../../../models/entities/user-group'; -import { toArray } from '../../../prelude/array'; -import { renderReadActivity } from '../../../remote/activitypub/renderer/read'; -import { renderActivity } from '../../../remote/activitypub/renderer'; -import { deliver } from '../../../queue'; -import orderedCollection from '../../../remote/activitypub/renderer/ordered-collection'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { UserGroup } from '@/models/entities/user-group.js'; +import { toArray } from '../../../prelude/array.js'; +import { renderReadActivity } from '@/remote/activitypub/renderer/read.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { deliver } from '@/queue/index.js'; +import orderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; /** * Mark messages as read diff --git a/src/server/api/common/read-notification.ts b/src/server/api/common/read-notification.ts index effa61e8b5..ce958c479f 100644 --- a/src/server/api/common/read-notification.ts +++ b/src/server/api/common/read-notification.ts @@ -1,7 +1,7 @@ -import { publishMainStream } from '../../../services/stream'; -import { User } from '../../../models/entities/user'; -import { Notification } from '../../../models/entities/notification'; -import { Notifications, Users } from '../../../models'; +import { publishMainStream } from '@/services/stream.js'; +import { User } from '@/models/entities/user.js'; +import { Notification } from '@/models/entities/notification.js'; +import { Notifications, Users } from '@/models/index.js'; import { In } from 'typeorm'; export async function readNotification( diff --git a/src/server/api/common/signin.ts b/src/server/api/common/signin.ts index af09a70340..adc5aafe85 100644 --- a/src/server/api/common/signin.ts +++ b/src/server/api/common/signin.ts @@ -1,10 +1,10 @@ import * as Koa from 'koa'; -import config from '@/config'; -import { ILocalUser } from '../../../models/entities/user'; -import { Signins } from '../../../models'; -import { genId } from '@/misc/gen-id'; -import { publishMainStream } from '../../../services/stream'; +import config from '@/config/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; +import { Signins } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { publishMainStream } from '@/services/stream.js'; export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) { if (redirect) { diff --git a/src/server/api/common/signup.ts b/src/server/api/common/signup.ts index b8d197317a..c5605e2b8f 100644 --- a/src/server/api/common/signup.ts +++ b/src/server/api/common/signup.ts @@ -1,15 +1,15 @@ import * as bcrypt from 'bcryptjs'; import { generateKeyPair } from 'crypto'; -import generateUserToken from './generate-native-user-token'; -import { User } from '../../../models/entities/user'; -import { Users, UsedUsernames } from '../../../models'; -import { UserProfile } from '../../../models/entities/user-profile'; +import generateUserToken from './generate-native-user-token.js'; +import { User } from '@/models/entities/user.js'; +import { Users, UsedUsernames } from '@/models/index.js'; +import { UserProfile } from '@/models/entities/user-profile.js'; import { getConnection } from 'typeorm'; -import { genId } from '@/misc/gen-id'; -import { toPunyNullable } from '@/misc/convert-host'; -import { UserKeypair } from '../../../models/entities/user-keypair'; -import { usersChart } from '../../../services/chart'; -import { UsedUsername } from '../../../models/entities/used-username'; +import { genId } from '@/misc/gen-id.js'; +import { toPunyNullable } from '@/misc/convert-host.js'; +import { UserKeypair } from '@/models/entities/user-keypair.js'; +import { usersChart } from '@/services/chart/index.js'; +import { UsedUsername } from '@/models/entities/used-username.js'; export async function signup(username: User['username'], password: UserProfile['password'], host: string | null = null) { // Validate username diff --git a/src/server/api/define.ts b/src/server/api/define.ts index cba69cfdc4..18e8f62016 100644 --- a/src/server/api/define.ts +++ b/src/server/api/define.ts @@ -1,9 +1,9 @@ import * as fs from 'fs'; -import { ILocalUser } from '../../models/entities/user'; -import { IEndpointMeta } from './endpoints'; -import { ApiError } from './error'; -import { SchemaType } from '@/misc/schema'; -import { AccessToken } from '../../models/entities/access-token'; +import { ILocalUser } from '@/models/entities/user.js'; +import { IEndpointMeta } from './endpoints.js'; +import { ApiError } from './error.js'; +import { SchemaType } from '@/misc/schema.js'; +import { AccessToken } from '@/models/entities/access-token.js'; type NonOptional = T extends undefined ? never : T; diff --git a/src/server/api/endpoints.ts b/src/server/api/endpoints.ts index 24b58b873c..4c0baf2242 100644 --- a/src/server/api/endpoints.ts +++ b/src/server/api/endpoints.ts @@ -1,7 +1,13 @@ +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; import { Context } from 'cafy'; import * as path from 'path'; import * as glob from 'glob'; -import { Schema } from '@/misc/schema'; +import { Schema } from '@/misc/schema.js'; + +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); export type Param = { validator: Context; @@ -102,7 +108,7 @@ export interface IEndpoint { } const files = glob.sync('**/*.js', { - cwd: path.resolve(__dirname + '/endpoints/') + cwd: path.resolve(_dirname + '/endpoints/') }); const endpoints: IEndpoint[] = files.map(f => { diff --git a/src/server/api/endpoints/admin/abuse-user-reports.ts b/src/server/api/endpoints/admin/abuse-user-reports.ts index 02291a3edd..5bc5618ab3 100644 --- a/src/server/api/endpoints/admin/abuse-user-reports.ts +++ b/src/server/api/endpoints/admin/abuse-user-reports.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { AbuseUserReports } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { AbuseUserReports } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/accounts/create.ts b/src/server/api/endpoints/admin/accounts/create.ts index bceb210a82..f9a6c10b87 100644 --- a/src/server/api/endpoints/admin/accounts/create.ts +++ b/src/server/api/endpoints/admin/accounts/create.ts @@ -1,6 +1,6 @@ -import define from '../../../define'; -import { Users } from '../../../../../models'; -import { signup } from '../../../common/signup'; +import define from '../../../define.js'; +import { Users } from '@/models/index.js'; +import { signup } from '../../../common/signup.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/create.ts b/src/server/api/endpoints/admin/ad/create.ts index 337114a3fa..55cc037182 100644 --- a/src/server/api/endpoints/admin/ad/create.ts +++ b/src/server/api/endpoints/admin/ad/create.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Ads } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import define from '../../../define.js'; +import { Ads } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/delete.ts b/src/server/api/endpoints/admin/ad/delete.ts index 6a5f92193e..9f11f968ee 100644 --- a/src/server/api/endpoints/admin/ad/delete.ts +++ b/src/server/api/endpoints/admin/ad/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { Ads } from '../../../../../models'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Ads } from '@/models/index.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/list.ts b/src/server/api/endpoints/admin/ad/list.ts index a323f2a9ed..a2d843ec16 100644 --- a/src/server/api/endpoints/admin/ad/list.ts +++ b/src/server/api/endpoints/admin/ad/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { Ads } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { Ads } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/update.ts b/src/server/api/endpoints/admin/ad/update.ts index 71e6054a88..2d7a32585d 100644 --- a/src/server/api/endpoints/admin/ad/update.ts +++ b/src/server/api/endpoints/admin/ad/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { Ads } from '../../../../../models'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Ads } from '@/models/index.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/create.ts b/src/server/api/endpoints/admin/announcements/create.ts index 794c35023b..ab1b9a3c20 100644 --- a/src/server/api/endpoints/admin/announcements/create.ts +++ b/src/server/api/endpoints/admin/announcements/create.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Announcements } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import define from '../../../define.js'; +import { Announcements } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/delete.ts b/src/server/api/endpoints/admin/announcements/delete.ts index 6c28054da8..52d7cb26c5 100644 --- a/src/server/api/endpoints/admin/announcements/delete.ts +++ b/src/server/api/endpoints/admin/announcements/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { Announcements } from '../../../../../models'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Announcements } from '@/models/index.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/list.ts b/src/server/api/endpoints/admin/announcements/list.ts index a14f0c0bdc..ff62b7806a 100644 --- a/src/server/api/endpoints/admin/announcements/list.ts +++ b/src/server/api/endpoints/admin/announcements/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { Announcements, AnnouncementReads } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { Announcements, AnnouncementReads } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/update.ts b/src/server/api/endpoints/admin/announcements/update.ts index 6e9a43d346..e45a185ad6 100644 --- a/src/server/api/endpoints/admin/announcements/update.ts +++ b/src/server/api/endpoints/admin/announcements/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { Announcements } from '../../../../../models'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Announcements } from '@/models/index.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts index 3d49689cd7..9001e01a1a 100644 --- a/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts +++ b/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { deleteFile } from '../../../../services/drive/delete-file'; -import { DriveFiles } from '../../../../models'; -import { ID } from '@/misc/cafy-id'; +import define from '../../define.js'; +import { deleteFile } from '@/services/drive/delete-file.js'; +import { DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/delete-logs.ts b/src/server/api/endpoints/admin/delete-logs.ts index 410588bc01..be3f58d738 100644 --- a/src/server/api/endpoints/admin/delete-logs.ts +++ b/src/server/api/endpoints/admin/delete-logs.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { Logs } from '../../../../models'; +import define from '../../define.js'; +import { Logs } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/src/server/api/endpoints/admin/drive/clean-remote-files.ts index 5a5adb8a8b..f945f0f049 100644 --- a/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { createCleanRemoteFilesJob } from '../../../../../queue'; +import define from '../../../define.js'; +import { createCleanRemoteFilesJob } from '@/queue/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/cleanup.ts b/src/server/api/endpoints/admin/drive/cleanup.ts index b76236a7f0..d5ad221a62 100644 --- a/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/src/server/api/endpoints/admin/drive/cleanup.ts @@ -1,7 +1,7 @@ import { IsNull } from 'typeorm'; -import define from '../../../define'; -import { deleteFile } from '../../../../../services/drive/delete-file'; -import { DriveFiles } from '../../../../../models'; +import define from '../../../define.js'; +import { deleteFile } from '@/services/drive/delete-file.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/files.ts b/src/server/api/endpoints/admin/drive/files.ts index efeef83ca3..65980bfea2 100644 --- a/src/server/api/endpoints/admin/drive/files.ts +++ b/src/server/api/endpoints/admin/drive/files.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { DriveFiles } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; -import { ID } from '@/misc/cafy-id'; +import define from '../../../define.js'; +import { DriveFiles } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/show-file.ts b/src/server/api/endpoints/admin/drive/show-file.ts index 3489e5c816..9dfa0cacf9 100644 --- a/src/server/api/endpoints/admin/drive/show-file.ts +++ b/src/server/api/endpoints/admin/drive/show-file.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFiles } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/add.ts b/src/server/api/endpoints/admin/emoji/add.ts index 0d4550bf3c..b797fb30a3 100644 --- a/src/server/api/endpoints/admin/emoji/add.ts +++ b/src/server/api/endpoints/admin/emoji/add.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Emojis, DriveFiles } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import define from '../../../define.js'; +import { Emojis, DriveFiles } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; import { getConnection } from 'typeorm'; -import { insertModerationLog } from '../../../../../services/insert-moderation-log'; -import { ApiError } from '../../../error'; -import { ID } from '@/misc/cafy-id'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { ApiError } from '../../../error.js'; +import { ID } from '@/misc/cafy-id.js'; import rndstr from 'rndstr'; -import { publishBroadcastStream } from '../../../../../services/stream'; +import { publishBroadcastStream } from '@/services/stream.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/copy.ts b/src/server/api/endpoints/admin/emoji/copy.ts index 72c2b014a4..4c5f7bf36c 100644 --- a/src/server/api/endpoints/admin/emoji/copy.ts +++ b/src/server/api/endpoints/admin/emoji/copy.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Emojis } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import define from '../../../define.js'; +import { Emojis } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; import { getConnection } from 'typeorm'; -import { ApiError } from '../../../error'; -import { DriveFile } from '../../../../../models/entities/drive-file'; -import { ID } from '@/misc/cafy-id'; -import uploadFromUrl from '../../../../../services/drive/upload-from-url'; -import { publishBroadcastStream } from '@/services/stream'; +import { ApiError } from '../../../error.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { ID } from '@/misc/cafy-id.js'; +import uploadFromUrl from '@/services/drive/upload-from-url.js'; +import { publishBroadcastStream } from '@/services/stream.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/list-remote.ts b/src/server/api/endpoints/admin/emoji/list-remote.ts index 570db064ec..cc284123b5 100644 --- a/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Emojis } from '../../../../../models'; -import { toPuny } from '@/misc/convert-host'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; -import { ID } from '@/misc/cafy-id'; +import define from '../../../define.js'; +import { Emojis } from '@/models/index.js'; +import { toPuny } from '@/misc/convert-host.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/list.ts b/src/server/api/endpoints/admin/emoji/list.ts index b864fed4b0..da72ac13e7 100644 --- a/src/server/api/endpoints/admin/emoji/list.ts +++ b/src/server/api/endpoints/admin/emoji/list.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Emojis } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; -import { ID } from '@/misc/cafy-id'; -import { Emoji } from '../../../../../models/entities/emoji'; +import define from '../../../define.js'; +import { Emojis } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Emoji } from '@/models/entities/emoji.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/remove.ts b/src/server/api/endpoints/admin/emoji/remove.ts index 22bbc76e78..d81c0b9bbd 100644 --- a/src/server/api/endpoints/admin/emoji/remove.ts +++ b/src/server/api/endpoints/admin/emoji/remove.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { Emojis } from '../../../../../models'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Emojis } from '@/models/index.js'; import { getConnection } from 'typeorm'; -import { insertModerationLog } from '../../../../../services/insert-moderation-log'; -import { ApiError } from '../../../error'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/update.ts b/src/server/api/endpoints/admin/emoji/update.ts index 70589d5cf7..912c96c7dc 100644 --- a/src/server/api/endpoints/admin/emoji/update.ts +++ b/src/server/api/endpoints/admin/emoji/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { Emojis } from '../../../../../models'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Emojis } from '@/models/index.js'; import { getConnection } from 'typeorm'; -import { ApiError } from '../../../error'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/delete-all-files.ts b/src/server/api/endpoints/admin/federation/delete-all-files.ts index eef53cd92c..f32c6b9776 100644 --- a/src/server/api/endpoints/admin/federation/delete-all-files.ts +++ b/src/server/api/endpoints/admin/federation/delete-all-files.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { deleteFile } from '../../../../../services/drive/delete-file'; -import { DriveFiles } from '../../../../../models'; +import define from '../../../define.js'; +import { deleteFile } from '@/services/drive/delete-file.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index 65b3b6e260..125be42e80 100644 --- a/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Instances } from '../../../../../models'; -import { toPuny } from '@/misc/convert-host'; -import { fetchInstanceMetadata } from '../../../../../services/fetch-instance-metadata'; +import define from '../../../define.js'; +import { Instances } from '@/models/index.js'; +import { toPuny } from '@/misc/convert-host.js'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/remove-all-following.ts b/src/server/api/endpoints/admin/federation/remove-all-following.ts index e593193552..6b3d621c8b 100644 --- a/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import deleteFollowing from '../../../../../services/following/delete'; -import { Followings, Users } from '../../../../../models'; +import define from '../../../define.js'; +import deleteFollowing from '@/services/following/delete.js'; +import { Followings, Users } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/update-instance.ts b/src/server/api/endpoints/admin/federation/update-instance.ts index 2d559e43e8..b5f13027a3 100644 --- a/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/src/server/api/endpoints/admin/federation/update-instance.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Instances } from '../../../../../models'; -import { toPuny } from '@/misc/convert-host'; +import define from '../../../define.js'; +import { Instances } from '@/models/index.js'; +import { toPuny } from '@/misc/convert-host.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/get-index-stats.ts b/src/server/api/endpoints/admin/get-index-stats.ts index f2b06d0ef2..e7e8d0b219 100644 --- a/src/server/api/endpoints/admin/get-index-stats.ts +++ b/src/server/api/endpoints/admin/get-index-stats.ts @@ -1,4 +1,4 @@ -import define from '../../define'; +import define from '../../define.js'; import { getConnection } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/admin/get-table-stats.ts b/src/server/api/endpoints/admin/get-table-stats.ts index bce813232b..c7f2a614b0 100644 --- a/src/server/api/endpoints/admin/get-table-stats.ts +++ b/src/server/api/endpoints/admin/get-table-stats.ts @@ -1,4 +1,4 @@ -import define from '../../define'; +import define from '../../define.js'; import { getConnection } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/admin/invite.ts b/src/server/api/endpoints/admin/invite.ts index 141f27d95e..0a63b69ee9 100644 --- a/src/server/api/endpoints/admin/invite.ts +++ b/src/server/api/endpoints/admin/invite.ts @@ -1,7 +1,7 @@ import rndstr from 'rndstr'; -import define from '../../define'; -import { RegistrationTickets } from '../../../../models'; -import { genId } from '@/misc/gen-id'; +import define from '../../define.js'; +import { RegistrationTickets } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/logs.ts b/src/server/api/endpoints/admin/logs.ts index 1ec7320399..e0d97b4abe 100644 --- a/src/server/api/endpoints/admin/logs.ts +++ b/src/server/api/endpoints/admin/logs.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { Logs } from '../../../../models'; +import define from '../../define.js'; +import { Logs } from '@/models/index.js'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/admin/moderators/add.ts b/src/server/api/endpoints/admin/moderators/add.ts index 2b4e8a8014..bff9b63359 100644 --- a/src/server/api/endpoints/admin/moderators/add.ts +++ b/src/server/api/endpoints/admin/moderators/add.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { Users } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/moderators/remove.ts b/src/server/api/endpoints/admin/moderators/remove.ts index fd6e29df54..cacb788b4d 100644 --- a/src/server/api/endpoints/admin/moderators/remove.ts +++ b/src/server/api/endpoints/admin/moderators/remove.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { Users } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/promo/create.ts b/src/server/api/endpoints/admin/promo/create.ts index 8468ab6545..faba458fed 100644 --- a/src/server/api/endpoints/admin/promo/create.ts +++ b/src/server/api/endpoints/admin/promo/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getNote } from '../../../common/getters'; -import { PromoNotes } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getNote } from '../../../common/getters.js'; +import { PromoNotes } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/clear.ts b/src/server/api/endpoints/admin/queue/clear.ts index 0375f55f01..4bab2f20cd 100644 --- a/src/server/api/endpoints/admin/queue/clear.ts +++ b/src/server/api/endpoints/admin/queue/clear.ts @@ -1,6 +1,6 @@ -import define from '../../../define'; -import { destroy } from '../../../../../queue'; -import { insertModerationLog } from '../../../../../services/insert-moderation-log'; +import define from '../../../define.js'; +import { destroy } from '@/queue/index.js'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/src/server/api/endpoints/admin/queue/deliver-delayed.ts index cd7b640983..ed34228108 100644 --- a/src/server/api/endpoints/admin/queue/deliver-delayed.ts +++ b/src/server/api/endpoints/admin/queue/deliver-delayed.ts @@ -1,6 +1,6 @@ -import { deliverQueue } from '@/queue/queues'; +import { deliverQueue } from '@/queue/queues.js'; import { URL } from 'url'; -import define from '../../../define'; +import define from '../../../define.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/src/server/api/endpoints/admin/queue/inbox-delayed.ts index 119976c680..8870722f23 100644 --- a/src/server/api/endpoints/admin/queue/inbox-delayed.ts +++ b/src/server/api/endpoints/admin/queue/inbox-delayed.ts @@ -1,6 +1,6 @@ import { URL } from 'url'; -import define from '../../../define'; -import { inboxQueue } from '../../../../../queue'; +import define from '../../../define.js'; +import { inboxQueue } from '@/queue/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/jobs.ts b/src/server/api/endpoints/admin/queue/jobs.ts index c426e5f39b..164379f721 100644 --- a/src/server/api/endpoints/admin/queue/jobs.ts +++ b/src/server/api/endpoints/admin/queue/jobs.ts @@ -1,6 +1,6 @@ -import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues'; +import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues.js'; import $ from 'cafy'; -import define from '../../../define'; +import define from '../../../define.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/stats.ts b/src/server/api/endpoints/admin/queue/stats.ts index 38f18459dd..60a3416c39 100644 --- a/src/server/api/endpoints/admin/queue/stats.ts +++ b/src/server/api/endpoints/admin/queue/stats.ts @@ -1,5 +1,5 @@ -import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues'; -import define from '../../../define'; +import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues.js'; +import define from '../../../define.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/relays/add.ts b/src/server/api/endpoints/admin/relays/add.ts index 54d292ad55..e3b9a8afcb 100644 --- a/src/server/api/endpoints/admin/relays/add.ts +++ b/src/server/api/endpoints/admin/relays/add.ts @@ -1,8 +1,8 @@ import { URL } from 'url'; import $ from 'cafy'; -import define from '../../../define'; -import { addRelay } from '../../../../../services/relay'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { addRelay } from '@/services/relay.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/relays/list.ts b/src/server/api/endpoints/admin/relays/list.ts index 9f2474f10c..1707b8cd34 100644 --- a/src/server/api/endpoints/admin/relays/list.ts +++ b/src/server/api/endpoints/admin/relays/list.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { listRelay } from '../../../../../services/relay'; +import define from '../../../define.js'; +import { listRelay } from '@/services/relay.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/relays/remove.ts b/src/server/api/endpoints/admin/relays/remove.ts index 220efab406..406257fdf2 100644 --- a/src/server/api/endpoints/admin/relays/remove.ts +++ b/src/server/api/endpoints/admin/relays/remove.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { removeRelay } from '../../../../../services/relay'; +import define from '../../../define.js'; +import { removeRelay } from '@/services/relay.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/reset-password.ts b/src/server/api/endpoints/admin/reset-password.ts index 6ff49d83d5..0bc32e07a1 100644 --- a/src/server/api/endpoints/admin/reset-password.ts +++ b/src/server/api/endpoints/admin/reset-password.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; import * as bcrypt from 'bcryptjs'; import rndstr from 'rndstr'; -import { Users, UserProfiles } from '../../../../models'; +import { Users, UserProfiles } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index 38a5e81375..4c7ef37923 100644 --- a/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { AbuseUserReports } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { AbuseUserReports } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/resync-chart.ts b/src/server/api/endpoints/admin/resync-chart.ts index 84e19d37e6..613cdbdfad 100644 --- a/src/server/api/endpoints/admin/resync-chart.ts +++ b/src/server/api/endpoints/admin/resync-chart.ts @@ -1,6 +1,6 @@ -import define from '../../define'; -import { driveChart, notesChart, usersChart, instanceChart } from '../../../../services/chart'; -import { insertModerationLog } from '../../../../services/insert-moderation-log'; +import define from '../../define.js'; +import { driveChart, notesChart, usersChart, instanceChart } from '@/services/chart/index.js'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/send-email.ts b/src/server/api/endpoints/admin/send-email.ts index c0e77e1621..353add59ba 100644 --- a/src/server/api/endpoints/admin/send-email.ts +++ b/src/server/api/endpoints/admin/send-email.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { sendEmail } from '../../../../services/send-email'; +import define from '../../define.js'; +import { sendEmail } from '@/services/send-email.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/server-info.ts b/src/server/api/endpoints/admin/server-info.ts index bb2d35e397..daac6395ea 100644 --- a/src/server/api/endpoints/admin/server-info.ts +++ b/src/server/api/endpoints/admin/server-info.ts @@ -1,8 +1,8 @@ import * as os from 'os'; import * as si from 'systeminformation'; import { getConnection } from 'typeorm'; -import define from '../../define'; -import { redisClient } from '../../../../db/redis'; +import define from '../../define.js'; +import { redisClient } from '../../../../db/redis.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/admin/show-moderation-logs.ts b/src/server/api/endpoints/admin/show-moderation-logs.ts index cfceab9463..833c49ee64 100644 --- a/src/server/api/endpoints/admin/show-moderation-logs.ts +++ b/src/server/api/endpoints/admin/show-moderation-logs.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ModerationLogs } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ModerationLogs } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/show-user.ts b/src/server/api/endpoints/admin/show-user.ts index b1132ac207..e4935fe90f 100644 --- a/src/server/api/endpoints/admin/show-user.ts +++ b/src/server/api/endpoints/admin/show-user.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Users } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/show-users.ts b/src/server/api/endpoints/admin/show-users.ts index 7ea0e0e864..0ac2112f4b 100644 --- a/src/server/api/endpoints/admin/show-users.ts +++ b/src/server/api/endpoints/admin/show-users.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { Users } from '../../../../models'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/silence-user.ts b/src/server/api/endpoints/admin/silence-user.ts index 73f9d03b70..0a2b080aa4 100644 --- a/src/server/api/endpoints/admin/silence-user.ts +++ b/src/server/api/endpoints/admin/silence-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Users } from '../../../../models'; -import { insertModerationLog } from '../../../../services/insert-moderation-log'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/suspend-user.ts b/src/server/api/endpoints/admin/suspend-user.ts index 912d6a5162..8026b9ec83 100644 --- a/src/server/api/endpoints/admin/suspend-user.ts +++ b/src/server/api/endpoints/admin/suspend-user.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import deleteFollowing from '../../../../services/following/delete'; -import { Users, Followings, Notifications } from '../../../../models'; -import { User } from '../../../../models/entities/user'; -import { insertModerationLog } from '../../../../services/insert-moderation-log'; -import { doPostSuspend } from '../../../../services/suspend-user'; -import { publishUserEvent } from '@/services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import deleteFollowing from '@/services/following/delete.js'; +import { Users, Followings, Notifications } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { doPostSuspend } from '@/services/suspend-user.js'; +import { publishUserEvent } from '@/services/stream.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/unsilence-user.ts b/src/server/api/endpoints/admin/unsilence-user.ts index 6083d87afc..1e581df494 100644 --- a/src/server/api/endpoints/admin/unsilence-user.ts +++ b/src/server/api/endpoints/admin/unsilence-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Users } from '../../../../models'; -import { insertModerationLog } from '../../../../services/insert-moderation-log'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/unsuspend-user.ts b/src/server/api/endpoints/admin/unsuspend-user.ts index 6d015b51ab..e839377435 100644 --- a/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/src/server/api/endpoints/admin/unsuspend-user.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Users } from '../../../../models'; -import { insertModerationLog } from '../../../../services/insert-moderation-log'; -import { doPostUnsuspend } from '../../../../services/unsuspend-user'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { doPostUnsuspend } from '@/services/unsuspend-user.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/update-meta.ts b/src/server/api/endpoints/admin/update-meta.ts index 573f22822c..2d34b5a219 100644 --- a/src/server/api/endpoints/admin/update-meta.ts +++ b/src/server/api/endpoints/admin/update-meta.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../define'; +import define from '../../define.js'; import { getConnection } from 'typeorm'; -import { Meta } from '../../../../models/entities/meta'; -import { insertModerationLog } from '../../../../services/insert-moderation-log'; -import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; -import { ID } from '@/misc/cafy-id'; +import { Meta } from '@/models/entities/meta.js'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits.js'; +import { ID } from '@/misc/cafy-id.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/vacuum.ts b/src/server/api/endpoints/admin/vacuum.ts index e041e65431..9ff9711a00 100644 --- a/src/server/api/endpoints/admin/vacuum.ts +++ b/src/server/api/endpoints/admin/vacuum.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; +import define from '../../define.js'; import { getConnection } from 'typeorm'; -import { insertModerationLog } from '../../../../services/insert-moderation-log'; +import { insertModerationLog } from '@/services/insert-moderation-log.js'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/announcements.ts b/src/server/api/endpoints/announcements.ts index 124682909c..83a8b3a71c 100644 --- a/src/server/api/endpoints/announcements.ts +++ b/src/server/api/endpoints/announcements.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../define'; -import { Announcements, AnnouncementReads } from '../../../models'; -import { makePaginationQuery } from '../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../define.js'; +import { Announcements, AnnouncementReads } from '@/models/index.js'; +import { makePaginationQuery } from '../common/make-pagination-query.js'; export const meta = { tags: ['meta'], diff --git a/src/server/api/endpoints/antennas/create.ts b/src/server/api/endpoints/antennas/create.ts index bff3c09f1c..2310ee6d51 100644 --- a/src/server/api/endpoints/antennas/create.ts +++ b/src/server/api/endpoints/antennas/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../define'; -import { genId } from '@/misc/gen-id'; -import { Antennas, UserLists, UserGroupJoinings } from '../../../../models'; -import { ID } from '@/misc/cafy-id'; -import { ApiError } from '../../error'; -import { publishInternalEvent } from '../../../../services/stream'; +import define from '../../define.js'; +import { genId } from '@/misc/gen-id.js'; +import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; +import { ApiError } from '../../error.js'; +import { publishInternalEvent } from '@/services/stream.js'; export const meta = { tags: ['antennas'], diff --git a/src/server/api/endpoints/antennas/delete.ts b/src/server/api/endpoints/antennas/delete.ts index 10a212897b..59a29a9511 100644 --- a/src/server/api/endpoints/antennas/delete.ts +++ b/src/server/api/endpoints/antennas/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Antennas } from '../../../../models'; -import { publishInternalEvent } from '../../../../services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Antennas } from '@/models/index.js'; +import { publishInternalEvent } from '@/services/stream.js'; export const meta = { tags: ['antennas'], diff --git a/src/server/api/endpoints/antennas/list.ts b/src/server/api/endpoints/antennas/list.ts index 6ae3c0cbb2..eceec945aa 100644 --- a/src/server/api/endpoints/antennas/list.ts +++ b/src/server/api/endpoints/antennas/list.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { Antennas } from '../../../../models'; +import define from '../../define.js'; +import { Antennas } from '@/models/index.js'; export const meta = { tags: ['antennas', 'account'], diff --git a/src/server/api/endpoints/antennas/notes.ts b/src/server/api/endpoints/antennas/notes.ts index aadb4261e3..11f69f354b 100644 --- a/src/server/api/endpoints/antennas/notes.ts +++ b/src/server/api/endpoints/antennas/notes.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Antennas, Notes, AntennaNotes } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { ApiError } from '../../error'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Antennas, Notes, AntennaNotes } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { ApiError } from '../../error.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['antennas', 'account', 'notes'], diff --git a/src/server/api/endpoints/antennas/show.ts b/src/server/api/endpoints/antennas/show.ts index 36045e47a4..0d9a716bf4 100644 --- a/src/server/api/endpoints/antennas/show.ts +++ b/src/server/api/endpoints/antennas/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Antennas } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Antennas } from '@/models/index.js'; export const meta = { tags: ['antennas', 'account'], diff --git a/src/server/api/endpoints/antennas/update.ts b/src/server/api/endpoints/antennas/update.ts index 9194c14795..37f3b01641 100644 --- a/src/server/api/endpoints/antennas/update.ts +++ b/src/server/api/endpoints/antennas/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Antennas, UserLists, UserGroupJoinings } from '../../../../models'; -import { publishInternalEvent } from '../../../../services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js'; +import { publishInternalEvent } from '@/services/stream.js'; export const meta = { tags: ['antennas'], diff --git a/src/server/api/endpoints/ap/get.ts b/src/server/api/endpoints/ap/get.ts index f2b4c2408f..33734b7cbd 100644 --- a/src/server/api/endpoints/ap/get.ts +++ b/src/server/api/endpoints/ap/get.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import Resolver from '../../../../remote/activitypub/resolver'; -import { ApiError } from '../../error'; +import define from '../../define.js'; +import Resolver from '@/remote/activitypub/resolver.js'; +import { ApiError } from '../../error.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/ap/show.ts b/src/server/api/endpoints/ap/show.ts index 7f61055bfa..0472d28a65 100644 --- a/src/server/api/endpoints/ap/show.ts +++ b/src/server/api/endpoints/ap/show.ts @@ -1,16 +1,16 @@ import $ from 'cafy'; -import define from '../../define'; -import config from '@/config'; -import { createPerson } from '../../../../remote/activitypub/models/person'; -import { createNote } from '../../../../remote/activitypub/models/note'; -import Resolver from '../../../../remote/activitypub/resolver'; -import { ApiError } from '../../error'; -import { extractDbHost } from '@/misc/convert-host'; -import { Users, Notes } from '../../../../models'; -import { Note } from '../../../../models/entities/note'; -import { User } from '../../../../models/entities/user'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { isActor, isPost, getApId } from '../../../../remote/activitypub/type'; +import define from '../../define.js'; +import config from '@/config/index.js'; +import { createPerson } from '@/remote/activitypub/models/person.js'; +import { createNote } from '@/remote/activitypub/models/note.js'; +import Resolver from '@/remote/activitypub/resolver.js'; +import { ApiError } from '../../error.js'; +import { extractDbHost } from '@/misc/convert-host.js'; +import { Users, Notes } from '@/models/index.js'; +import { Note } from '@/models/entities/note.js'; +import { User } from '@/models/entities/user.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { isActor, isPost, getApId } from '@/remote/activitypub/type.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts index 500567bf29..f013fa91ca 100644 --- a/src/server/api/endpoints/app/create.ts +++ b/src/server/api/endpoints/app/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../define'; -import { Apps } from '../../../../models'; -import { genId } from '@/misc/gen-id'; -import { unique } from '../../../../prelude/array'; -import { secureRndstr } from '@/misc/secure-rndstr'; +import define from '../../define.js'; +import { Apps } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { unique } from '../../../../prelude/array.js'; +import { secureRndstr } from '@/misc/secure-rndstr.js'; export const meta = { tags: ['app'], diff --git a/src/server/api/endpoints/app/show.ts b/src/server/api/endpoints/app/show.ts index 65f8c77981..919d65b12f 100644 --- a/src/server/api/endpoints/app/show.ts +++ b/src/server/api/endpoints/app/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Apps } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Apps } from '@/models/index.js'; export const meta = { tags: ['app'], diff --git a/src/server/api/endpoints/auth/accept.ts b/src/server/api/endpoints/auth/accept.ts index ee0d0421c9..e4fcb6dc42 100644 --- a/src/server/api/endpoints/auth/accept.ts +++ b/src/server/api/endpoints/auth/accept.ts @@ -1,10 +1,10 @@ import * as crypto from 'crypto'; import $ from 'cafy'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { AuthSessions, AccessTokens, Apps } from '../../../../models'; -import { genId } from '@/misc/gen-id'; -import { secureRndstr } from '@/misc/secure-rndstr'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { AuthSessions, AccessTokens, Apps } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { secureRndstr } from '@/misc/secure-rndstr.js'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/auth/session/generate.ts b/src/server/api/endpoints/auth/session/generate.ts index 42f9e25c78..4ea5967b08 100644 --- a/src/server/api/endpoints/auth/session/generate.ts +++ b/src/server/api/endpoints/auth/session/generate.ts @@ -1,10 +1,10 @@ import { v4 as uuid } from 'uuid'; import $ from 'cafy'; -import config from '@/config'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { Apps, AuthSessions } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import config from '@/config/index.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { Apps, AuthSessions } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/auth/session/show.ts b/src/server/api/endpoints/auth/session/show.ts index fd20884c02..420facb8fb 100644 --- a/src/server/api/endpoints/auth/session/show.ts +++ b/src/server/api/endpoints/auth/session/show.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { AuthSessions } from '../../../../../models'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { AuthSessions } from '@/models/index.js'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/auth/session/userkey.ts b/src/server/api/endpoints/auth/session/userkey.ts index 7059aacbea..240ff57f1e 100644 --- a/src/server/api/endpoints/auth/session/userkey.ts +++ b/src/server/api/endpoints/auth/session/userkey.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { Apps, AuthSessions, AccessTokens, Users } from '../../../../../models'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { Apps, AuthSessions, AccessTokens, Users } from '@/models/index.js'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/blocking/create.ts b/src/server/api/endpoints/blocking/create.ts index dd976a7bf1..c82b6eb920 100644 --- a/src/server/api/endpoints/blocking/create.ts +++ b/src/server/api/endpoints/blocking/create.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; +import { ID } from '@/misc/cafy-id.js'; import * as ms from 'ms'; -import create from '../../../../services/blocking/create'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { Blockings, NoteWatchings, Users } from '../../../../models'; +import create from '@/services/blocking/create.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { Blockings, NoteWatchings, Users } from '@/models/index.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/blocking/delete.ts b/src/server/api/endpoints/blocking/delete.ts index c69c8b14a7..9d075f272c 100644 --- a/src/server/api/endpoints/blocking/delete.ts +++ b/src/server/api/endpoints/blocking/delete.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; +import { ID } from '@/misc/cafy-id.js'; import * as ms from 'ms'; -import deleteBlocking from '../../../../services/blocking/delete'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { Blockings, Users } from '../../../../models'; +import deleteBlocking from '@/services/blocking/delete.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { Blockings, Users } from '@/models/index.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/blocking/list.ts b/src/server/api/endpoints/blocking/list.ts index db849338ac..a616d0b7c1 100644 --- a/src/server/api/endpoints/blocking/list.ts +++ b/src/server/api/endpoints/blocking/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Blockings } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Blockings } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/channels/create.ts b/src/server/api/endpoints/channels/create.ts index c6dc68faf8..48348cf35a 100644 --- a/src/server/api/endpoints/channels/create.ts +++ b/src/server/api/endpoints/channels/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Channels, DriveFiles } from '../../../../models'; -import { Channel } from '../../../../models/entities/channel'; -import { genId } from '@/misc/gen-id'; -import { ID } from '@/misc/cafy-id'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Channels, DriveFiles } from '@/models/index.js'; +import { Channel } from '@/models/entities/channel.js'; +import { genId } from '@/misc/gen-id.js'; +import { ID } from '@/misc/cafy-id.js'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/featured.ts b/src/server/api/endpoints/channels/featured.ts index abb0a19e2d..7cfc33e639 100644 --- a/src/server/api/endpoints/channels/featured.ts +++ b/src/server/api/endpoints/channels/featured.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { Channels } from '../../../../models'; +import define from '../../define.js'; +import { Channels } from '@/models/index.js'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/follow.ts b/src/server/api/endpoints/channels/follow.ts index b264f7451a..37fb8ff1b4 100644 --- a/src/server/api/endpoints/channels/follow.ts +++ b/src/server/api/endpoints/channels/follow.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Channels, ChannelFollowings } from '../../../../models'; -import { genId } from '@/misc/gen-id'; -import { publishUserEvent } from '../../../../services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Channels, ChannelFollowings } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { publishUserEvent } from '@/services/stream.js'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/followed.ts b/src/server/api/endpoints/channels/followed.ts index 7f0cfe4941..7fc83c933d 100644 --- a/src/server/api/endpoints/channels/followed.ts +++ b/src/server/api/endpoints/channels/followed.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Channels, ChannelFollowings } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Channels, ChannelFollowings } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['channels', 'account'], diff --git a/src/server/api/endpoints/channels/owned.ts b/src/server/api/endpoints/channels/owned.ts index 4f538f651e..2f08e52615 100644 --- a/src/server/api/endpoints/channels/owned.ts +++ b/src/server/api/endpoints/channels/owned.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Channels } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Channels } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['channels', 'account'], diff --git a/src/server/api/endpoints/channels/show.ts b/src/server/api/endpoints/channels/show.ts index d5f182da11..f2c351f557 100644 --- a/src/server/api/endpoints/channels/show.ts +++ b/src/server/api/endpoints/channels/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Channels } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Channels } from '@/models/index.js'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/timeline.ts b/src/server/api/endpoints/channels/timeline.ts index 9e5ecdeeb3..3032e7ee6f 100644 --- a/src/server/api/endpoints/channels/timeline.ts +++ b/src/server/api/endpoints/channels/timeline.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Notes, Channels } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { activeUsersChart } from '../../../../services/chart'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Notes, Channels } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { activeUsersChart } from '@/services/chart/index.js'; export const meta = { tags: ['notes', 'channels'], diff --git a/src/server/api/endpoints/channels/unfollow.ts b/src/server/api/endpoints/channels/unfollow.ts index 116af50337..1c2ab307af 100644 --- a/src/server/api/endpoints/channels/unfollow.ts +++ b/src/server/api/endpoints/channels/unfollow.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Channels, ChannelFollowings } from '../../../../models'; -import { publishUserEvent } from '../../../../services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Channels, ChannelFollowings } from '@/models/index.js'; +import { publishUserEvent } from '@/services/stream.js'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/update.ts b/src/server/api/endpoints/channels/update.ts index 1495297ee5..255c664307 100644 --- a/src/server/api/endpoints/channels/update.ts +++ b/src/server/api/endpoints/channels/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Channels, DriveFiles } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Channels, DriveFiles } from '@/models/index.js'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/charts/active-users.ts b/src/server/api/endpoints/charts/active-users.ts index fb177e5c94..dc080d3bc6 100644 --- a/src/server/api/endpoints/charts/active-users.ts +++ b/src/server/api/endpoints/charts/active-users.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { activeUsersChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { activeUsersChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'users'], diff --git a/src/server/api/endpoints/charts/drive.ts b/src/server/api/endpoints/charts/drive.ts index ba6556c597..5bad71a9fa 100644 --- a/src/server/api/endpoints/charts/drive.ts +++ b/src/server/api/endpoints/charts/drive.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { driveChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { driveChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'drive'], diff --git a/src/server/api/endpoints/charts/federation.ts b/src/server/api/endpoints/charts/federation.ts index 46eb87ac02..83ec290023 100644 --- a/src/server/api/endpoints/charts/federation.ts +++ b/src/server/api/endpoints/charts/federation.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { federationChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { federationChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts'], diff --git a/src/server/api/endpoints/charts/hashtag.ts b/src/server/api/endpoints/charts/hashtag.ts index 5c2875ddd2..12d3c2ba4c 100644 --- a/src/server/api/endpoints/charts/hashtag.ts +++ b/src/server/api/endpoints/charts/hashtag.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { hashtagChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { hashtagChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'hashtags'], diff --git a/src/server/api/endpoints/charts/instance.ts b/src/server/api/endpoints/charts/instance.ts index 9375992d21..ed3f8bbe93 100644 --- a/src/server/api/endpoints/charts/instance.ts +++ b/src/server/api/endpoints/charts/instance.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { instanceChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { instanceChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts'], diff --git a/src/server/api/endpoints/charts/network.ts b/src/server/api/endpoints/charts/network.ts index d1fd404239..a4700f045a 100644 --- a/src/server/api/endpoints/charts/network.ts +++ b/src/server/api/endpoints/charts/network.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { networkChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { networkChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts'], diff --git a/src/server/api/endpoints/charts/notes.ts b/src/server/api/endpoints/charts/notes.ts index 7141fe3b0a..7c92a11882 100644 --- a/src/server/api/endpoints/charts/notes.ts +++ b/src/server/api/endpoints/charts/notes.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { notesChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { notesChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'notes'], diff --git a/src/server/api/endpoints/charts/user/drive.ts b/src/server/api/endpoints/charts/user/drive.ts index bacb022c81..8649ac69c7 100644 --- a/src/server/api/endpoints/charts/user/drive.ts +++ b/src/server/api/endpoints/charts/user/drive.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { convertLog } from '../../../../../services/chart/core'; -import { perUserDriveChart } from '../../../../../services/chart'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { convertLog } from '@/services/chart/core.js'; +import { perUserDriveChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'drive', 'users'], diff --git a/src/server/api/endpoints/charts/user/following.ts b/src/server/api/endpoints/charts/user/following.ts index ce41c231ba..8905be2d9b 100644 --- a/src/server/api/endpoints/charts/user/following.ts +++ b/src/server/api/endpoints/charts/user/following.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { convertLog } from '../../../../../services/chart/core'; -import { perUserFollowingChart } from '../../../../../services/chart'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { convertLog } from '@/services/chart/core.js'; +import { perUserFollowingChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'users', 'following'], diff --git a/src/server/api/endpoints/charts/user/notes.ts b/src/server/api/endpoints/charts/user/notes.ts index 470b7274bd..9c6152fa9e 100644 --- a/src/server/api/endpoints/charts/user/notes.ts +++ b/src/server/api/endpoints/charts/user/notes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { convertLog } from '../../../../../services/chart/core'; -import { perUserNotesChart } from '../../../../../services/chart'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { convertLog } from '@/services/chart/core.js'; +import { perUserNotesChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'users', 'notes'], diff --git a/src/server/api/endpoints/charts/user/reactions.ts b/src/server/api/endpoints/charts/user/reactions.ts index 4ebe4623c0..28629a0259 100644 --- a/src/server/api/endpoints/charts/user/reactions.ts +++ b/src/server/api/endpoints/charts/user/reactions.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ID } from '@/misc/cafy-id'; -import { convertLog } from '../../../../../services/chart/core'; -import { perUserReactionsChart } from '../../../../../services/chart'; +import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { convertLog } from '@/services/chart/core.js'; +import { perUserReactionsChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'users', 'reactions'], diff --git a/src/server/api/endpoints/charts/users.ts b/src/server/api/endpoints/charts/users.ts index 4246a18e59..8d312e1a14 100644 --- a/src/server/api/endpoints/charts/users.ts +++ b/src/server/api/endpoints/charts/users.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { convertLog } from '../../../../services/chart/core'; -import { usersChart } from '../../../../services/chart'; +import define from '../../define.js'; +import { convertLog } from '@/services/chart/core.js'; +import { usersChart } from '@/services/chart/index.js'; export const meta = { tags: ['charts', 'users'], diff --git a/src/server/api/endpoints/clips/add-note.ts b/src/server/api/endpoints/clips/add-note.ts index 3d72def4f5..909d05bc82 100644 --- a/src/server/api/endpoints/clips/add-note.ts +++ b/src/server/api/endpoints/clips/add-note.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ClipNotes, Clips } from '../../../../models'; -import { ApiError } from '../../error'; -import { genId } from '@/misc/gen-id'; -import { getNote } from '../../common/getters'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ClipNotes, Clips } from '@/models/index.js'; +import { ApiError } from '../../error.js'; +import { genId } from '@/misc/gen-id.js'; +import { getNote } from '../../common/getters.js'; export const meta = { tags: ['account', 'notes', 'clips'], diff --git a/src/server/api/endpoints/clips/create.ts b/src/server/api/endpoints/clips/create.ts index fb2a77fe5b..06286ed8ec 100644 --- a/src/server/api/endpoints/clips/create.ts +++ b/src/server/api/endpoints/clips/create.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { genId } from '@/misc/gen-id'; -import { Clips } from '../../../../models'; +import define from '../../define.js'; +import { genId } from '@/misc/gen-id.js'; +import { Clips } from '@/models/index.js'; export const meta = { tags: ['clips'], diff --git a/src/server/api/endpoints/clips/delete.ts b/src/server/api/endpoints/clips/delete.ts index 20b2addb76..93e69dae34 100644 --- a/src/server/api/endpoints/clips/delete.ts +++ b/src/server/api/endpoints/clips/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Clips } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Clips } from '@/models/index.js'; export const meta = { tags: ['clips'], diff --git a/src/server/api/endpoints/clips/list.ts b/src/server/api/endpoints/clips/list.ts index 6b90b114df..1eeac8b45b 100644 --- a/src/server/api/endpoints/clips/list.ts +++ b/src/server/api/endpoints/clips/list.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { Clips } from '../../../../models'; +import define from '../../define.js'; +import { Clips } from '@/models/index.js'; export const meta = { tags: ['clips', 'account'], diff --git a/src/server/api/endpoints/clips/notes.ts b/src/server/api/endpoints/clips/notes.ts index 4bece5a2c8..41fa2b2bcc 100644 --- a/src/server/api/endpoints/clips/notes.ts +++ b/src/server/api/endpoints/clips/notes.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ClipNotes, Clips, Notes } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { ApiError } from '../../error'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ClipNotes, Clips, Notes } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { ApiError } from '../../error.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['account', 'notes', 'clips'], diff --git a/src/server/api/endpoints/clips/show.ts b/src/server/api/endpoints/clips/show.ts index 43d2719129..ab368e6a09 100644 --- a/src/server/api/endpoints/clips/show.ts +++ b/src/server/api/endpoints/clips/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Clips } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Clips } from '@/models/index.js'; export const meta = { tags: ['clips', 'account'], diff --git a/src/server/api/endpoints/clips/update.ts b/src/server/api/endpoints/clips/update.ts index a368174e76..07a9d585c7 100644 --- a/src/server/api/endpoints/clips/update.ts +++ b/src/server/api/endpoints/clips/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Clips } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Clips } from '@/models/index.js'; export const meta = { tags: ['clips'], diff --git a/src/server/api/endpoints/drive.ts b/src/server/api/endpoints/drive.ts index 2feb72ae12..6a99cd1246 100644 --- a/src/server/api/endpoints/drive.ts +++ b/src/server/api/endpoints/drive.ts @@ -1,6 +1,6 @@ -import define from '../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { DriveFiles } from '../../../models'; +import define from '../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['drive', 'account'], diff --git a/src/server/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts index 1e821b0085..60cf3eb948 100644 --- a/src/server/api/endpoints/drive/files.ts +++ b/src/server/api/endpoints/drive/files.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { DriveFiles } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { DriveFiles } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/attached-notes.ts b/src/server/api/endpoints/drive/files/attached-notes.ts index dafbf30fbb..5aafe0ea1f 100644 --- a/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/src/server/api/endpoints/drive/files/attached-notes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFiles, Notes } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFiles, Notes } from '@/models/index.js'; export const meta = { tags: ['drive', 'notes'], diff --git a/src/server/api/endpoints/drive/files/check-existence.ts b/src/server/api/endpoints/drive/files/check-existence.ts index b20be44072..a53a4f7f91 100644 --- a/src/server/api/endpoints/drive/files/check-existence.ts +++ b/src/server/api/endpoints/drive/files/check-existence.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { DriveFiles } from '../../../../../models'; +import define from '../../../define.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/create.ts b/src/server/api/endpoints/drive/files/create.ts index a8f6b92014..1f7b712439 100644 --- a/src/server/api/endpoints/drive/files/create.ts +++ b/src/server/api/endpoints/drive/files/create.ts @@ -1,11 +1,11 @@ import * as ms from 'ms'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import create from '../../../../../services/drive/add-file'; -import define from '../../../define'; -import { apiLogger } from '../../../logger'; -import { ApiError } from '../../../error'; -import { DriveFiles } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import create from '@/services/drive/add-file.js'; +import define from '../../../define.js'; +import { apiLogger } from '../../../logger.js'; +import { ApiError } from '../../../error.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/delete.ts b/src/server/api/endpoints/drive/files/delete.ts index 520078948c..ae1381ee13 100644 --- a/src/server/api/endpoints/drive/files/delete.ts +++ b/src/server/api/endpoints/drive/files/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { deleteFile } from '../../../../../services/drive/delete-file'; -import { publishDriveStream } from '../../../../../services/stream'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFiles } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { deleteFile } from '@/services/drive/delete-file.js'; +import { publishDriveStream } from '@/services/stream.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/find-by-hash.ts b/src/server/api/endpoints/drive/files/find-by-hash.ts index ef0077392e..492a7ee593 100644 --- a/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { DriveFiles } from '../../../../../models'; +import define from '../../../define.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/find.ts b/src/server/api/endpoints/drive/files/find.ts index b7f2571453..724424500d 100644 --- a/src/server/api/endpoints/drive/files/find.ts +++ b/src/server/api/endpoints/drive/files/find.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { DriveFiles } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/drive/files/show.ts b/src/server/api/endpoints/drive/files/show.ts index 33e88fa817..7a2ea1b76f 100644 --- a/src/server/api/endpoints/drive/files/show.ts +++ b/src/server/api/endpoints/drive/files/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFile } from '../../../../../models/entities/drive-file'; -import { DriveFiles } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/update.ts b/src/server/api/endpoints/drive/files/update.ts index 29b4ba7a45..d75da00119 100644 --- a/src/server/api/endpoints/drive/files/update.ts +++ b/src/server/api/endpoints/drive/files/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishDriveStream } from '../../../../../services/stream'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFiles, DriveFolders } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { publishDriveStream } from '@/services/stream.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFiles, DriveFolders } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/upload-from-url.ts b/src/server/api/endpoints/drive/files/upload-from-url.ts index 8dfc86e660..5f0c461dc3 100644 --- a/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; +import { ID } from '@/misc/cafy-id.js'; import * as ms from 'ms'; -import uploadFromUrl from '../../../../../services/drive/upload-from-url'; -import define from '../../../define'; -import { DriveFiles } from '../../../../../models'; -import { publishMainStream } from '../../../../../services/stream'; +import uploadFromUrl from '@/services/drive/upload-from-url.js'; +import define from '../../../define.js'; +import { DriveFiles } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders.ts b/src/server/api/endpoints/drive/folders.ts index c446d546cc..5e0561d579 100644 --- a/src/server/api/endpoints/drive/folders.ts +++ b/src/server/api/endpoints/drive/folders.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { DriveFolders } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { DriveFolders } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/create.ts b/src/server/api/endpoints/drive/folders/create.ts index e39f8f2cee..5167ac0d19 100644 --- a/src/server/api/endpoints/drive/folders/create.ts +++ b/src/server/api/endpoints/drive/folders/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishDriveStream } from '../../../../../services/stream'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFolders } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import { ID } from '@/misc/cafy-id.js'; +import { publishDriveStream } from '@/services/stream.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFolders } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/delete.ts b/src/server/api/endpoints/drive/folders/delete.ts index 253563a3ef..3f2ef8f2c0 100644 --- a/src/server/api/endpoints/drive/folders/delete.ts +++ b/src/server/api/endpoints/drive/folders/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { publishDriveStream } from '../../../../../services/stream'; -import { ApiError } from '../../../error'; -import { DriveFolders, DriveFiles } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { publishDriveStream } from '@/services/stream.js'; +import { ApiError } from '../../../error.js'; +import { DriveFolders, DriveFiles } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/find.ts b/src/server/api/endpoints/drive/folders/find.ts index c8e7639e63..7299dceccf 100644 --- a/src/server/api/endpoints/drive/folders/find.ts +++ b/src/server/api/endpoints/drive/folders/find.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { DriveFolders } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { DriveFolders } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/show.ts b/src/server/api/endpoints/drive/folders/show.ts index fe1326da75..7d46e853ba 100644 --- a/src/server/api/endpoints/drive/folders/show.ts +++ b/src/server/api/endpoints/drive/folders/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFolders } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFolders } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/update.ts b/src/server/api/endpoints/drive/folders/update.ts index 9dfe33517e..6598b6a8a4 100644 --- a/src/server/api/endpoints/drive/folders/update.ts +++ b/src/server/api/endpoints/drive/folders/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishDriveStream } from '../../../../../services/stream'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { DriveFolders } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { publishDriveStream } from '@/services/stream.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { DriveFolders } from '@/models/index.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index ca88acf5fe..da70b7b36c 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { DriveFiles } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { DriveFiles } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/endpoint.ts b/src/server/api/endpoints/endpoint.ts index 1a04d8bee8..c8fb0f5f34 100644 --- a/src/server/api/endpoints/endpoint.ts +++ b/src/server/api/endpoints/endpoint.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../define'; -import endpoints from '../endpoints'; +import define from '../define.js'; +import endpoints from '../endpoints.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/endpoints.ts b/src/server/api/endpoints/endpoints.ts index f7b9757d8d..cd7bf45c4f 100644 --- a/src/server/api/endpoints/endpoints.ts +++ b/src/server/api/endpoints/endpoints.ts @@ -1,5 +1,5 @@ -import define from '../define'; -import endpoints from '../endpoints'; +import define from '../define.js'; +import endpoints from '../endpoints.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/federation/dns.ts b/src/server/api/endpoints/federation/dns.ts index a188f46ac1..4605cd5576 100644 --- a/src/server/api/endpoints/federation/dns.ts +++ b/src/server/api/endpoints/federation/dns.ts @@ -1,8 +1,8 @@ import { promises as dns } from 'dns'; import $ from 'cafy'; -import define from '../../define'; -import { Instances } from '../../../../models'; -import { toPuny } from '@/misc/convert-host'; +import define from '../../define.js'; +import { Instances } from '@/models/index.js'; +import { toPuny } from '@/misc/convert-host.js'; const resolver = new dns.Resolver(); resolver.setServers(['1.1.1.1']); diff --git a/src/server/api/endpoints/federation/followers.ts b/src/server/api/endpoints/federation/followers.ts index 727eada682..1c74f45030 100644 --- a/src/server/api/endpoints/federation/followers.ts +++ b/src/server/api/endpoints/federation/followers.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Followings } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Followings } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/following.ts b/src/server/api/endpoints/federation/following.ts index c6bc71a982..b30f67af39 100644 --- a/src/server/api/endpoints/federation/following.ts +++ b/src/server/api/endpoints/federation/following.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Followings } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Followings } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/instances.ts b/src/server/api/endpoints/federation/instances.ts index 29515f0eb4..f16c04f5d5 100644 --- a/src/server/api/endpoints/federation/instances.ts +++ b/src/server/api/endpoints/federation/instances.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import config from '@/config'; -import define from '../../define'; -import { Instances } from '../../../../models'; -import { fetchMeta } from '@/misc/fetch-meta'; +import config from '@/config/index.js'; +import define from '../../define.js'; +import { Instances } from '@/models/index.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/show-instance.ts b/src/server/api/endpoints/federation/show-instance.ts index 549d7340fb..d613a940ab 100644 --- a/src/server/api/endpoints/federation/show-instance.ts +++ b/src/server/api/endpoints/federation/show-instance.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { Instances } from '../../../../models'; -import { toPuny } from '@/misc/convert-host'; +import define from '../../define.js'; +import { Instances } from '@/models/index.js'; +import { toPuny } from '@/misc/convert-host.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/update-remote-user.ts b/src/server/api/endpoints/federation/update-remote-user.ts index c4a6db0dd2..b8a383410d 100644 --- a/src/server/api/endpoints/federation/update-remote-user.ts +++ b/src/server/api/endpoints/federation/update-remote-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { getRemoteUser } from '../../common/getters'; -import { updatePerson } from '../../../../remote/activitypub/models/person'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { getRemoteUser } from '../../common/getters.js'; +import { updatePerson } from '@/remote/activitypub/models/person.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/users.ts b/src/server/api/endpoints/federation/users.ts index 77d9e2e076..9c7390b68e 100644 --- a/src/server/api/endpoints/federation/users.ts +++ b/src/server/api/endpoints/federation/users.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Users } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/following/create.ts b/src/server/api/endpoints/following/create.ts index e4f9a86d99..91b49b481d 100644 --- a/src/server/api/endpoints/following/create.ts +++ b/src/server/api/endpoints/following/create.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; +import { ID } from '@/misc/cafy-id.js'; import * as ms from 'ms'; -import create from '../../../../services/following/create'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { Followings, Users } from '../../../../models'; +import create from '@/services/following/create.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { Followings, Users } from '@/models/index.js'; export const meta = { tags: ['following', 'users'], diff --git a/src/server/api/endpoints/following/delete.ts b/src/server/api/endpoints/following/delete.ts index e164cb25c9..7b2d006f4f 100644 --- a/src/server/api/endpoints/following/delete.ts +++ b/src/server/api/endpoints/following/delete.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; +import { ID } from '@/misc/cafy-id.js'; import * as ms from 'ms'; -import deleteFollowing from '../../../../services/following/delete'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { Followings, Users } from '../../../../models'; +import deleteFollowing from '@/services/following/delete.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { Followings, Users } from '@/models/index.js'; export const meta = { tags: ['following', 'users'], diff --git a/src/server/api/endpoints/following/requests/accept.ts b/src/server/api/endpoints/following/requests/accept.ts index aa7085c53f..bf3c315c3c 100644 --- a/src/server/api/endpoints/following/requests/accept.ts +++ b/src/server/api/endpoints/following/requests/accept.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import acceptFollowRequest from '../../../../../services/following/requests/accept'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; +import { ID } from '@/misc/cafy-id.js'; +import acceptFollowRequest from '@/services/following/requests/accept.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/following/requests/cancel.ts b/src/server/api/endpoints/following/requests/cancel.ts index 09056f2620..37e4c73096 100644 --- a/src/server/api/endpoints/following/requests/cancel.ts +++ b/src/server/api/endpoints/following/requests/cancel.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import cancelFollowRequest from '../../../../../services/following/requests/cancel'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { Users } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import cancelFollowRequest from '@/services/following/requests/cancel.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/following/requests/list.ts b/src/server/api/endpoints/following/requests/list.ts index bf3bfc68fa..1d6880d35d 100644 --- a/src/server/api/endpoints/following/requests/list.ts +++ b/src/server/api/endpoints/following/requests/list.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { FollowRequests } from '../../../../../models'; +import define from '../../../define.js'; +import { FollowRequests } from '@/models/index.js'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/following/requests/reject.ts b/src/server/api/endpoints/following/requests/reject.ts index 1685a86137..5e41473545 100644 --- a/src/server/api/endpoints/following/requests/reject.ts +++ b/src/server/api/endpoints/following/requests/reject.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import rejectFollowRequest from '../../../../../services/following/requests/reject'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; +import { ID } from '@/misc/cafy-id.js'; +import rejectFollowRequest from '@/services/following/requests/reject.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/gallery/featured.ts b/src/server/api/endpoints/gallery/featured.ts index d09000cc71..6e8118850c 100644 --- a/src/server/api/endpoints/gallery/featured.ts +++ b/src/server/api/endpoints/gallery/featured.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { GalleryPosts } from '../../../../models'; +import define from '../../define.js'; +import { GalleryPosts } from '@/models/index.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/popular.ts b/src/server/api/endpoints/gallery/popular.ts index e240b14d27..6c3db479c3 100644 --- a/src/server/api/endpoints/gallery/popular.ts +++ b/src/server/api/endpoints/gallery/popular.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { GalleryPosts } from '../../../../models'; +import define from '../../define.js'; +import { GalleryPosts } from '@/models/index.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts.ts b/src/server/api/endpoints/gallery/posts.ts index 656765d80a..625070ca29 100644 --- a/src/server/api/endpoints/gallery/posts.ts +++ b/src/server/api/endpoints/gallery/posts.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { GalleryPosts } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { GalleryPosts } from '@/models/index.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/create.ts b/src/server/api/endpoints/gallery/posts/create.ts index ed24a45f88..e1c7345171 100644 --- a/src/server/api/endpoints/gallery/posts/create.ts +++ b/src/server/api/endpoints/gallery/posts/create.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../../define'; -import { ID } from '../../../../../misc/cafy-id'; -import { DriveFiles, GalleryPosts } from '../../../../../models'; -import { genId } from '../../../../../misc/gen-id'; -import { GalleryPost } from '../../../../../models/entities/gallery-post'; -import { ApiError } from '../../../error'; -import { DriveFile } from '@/models/entities/drive-file'; +import define from '../../../define.js'; +import { ID } from '../../../../../misc/cafy-id.js'; +import { DriveFiles, GalleryPosts } from '@/models/index.js'; +import { genId } from '../../../../../misc/gen-id.js'; +import { GalleryPost } from '@/models/entities/gallery-post.js'; +import { ApiError } from '../../../error.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/delete.ts b/src/server/api/endpoints/gallery/posts/delete.ts index 8b54828b20..65819206c8 100644 --- a/src/server/api/endpoints/gallery/posts/delete.ts +++ b/src/server/api/endpoints/gallery/posts/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { GalleryPosts } from '../../../../../models'; -import { ID } from '@/misc/cafy-id'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { GalleryPosts } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/like.ts b/src/server/api/endpoints/gallery/posts/like.ts index 3bf37c13e3..80ec1b8745 100644 --- a/src/server/api/endpoints/gallery/posts/like.ts +++ b/src/server/api/endpoints/gallery/posts/like.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { GalleryPosts, GalleryLikes } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { GalleryPosts, GalleryLikes } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/show.ts b/src/server/api/endpoints/gallery/posts/show.ts index 17628544b7..777fb76e3a 100644 --- a/src/server/api/endpoints/gallery/posts/show.ts +++ b/src/server/api/endpoints/gallery/posts/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { GalleryPosts } from '@/models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { GalleryPosts } from '@/models/index.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/unlike.ts b/src/server/api/endpoints/gallery/posts/unlike.ts index 155949ae3d..1ddafcec90 100644 --- a/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/src/server/api/endpoints/gallery/posts/unlike.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { GalleryPosts, GalleryLikes } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { GalleryPosts, GalleryLikes } from '@/models/index.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/update.ts b/src/server/api/endpoints/gallery/posts/update.ts index d9176ea407..5906f29e86 100644 --- a/src/server/api/endpoints/gallery/posts/update.ts +++ b/src/server/api/endpoints/gallery/posts/update.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../../define'; -import { ID } from '../../../../../misc/cafy-id'; -import { DriveFiles, GalleryPosts } from '../../../../../models'; -import { GalleryPost } from '../../../../../models/entities/gallery-post'; -import { ApiError } from '../../../error'; -import { DriveFile } from '@/models/entities/drive-file'; +import define from '../../../define.js'; +import { ID } from '../../../../../misc/cafy-id.js'; +import { DriveFiles, GalleryPosts } from '@/models/index.js'; +import { GalleryPost } from '@/models/entities/gallery-post.js'; +import { ApiError } from '../../../error.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/games/reversi/games.ts b/src/server/api/endpoints/games/reversi/games.ts index 6ac150ef2c..d62a039e16 100644 --- a/src/server/api/endpoints/games/reversi/games.ts +++ b/src/server/api/endpoints/games/reversi/games.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ReversiGames } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ReversiGames } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/games/reversi/games/show.ts b/src/server/api/endpoints/games/reversi/games/show.ts index a6fbdbaf6d..02da583f47 100644 --- a/src/server/api/endpoints/games/reversi/games/show.ts +++ b/src/server/api/endpoints/games/reversi/games/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import Reversi from '../../../../../../games/reversi/core'; -import define from '../../../../define'; -import { ApiError } from '../../../../error'; -import { ReversiGames } from '../../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import Reversi from '../../../../../../games/reversi/core.js'; +import define from '../../../../define.js'; +import { ApiError } from '../../../../error.js'; +import { ReversiGames } from '@/models/index.js'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/games/surrender.ts b/src/server/api/endpoints/games/reversi/games/surrender.ts index 41896b4ab5..371d2475f3 100644 --- a/src/server/api/endpoints/games/reversi/games/surrender.ts +++ b/src/server/api/endpoints/games/reversi/games/surrender.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishReversiGameStream } from '../../../../../../services/stream'; -import define from '../../../../define'; -import { ApiError } from '../../../../error'; -import { ReversiGames } from '../../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { publishReversiGameStream } from '@/services/stream.js'; +import define from '../../../../define.js'; +import { ApiError } from '../../../../error.js'; +import { ReversiGames } from '@/models/index.js'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/invitations.ts b/src/server/api/endpoints/games/reversi/invitations.ts index 6a73bdf0c4..5745ba566e 100644 --- a/src/server/api/endpoints/games/reversi/invitations.ts +++ b/src/server/api/endpoints/games/reversi/invitations.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { ReversiMatchings } from '../../../../../models'; +import define from '../../../define.js'; +import { ReversiMatchings } from '@/models/index.js'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/match.ts b/src/server/api/endpoints/games/reversi/match.ts index 55ff9225d9..e02d11f4eb 100644 --- a/src/server/api/endpoints/games/reversi/match.ts +++ b/src/server/api/endpoints/games/reversi/match.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishMainStream, publishReversiStream } from '../../../../../services/stream'; -import { eighteight } from '../../../../../games/reversi/maps'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { genId } from '@/misc/gen-id'; -import { ReversiMatchings, ReversiGames } from '../../../../../models'; -import { ReversiGame } from '../../../../../models/entities/games/reversi/game'; -import { ReversiMatching } from '../../../../../models/entities/games/reversi/matching'; +import { ID } from '@/misc/cafy-id.js'; +import { publishMainStream, publishReversiStream } from '@/services/stream.js'; +import { eighteight } from '../../../../../games/reversi/maps.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { genId } from '@/misc/gen-id.js'; +import { ReversiMatchings, ReversiGames } from '@/models/index.js'; +import { ReversiGame } from '@/models/entities/games/reversi/game.js'; +import { ReversiMatching } from '@/models/entities/games/reversi/matching.js'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/match/cancel.ts b/src/server/api/endpoints/games/reversi/match/cancel.ts index 0abd4b5c8f..2e5c086572 100644 --- a/src/server/api/endpoints/games/reversi/match/cancel.ts +++ b/src/server/api/endpoints/games/reversi/match/cancel.ts @@ -1,5 +1,5 @@ -import define from '../../../../define'; -import { ReversiMatchings } from '../../../../../../models'; +import define from '../../../../define.js'; +import { ReversiMatchings } from '@/models/index.js'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/get-online-users-count.ts b/src/server/api/endpoints/get-online-users-count.ts index a13363055f..00b838ddcd 100644 --- a/src/server/api/endpoints/get-online-users-count.ts +++ b/src/server/api/endpoints/get-online-users-count.ts @@ -1,7 +1,7 @@ -import { USER_ONLINE_THRESHOLD } from '@/const'; -import { Users } from '@/models'; +import { USER_ONLINE_THRESHOLD } from '@/const.js'; +import { Users } from '@/models/index.js'; import { MoreThan } from 'typeorm'; -import define from '../define'; +import define from '../define.js'; export const meta = { tags: ['meta'], diff --git a/src/server/api/endpoints/hashtags/list.ts b/src/server/api/endpoints/hashtags/list.ts index 6e37f909ee..0453b0acf8 100644 --- a/src/server/api/endpoints/hashtags/list.ts +++ b/src/server/api/endpoints/hashtags/list.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { Hashtags } from '../../../../models'; +import define from '../../define.js'; +import { Hashtags } from '@/models/index.js'; export const meta = { tags: ['hashtags'], diff --git a/src/server/api/endpoints/hashtags/search.ts b/src/server/api/endpoints/hashtags/search.ts index 372ccd5084..025023f54e 100644 --- a/src/server/api/endpoints/hashtags/search.ts +++ b/src/server/api/endpoints/hashtags/search.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { Hashtags } from '../../../../models'; +import define from '../../define.js'; +import { Hashtags } from '@/models/index.js'; export const meta = { tags: ['hashtags'], diff --git a/src/server/api/endpoints/hashtags/show.ts b/src/server/api/endpoints/hashtags/show.ts index 9e388ce145..50f330fef1 100644 --- a/src/server/api/endpoints/hashtags/show.ts +++ b/src/server/api/endpoints/hashtags/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Hashtags } from '../../../../models'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Hashtags } from '@/models/index.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; export const meta = { tags: ['hashtags'], diff --git a/src/server/api/endpoints/hashtags/trend.ts b/src/server/api/endpoints/hashtags/trend.ts index 5341c3e584..21ac69057b 100644 --- a/src/server/api/endpoints/hashtags/trend.ts +++ b/src/server/api/endpoints/hashtags/trend.ts @@ -1,10 +1,10 @@ import { Brackets } from 'typeorm'; -import define from '../../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Notes } from '../../../../models'; -import { Note } from '../../../../models/entities/note'; -import { safeForSql } from '@/misc/safe-for-sql'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; +import define from '../../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Notes } from '@/models/index.js'; +import { Note } from '@/models/entities/note.js'; +import { safeForSql } from '@/misc/safe-for-sql.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; /* トレンドに載るためには「『直近a分間のユニーク投稿数が今からa分前~今からb分前の間のユニーク投稿数のn倍以上』のハッシュタグの上位5位以内に入る」ことが必要 diff --git a/src/server/api/endpoints/hashtags/users.ts b/src/server/api/endpoints/hashtags/users.ts index cecbc80cd2..2ddf066e90 100644 --- a/src/server/api/endpoints/hashtags/users.ts +++ b/src/server/api/endpoints/hashtags/users.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { Users } from '../../../../models'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/i.ts b/src/server/api/endpoints/i.ts index c6b89124b6..12b97e9911 100644 --- a/src/server/api/endpoints/i.ts +++ b/src/server/api/endpoints/i.ts @@ -1,5 +1,5 @@ -import define from '../define'; -import { Users } from '../../../models'; +import define from '../define.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/2fa/done.ts b/src/server/api/endpoints/i/2fa/done.ts index 9a74d7675b..1c1f0557da 100644 --- a/src/server/api/endpoints/i/2fa/done.ts +++ b/src/server/api/endpoints/i/2fa/done.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import * as speakeasy from 'speakeasy'; -import define from '../../../define'; -import { UserProfiles } from '../../../../../models'; +import define from '../../../define.js'; +import { UserProfiles } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/key-done.ts b/src/server/api/endpoints/i/2fa/key-done.ts index 923a8b386c..ea9976bd56 100644 --- a/src/server/api/endpoints/i/2fa/key-done.ts +++ b/src/server/api/endpoints/i/2fa/key-done.ts @@ -2,16 +2,16 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; import { promisify } from 'util'; import * as cbor from 'cbor'; -import define from '../../../define'; +import define from '../../../define.js'; import { UserProfiles, UserSecurityKeys, AttestationChallenges, Users -} from '../../../../../models'; -import config from '@/config'; -import { procedures, hash } from '../../../2fa'; -import { publishMainStream } from '../../../../../services/stream'; +} from '@/models/index.js'; +import config from '@/config/index.js'; +import { procedures, hash } from '../../../2fa.js'; +import { publishMainStream } from '@/services/stream.js'; const cborDecodeFirst = promisify(cbor.decodeFirst) as any; diff --git a/src/server/api/endpoints/i/2fa/password-less.ts b/src/server/api/endpoints/i/2fa/password-less.ts index ee0a065e43..b62ba25b98 100644 --- a/src/server/api/endpoints/i/2fa/password-less.ts +++ b/src/server/api/endpoints/i/2fa/password-less.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { UserProfiles } from '../../../../../models'; +import define from '../../../define.js'; +import { UserProfiles } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/register-key.ts b/src/server/api/endpoints/i/2fa/register-key.ts index 75f578fc5f..12e0afd93e 100644 --- a/src/server/api/endpoints/i/2fa/register-key.ts +++ b/src/server/api/endpoints/i/2fa/register-key.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../../define'; -import { UserProfiles, AttestationChallenges } from '../../../../../models'; +import define from '../../../define.js'; +import { UserProfiles, AttestationChallenges } from '@/models/index.js'; import { promisify } from 'util'; import * as crypto from 'crypto'; -import { genId } from '@/misc/gen-id'; -import { hash } from '../../../2fa'; +import { genId } from '@/misc/gen-id.js'; +import { hash } from '../../../2fa.js'; const randomBytes = promisify(crypto.randomBytes); diff --git a/src/server/api/endpoints/i/2fa/register.ts b/src/server/api/endpoints/i/2fa/register.ts index d40997d6ed..7a3a6ec4cf 100644 --- a/src/server/api/endpoints/i/2fa/register.ts +++ b/src/server/api/endpoints/i/2fa/register.ts @@ -2,9 +2,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; import * as speakeasy from 'speakeasy'; import * as QRCode from 'qrcode'; -import config from '@/config'; -import define from '../../../define'; -import { UserProfiles } from '../../../../../models'; +import config from '@/config/index.js'; +import define from '../../../define.js'; +import { UserProfiles } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/remove-key.ts b/src/server/api/endpoints/i/2fa/remove-key.ts index 135f0eb284..2c74a8a856 100644 --- a/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/src/server/api/endpoints/i/2fa/remove-key.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../../define'; -import { UserProfiles, UserSecurityKeys, Users } from '../../../../../models'; -import { publishMainStream } from '../../../../../services/stream'; +import define from '../../../define.js'; +import { UserProfiles, UserSecurityKeys, Users } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/unregister.ts b/src/server/api/endpoints/i/2fa/unregister.ts index e809f40c71..47f6c0f876 100644 --- a/src/server/api/endpoints/i/2fa/unregister.ts +++ b/src/server/api/endpoints/i/2fa/unregister.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../../define'; -import { UserProfiles } from '../../../../../models'; +import define from '../../../define.js'; +import { UserProfiles } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/apps.ts b/src/server/api/endpoints/i/apps.ts index 69958f1ca4..3cb7038a53 100644 --- a/src/server/api/endpoints/i/apps.ts +++ b/src/server/api/endpoints/i/apps.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { AccessTokens } from '../../../../models'; +import define from '../../define.js'; +import { AccessTokens } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/authorized-apps.ts b/src/server/api/endpoints/i/authorized-apps.ts index 050d079d9b..63cb87cf09 100644 --- a/src/server/api/endpoints/i/authorized-apps.ts +++ b/src/server/api/endpoints/i/authorized-apps.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { AccessTokens, Apps } from '../../../../models'; +import define from '../../define.js'; +import { AccessTokens, Apps } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/change-password.ts b/src/server/api/endpoints/i/change-password.ts index 0a8b86e665..545df032cd 100644 --- a/src/server/api/endpoints/i/change-password.ts +++ b/src/server/api/endpoints/i/change-password.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../define'; -import { UserProfiles } from '../../../../models'; +import define from '../../define.js'; +import { UserProfiles } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/delete-account.ts b/src/server/api/endpoints/i/delete-account.ts index f5f0f32a4a..02c03e5ba0 100644 --- a/src/server/api/endpoints/i/delete-account.ts +++ b/src/server/api/endpoints/i/delete-account.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../define'; -import { Users, UserProfiles } from '../../../../models'; -import { doPostSuspend } from '../../../../services/suspend-user'; -import { publishUserEvent } from '@/services/stream'; +import define from '../../define.js'; +import { Users, UserProfiles } from '@/models/index.js'; +import { doPostSuspend } from '@/services/suspend-user.js'; +import { publishUserEvent } from '@/services/stream.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/export-blocking.ts b/src/server/api/endpoints/i/export-blocking.ts index 87cf7655b0..219fbb1ef1 100644 --- a/src/server/api/endpoints/i/export-blocking.ts +++ b/src/server/api/endpoints/i/export-blocking.ts @@ -1,6 +1,6 @@ -import define from '../../define'; -import { createExportBlockingJob } from '../../../../queue'; -import ms = require('ms'); +import define from '../../define.js'; +import { createExportBlockingJob } from '@/queue/index.js'; +import * as ms from 'ms'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/export-following.ts b/src/server/api/endpoints/i/export-following.ts index 9afc96a24a..2d6a8c2e3a 100644 --- a/src/server/api/endpoints/i/export-following.ts +++ b/src/server/api/endpoints/i/export-following.ts @@ -1,6 +1,6 @@ -import define from '../../define'; -import { createExportFollowingJob } from '../../../../queue'; -import ms = require('ms'); +import define from '../../define.js'; +import { createExportFollowingJob } from '@/queue/index.js'; +import * as ms from 'ms'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/export-mute.ts b/src/server/api/endpoints/i/export-mute.ts index 7bb24f8f84..a96ca1d5bb 100644 --- a/src/server/api/endpoints/i/export-mute.ts +++ b/src/server/api/endpoints/i/export-mute.ts @@ -1,6 +1,6 @@ -import define from '../../define'; -import { createExportMuteJob } from '../../../../queue'; -import ms = require('ms'); +import define from '../../define.js'; +import { createExportMuteJob } from '@/queue/index.js'; +import * as ms from 'ms'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/export-notes.ts b/src/server/api/endpoints/i/export-notes.ts index 368a340512..ff8e02a01b 100644 --- a/src/server/api/endpoints/i/export-notes.ts +++ b/src/server/api/endpoints/i/export-notes.ts @@ -1,6 +1,6 @@ -import define from '../../define'; -import { createExportNotesJob } from '../../../../queue'; -import ms = require('ms'); +import define from '../../define.js'; +import { createExportNotesJob } from '@/queue/index.js'; +import * as ms from 'ms'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/export-user-lists.ts b/src/server/api/endpoints/i/export-user-lists.ts index e1de59f321..4554e512d3 100644 --- a/src/server/api/endpoints/i/export-user-lists.ts +++ b/src/server/api/endpoints/i/export-user-lists.ts @@ -1,6 +1,6 @@ -import define from '../../define'; -import { createExportUserListsJob } from '../../../../queue'; -import ms = require('ms'); +import define from '../../define.js'; +import { createExportUserListsJob } from '@/queue/index.js'; +import * as ms from 'ms'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/favorites.ts b/src/server/api/endpoints/i/favorites.ts index eb97e8bab6..99ce45e9b5 100644 --- a/src/server/api/endpoints/i/favorites.ts +++ b/src/server/api/endpoints/i/favorites.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { NoteFavorites } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { NoteFavorites } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['account', 'notes', 'favorites'], diff --git a/src/server/api/endpoints/i/gallery/likes.ts b/src/server/api/endpoints/i/gallery/likes.ts index e569261fa6..0ddcdad5b9 100644 --- a/src/server/api/endpoints/i/gallery/likes.ts +++ b/src/server/api/endpoints/i/gallery/likes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { GalleryLikes } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { GalleryLikes } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; export const meta = { tags: ['account', 'gallery'], diff --git a/src/server/api/endpoints/i/gallery/posts.ts b/src/server/api/endpoints/i/gallery/posts.ts index d7c2e96c16..74518c792c 100644 --- a/src/server/api/endpoints/i/gallery/posts.ts +++ b/src/server/api/endpoints/i/gallery/posts.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { GalleryPosts } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { GalleryPosts } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; export const meta = { tags: ['account', 'gallery'], diff --git a/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/src/server/api/endpoints/i/get-word-muted-notes-count.ts index a69ebc286a..a18a5c779b 100644 --- a/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { MutedNotes } from '../../../../models'; +import define from '../../define.js'; +import { MutedNotes } from '@/models/index.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/import-following.ts b/src/server/api/endpoints/i/import-following.ts index 0349551073..bb4558cc5c 100644 --- a/src/server/api/endpoints/i/import-following.ts +++ b/src/server/api/endpoints/i/import-following.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { createImportFollowingJob } from '../../../../queue'; -import ms = require('ms'); -import { ApiError } from '../../error'; -import { DriveFiles } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { createImportFollowingJob } from '@/queue/index.js'; +import * as ms from 'ms'; +import { ApiError } from '../../error.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/import-user-lists.ts b/src/server/api/endpoints/i/import-user-lists.ts index f40eb2745d..99465b1fed 100644 --- a/src/server/api/endpoints/i/import-user-lists.ts +++ b/src/server/api/endpoints/i/import-user-lists.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { createImportUserListsJob } from '../../../../queue'; -import ms = require('ms'); -import { ApiError } from '../../error'; -import { DriveFiles } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { createImportUserListsJob } from '@/queue/index.js'; +import * as ms from 'ms'; +import { ApiError } from '../../error.js'; +import { DriveFiles } from '@/models/index.js'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/notifications.ts b/src/server/api/endpoints/i/notifications.ts index a16766c92e..fb7fcea579 100644 --- a/src/server/api/endpoints/i/notifications.ts +++ b/src/server/api/endpoints/i/notifications.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { readNotification } from '../../common/read-notification'; -import define from '../../define'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { Notifications, Followings, Mutings, Users } from '../../../../models'; -import { notificationTypes } from '../../../../types'; -import read from '@/services/note/read'; +import { ID } from '@/misc/cafy-id.js'; +import { readNotification } from '../../common/read-notification.js'; +import define from '../../define.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { Notifications, Followings, Mutings, Users } from '@/models/index.js'; +import { notificationTypes } from '../../../../types.js'; +import read from '@/services/note/read.js'; export const meta = { tags: ['account', 'notifications'], diff --git a/src/server/api/endpoints/i/page-likes.ts b/src/server/api/endpoints/i/page-likes.ts index bb41499694..231b029b28 100644 --- a/src/server/api/endpoints/i/page-likes.ts +++ b/src/server/api/endpoints/i/page-likes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { PageLikes } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { PageLikes } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['account', 'pages'], diff --git a/src/server/api/endpoints/i/pages.ts b/src/server/api/endpoints/i/pages.ts index 981686adb0..1547212197 100644 --- a/src/server/api/endpoints/i/pages.ts +++ b/src/server/api/endpoints/i/pages.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Pages } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Pages } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['account', 'pages'], diff --git a/src/server/api/endpoints/i/pin.ts b/src/server/api/endpoints/i/pin.ts index e1e0658996..689e1ae641 100644 --- a/src/server/api/endpoints/i/pin.ts +++ b/src/server/api/endpoints/i/pin.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { addPinned } from '../../../../services/i/pin'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Users } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { addPinned } from '@/services/i/pin.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['account', 'notes'], diff --git a/src/server/api/endpoints/i/read-all-messaging-messages.ts b/src/server/api/endpoints/i/read-all-messaging-messages.ts index dd26a10a73..fe0e6e558a 100644 --- a/src/server/api/endpoints/i/read-all-messaging-messages.ts +++ b/src/server/api/endpoints/i/read-all-messaging-messages.ts @@ -1,6 +1,6 @@ -import { publishMainStream } from '../../../../services/stream'; -import define from '../../define'; -import { MessagingMessages, UserGroupJoinings } from '../../../../models'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../../define.js'; +import { MessagingMessages, UserGroupJoinings } from '@/models/index.js'; export const meta = { tags: ['account', 'messaging'], diff --git a/src/server/api/endpoints/i/read-all-unread-notes.ts b/src/server/api/endpoints/i/read-all-unread-notes.ts index 64469a2ad5..635c483b75 100644 --- a/src/server/api/endpoints/i/read-all-unread-notes.ts +++ b/src/server/api/endpoints/i/read-all-unread-notes.ts @@ -1,6 +1,6 @@ -import { publishMainStream } from '../../../../services/stream'; -import define from '../../define'; -import { NoteUnreads } from '../../../../models'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../../define.js'; +import { NoteUnreads } from '@/models/index.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/read-announcement.ts b/src/server/api/endpoints/i/read-announcement.ts index 0f58b823fc..6a1050c05e 100644 --- a/src/server/api/endpoints/i/read-announcement.ts +++ b/src/server/api/endpoints/i/read-announcement.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { genId } from '@/misc/gen-id'; -import { AnnouncementReads, Announcements, Users } from '../../../../models'; -import { publishMainStream } from '../../../../services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { genId } from '@/misc/gen-id.js'; +import { AnnouncementReads, Announcements, Users } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/regenerate-token.ts b/src/server/api/endpoints/i/regenerate-token.ts index 3665ed0532..af22d53770 100644 --- a/src/server/api/endpoints/i/regenerate-token.ts +++ b/src/server/api/endpoints/i/regenerate-token.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import { publishMainStream, publishUserEvent } from '../../../../services/stream'; -import generateUserToken from '../../common/generate-native-user-token'; -import define from '../../define'; -import { Users, UserProfiles } from '../../../../models'; +import { publishMainStream, publishUserEvent } from '@/services/stream.js'; +import generateUserToken from '../../common/generate-native-user-token.js'; +import define from '../../define.js'; +import { Users, UserProfiles } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/get-all.ts b/src/server/api/endpoints/i/registry/get-all.ts index ce8653f22b..6d5a4ec31f 100644 --- a/src/server/api/endpoints/i/registry/get-all.ts +++ b/src/server/api/endpoints/i/registry/get-all.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/get-detail.ts b/src/server/api/endpoints/i/registry/get-detail.ts index 441833d3d7..81a81b0217 100644 --- a/src/server/api/endpoints/i/registry/get-detail.ts +++ b/src/server/api/endpoints/i/registry/get-detail.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; +import { ApiError } from '../../../error.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/get.ts b/src/server/api/endpoints/i/registry/get.ts index 275e660cb6..8bdec7986a 100644 --- a/src/server/api/endpoints/i/registry/get.ts +++ b/src/server/api/endpoints/i/registry/get.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; +import { ApiError } from '../../../error.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/keys-with-type.ts b/src/server/api/endpoints/i/registry/keys-with-type.ts index 06d77acbeb..1aeba71fe2 100644 --- a/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/keys.ts b/src/server/api/endpoints/i/registry/keys.ts index e4dd5044b4..1c3836d7a0 100644 --- a/src/server/api/endpoints/i/registry/keys.ts +++ b/src/server/api/endpoints/i/registry/keys.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/remove.ts b/src/server/api/endpoints/i/registry/remove.ts index 4f04d653b3..64cf5fbb74 100644 --- a/src/server/api/endpoints/i/registry/remove.ts +++ b/src/server/api/endpoints/i/registry/remove.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; -import { ApiError } from '../../../error'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; +import { ApiError } from '../../../error.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/scopes.ts b/src/server/api/endpoints/i/registry/scopes.ts index baf3ebdeca..094dfbef88 100644 --- a/src/server/api/endpoints/i/registry/scopes.ts +++ b/src/server/api/endpoints/i/registry/scopes.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/set.ts b/src/server/api/endpoints/i/registry/set.ts index 40f6368017..099ccd27ba 100644 --- a/src/server/api/endpoints/i/registry/set.ts +++ b/src/server/api/endpoints/i/registry/set.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { publishMainStream } from '../../../../../services/stream'; -import define from '../../../define'; -import { RegistryItems } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../../../define.js'; +import { RegistryItems } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/revoke-token.ts b/src/server/api/endpoints/i/revoke-token.ts index d22d9ca693..3f3a2fa939 100644 --- a/src/server/api/endpoints/i/revoke-token.ts +++ b/src/server/api/endpoints/i/revoke-token.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { AccessTokens } from '../../../../models'; -import { ID } from '@/misc/cafy-id'; -import { publishUserEvent } from '@/services/stream'; +import define from '../../define.js'; +import { AccessTokens } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; +import { publishUserEvent } from '@/services/stream.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/signin-history.ts b/src/server/api/endpoints/i/signin-history.ts index 0395206144..215c7b1fc9 100644 --- a/src/server/api/endpoints/i/signin-history.ts +++ b/src/server/api/endpoints/i/signin-history.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Signins } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Signins } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/unpin.ts b/src/server/api/endpoints/i/unpin.ts index fe19b20905..f8c451aa2e 100644 --- a/src/server/api/endpoints/i/unpin.ts +++ b/src/server/api/endpoints/i/unpin.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { removePinned } from '../../../../services/i/pin'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Users } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { removePinned } from '@/services/i/pin.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['account', 'notes'], diff --git a/src/server/api/endpoints/i/update-email.ts b/src/server/api/endpoints/i/update-email.ts index cd0e989e51..142a7aa75c 100644 --- a/src/server/api/endpoints/i/update-email.ts +++ b/src/server/api/endpoints/i/update-email.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { publishMainStream } from '../../../../services/stream'; -import define from '../../define'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../../define.js'; import rndstr from 'rndstr'; -import config from '@/config'; +import config from '@/config/index.js'; import * as ms from 'ms'; import * as bcrypt from 'bcryptjs'; -import { Users, UserProfiles } from '../../../../models'; -import { sendEmail } from '../../../../services/send-email'; -import { ApiError } from '../../error'; +import { Users, UserProfiles } from '@/models/index.js'; +import { sendEmail } from '@/services/send-email.js'; +import { ApiError } from '../../error.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 96955354a3..e8881f94de 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -1,20 +1,20 @@ import $ from 'cafy'; import * as mfm from 'mfm-js'; -import { ID } from '@/misc/cafy-id'; -import { publishMainStream, publishUserEvent } from '../../../../services/stream'; -import acceptAllFollowRequests from '../../../../services/following/requests/accept-all'; -import { publishToFollowers } from '../../../../services/i/update'; -import define from '../../define'; -import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm'; -import { extractHashtags } from '@/misc/extract-hashtags'; +import { ID } from '@/misc/cafy-id.js'; +import { publishMainStream, publishUserEvent } from '@/services/stream.js'; +import acceptAllFollowRequests from '@/services/following/requests/accept-all.js'; +import { publishToFollowers } from '@/services/i/update.js'; +import define from '../../define.js'; +import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; +import { extractHashtags } from '@/misc/extract-hashtags.js'; import * as langmap from 'langmap'; -import { updateUsertags } from '../../../../services/update-hashtag'; -import { ApiError } from '../../error'; -import { Users, DriveFiles, UserProfiles, Pages } from '../../../../models'; -import { User } from '../../../../models/entities/user'; -import { UserProfile } from '../../../../models/entities/user-profile'; -import { notificationTypes } from '../../../../types'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; +import { updateUsertags } from '@/services/update-hashtag.js'; +import { ApiError } from '../../error.js'; +import { Users, DriveFiles, UserProfiles, Pages } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; +import { UserProfile } from '@/models/entities/user-profile.js'; +import { notificationTypes } from '../../../../types.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/user-group-invites.ts b/src/server/api/endpoints/i/user-group-invites.ts index 623274df92..57148bac5d 100644 --- a/src/server/api/endpoints/i/user-group-invites.ts +++ b/src/server/api/endpoints/i/user-group-invites.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { UserGroupInvitations } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { UserGroupInvitations } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['account', 'groups'], diff --git a/src/server/api/endpoints/messaging/history.ts b/src/server/api/endpoints/messaging/history.ts index 5f4f02455d..6f098a0940 100644 --- a/src/server/api/endpoints/messaging/history.ts +++ b/src/server/api/endpoints/messaging/history.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { MessagingMessage } from '../../../../models/entities/messaging-message'; -import { MessagingMessages, Mutings, UserGroupJoinings } from '../../../../models'; +import define from '../../define.js'; +import { MessagingMessage } from '@/models/entities/messaging-message.js'; +import { MessagingMessages, Mutings, UserGroupJoinings } from '@/models/index.js'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/messaging/messages.ts b/src/server/api/endpoints/messaging/messages.ts index 087f5a7d62..3541001ae1 100644 --- a/src/server/api/endpoints/messaging/messages.ts +++ b/src/server/api/endpoints/messaging/messages.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { MessagingMessages, UserGroups, UserGroupJoinings, Users } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { MessagingMessages, UserGroups, UserGroupJoinings, Users } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; import { Brackets } from 'typeorm'; -import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message'; +import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message.js'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/messaging/messages/create.ts b/src/server/api/endpoints/messaging/messages/create.ts index a00513a24d..c6902dc1b6 100644 --- a/src/server/api/endpoints/messaging/messages/create.ts +++ b/src/server/api/endpoints/messaging/messages/create.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { MessagingMessages, DriveFiles, UserGroups, UserGroupJoinings, Blockings } from '../../../../../models'; -import { User } from '../../../../../models/entities/user'; -import { UserGroup } from '../../../../../models/entities/user-group'; -import { createMessage } from '../../../../../services/messages/create'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { MessagingMessages, DriveFiles, UserGroups, UserGroupJoinings, Blockings } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; +import { UserGroup } from '@/models/entities/user-group.js'; +import { createMessage } from '@/services/messages/create.js'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/messaging/messages/delete.ts b/src/server/api/endpoints/messaging/messages/delete.ts index 5e5aa5fd13..54559560c9 100644 --- a/src/server/api/endpoints/messaging/messages/delete.ts +++ b/src/server/api/endpoints/messaging/messages/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; import * as ms from 'ms'; -import { ApiError } from '../../../error'; -import { MessagingMessages } from '../../../../../models'; -import { deleteMessage } from '../../../../../services/messages/delete'; +import { ApiError } from '../../../error.js'; +import { MessagingMessages } from '@/models/index.js'; +import { deleteMessage } from '@/services/messages/delete.js'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/messaging/messages/read.ts b/src/server/api/endpoints/messaging/messages/read.ts index b17927da3f..ac822b6a36 100644 --- a/src/server/api/endpoints/messaging/messages/read.ts +++ b/src/server/api/endpoints/messaging/messages/read.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { MessagingMessages } from '../../../../../models'; -import { readUserMessagingMessage, readGroupMessagingMessage } from '../../../common/read-messaging-message'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { MessagingMessages } from '@/models/index.js'; +import { readUserMessagingMessage, readGroupMessagingMessage } from '../../../common/read-messaging-message.js'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 561d473d6f..579e963af9 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import config from '@/config'; -import define from '../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Ads, Emojis, Users } from '../../../models'; -import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; +import config from '@/config/index.js'; +import define from '../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Ads, Emojis, Users } from '@/models/index.js'; +import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits.js'; import { MoreThan } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/miauth/gen-token.ts b/src/server/api/endpoints/miauth/gen-token.ts index 68ef00eb28..b026d995a5 100644 --- a/src/server/api/endpoints/miauth/gen-token.ts +++ b/src/server/api/endpoints/miauth/gen-token.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { AccessTokens } from '../../../../models'; -import { genId } from '@/misc/gen-id'; -import { secureRndstr } from '@/misc/secure-rndstr'; +import define from '../../define.js'; +import { AccessTokens } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { secureRndstr } from '@/misc/secure-rndstr.js'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/mute/create.ts b/src/server/api/endpoints/mute/create.ts index 7f018a359a..5fdb21a449 100644 --- a/src/server/api/endpoints/mute/create.ts +++ b/src/server/api/endpoints/mute/create.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { genId } from '@/misc/gen-id'; -import { Mutings, NoteWatchings } from '../../../../models'; -import { Muting } from '../../../../models/entities/muting'; -import { publishUserEvent } from '../../../../services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { genId } from '@/misc/gen-id.js'; +import { Mutings, NoteWatchings } from '@/models/index.js'; +import { Muting } from '@/models/entities/muting.js'; +import { publishUserEvent } from '@/services/stream.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/mute/delete.ts b/src/server/api/endpoints/mute/delete.ts index bfb6a95e32..041e5df208 100644 --- a/src/server/api/endpoints/mute/delete.ts +++ b/src/server/api/endpoints/mute/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { Mutings } from '../../../../models'; -import { publishUserEvent } from '../../../../services/stream'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { Mutings } from '@/models/index.js'; +import { publishUserEvent } from '@/services/stream.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/mute/list.ts b/src/server/api/endpoints/mute/list.ts index 45952ec72e..0024506eb0 100644 --- a/src/server/api/endpoints/mute/list.ts +++ b/src/server/api/endpoints/mute/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { Mutings } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { Mutings } from '@/models/index.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/my/apps.ts b/src/server/api/endpoints/my/apps.ts index 908e24e1ba..268408698b 100644 --- a/src/server/api/endpoints/my/apps.ts +++ b/src/server/api/endpoints/my/apps.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { Apps } from '../../../../models'; +import define from '../../define.js'; +import { Apps } from '@/models/index.js'; export const meta = { tags: ['account', 'app'], diff --git a/src/server/api/endpoints/notes.ts b/src/server/api/endpoints/notes.ts index fdb8bad247..6a9766d289 100644 --- a/src/server/api/endpoints/notes.ts +++ b/src/server/api/endpoints/notes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../define'; -import { makePaginationQuery } from '../common/make-pagination-query'; -import { Notes } from '../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../define.js'; +import { makePaginationQuery } from '../common/make-pagination-query.js'; +import { Notes } from '@/models/index.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/children.ts b/src/server/api/endpoints/notes/children.ts index f4d2958810..de17c32f51 100644 --- a/src/server/api/endpoints/notes/children.ts +++ b/src/server/api/endpoints/notes/children.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; import { Brackets } from 'typeorm'; -import { Notes } from '../../../../models'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { Notes } from '@/models/index.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/clips.ts b/src/server/api/endpoints/notes/clips.ts index d116370b46..c3360d6f22 100644 --- a/src/server/api/endpoints/notes/clips.ts +++ b/src/server/api/endpoints/notes/clips.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ClipNotes, Clips } from '../../../../models'; -import { getNote } from '../../common/getters'; -import { ApiError } from '../../error'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ClipNotes, Clips } from '@/models/index.js'; +import { getNote } from '../../common/getters.js'; +import { ApiError } from '../../error.js'; import { In } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/notes/conversation.ts b/src/server/api/endpoints/notes/conversation.ts index 0fd10df077..adf4ca2e10 100644 --- a/src/server/api/endpoints/notes/conversation.ts +++ b/src/server/api/endpoints/notes/conversation.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getNote } from '../../common/getters'; -import { Note } from '../../../../models/entities/note'; -import { Notes } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getNote } from '../../common/getters.js'; +import { Note } from '@/models/entities/note.js'; +import { Notes } from '@/models/index.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/create.ts b/src/server/api/endpoints/notes/create.ts index 9c055683f7..8c2db5213e 100644 --- a/src/server/api/endpoints/notes/create.ts +++ b/src/server/api/endpoints/notes/create.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; import * as ms from 'ms'; import { length } from 'stringz'; -import create from '../../../../services/note/create'; -import define from '../../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { ApiError } from '../../error'; -import { ID } from '@/misc/cafy-id'; -import { User } from '../../../../models/entities/user'; -import { Users, DriveFiles, Notes, Channels, Blockings } from '../../../../models'; -import { DriveFile } from '../../../../models/entities/drive-file'; -import { Note } from '../../../../models/entities/note'; -import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; -import { noteVisibilities } from '../../../../types'; -import { Channel } from '../../../../models/entities/channel'; +import create from '@/services/note/create.js'; +import define from '../../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { ApiError } from '../../error.js'; +import { ID } from '@/misc/cafy-id.js'; +import { User } from '@/models/entities/user.js'; +import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { Note } from '@/models/entities/note.js'; +import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits.js'; +import { noteVisibilities } from '../../../../types.js'; +import { Channel } from '@/models/entities/channel.js'; let maxNoteTextLength = 500; diff --git a/src/server/api/endpoints/notes/delete.ts b/src/server/api/endpoints/notes/delete.ts index 6a0652312a..e66718001b 100644 --- a/src/server/api/endpoints/notes/delete.ts +++ b/src/server/api/endpoints/notes/delete.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import deleteNote from '../../../../services/note/delete'; -import define from '../../define'; +import { ID } from '@/misc/cafy-id.js'; +import deleteNote from '@/services/note/delete.js'; +import define from '../../define.js'; import * as ms from 'ms'; -import { getNote } from '../../common/getters'; -import { ApiError } from '../../error'; -import { Users } from '../../../../models'; +import { getNote } from '../../common/getters.js'; +import { ApiError } from '../../error.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/favorites/create.ts b/src/server/api/endpoints/notes/favorites/create.ts index b77b5d48ff..f406d6238a 100644 --- a/src/server/api/endpoints/notes/favorites/create.ts +++ b/src/server/api/endpoints/notes/favorites/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getNote } from '../../../common/getters'; -import { NoteFavorites } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getNote } from '../../../common/getters.js'; +import { NoteFavorites } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['notes', 'favorites'], diff --git a/src/server/api/endpoints/notes/favorites/delete.ts b/src/server/api/endpoints/notes/favorites/delete.ts index 4a1fc71a0d..624cf18948 100644 --- a/src/server/api/endpoints/notes/favorites/delete.ts +++ b/src/server/api/endpoints/notes/favorites/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getNote } from '../../../common/getters'; -import { NoteFavorites } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getNote } from '../../../common/getters.js'; +import { NoteFavorites } from '@/models/index.js'; export const meta = { tags: ['notes', 'favorites'], diff --git a/src/server/api/endpoints/notes/featured.ts b/src/server/api/endpoints/notes/featured.ts index 44c0fb23ab..aa8a8c09aa 100644 --- a/src/server/api/endpoints/notes/featured.ts +++ b/src/server/api/endpoints/notes/featured.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { Notes } from '../../../../models'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import define from '../../define.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { Notes } from '@/models/index.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/global-timeline.ts b/src/server/api/endpoints/notes/global-timeline.ts index 96bfde5aa2..ae2408ef40 100644 --- a/src/server/api/endpoints/notes/global-timeline.ts +++ b/src/server/api/endpoints/notes/global-timeline.ts @@ -1,15 +1,15 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { ApiError } from '../../error'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { Notes } from '../../../../models'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { activeUsersChart } from '../../../../services/chart'; -import { generateRepliesQuery } from '../../common/generate-replies-query'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { ApiError } from '../../error.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { Notes } from '@/models/index.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { activeUsersChart } from '@/services/chart/index.js'; +import { generateRepliesQuery } from '../../common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/hybrid-timeline.ts b/src/server/api/endpoints/notes/hybrid-timeline.ts index 91a36fd0cc..4bebeab998 100644 --- a/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { ApiError } from '../../error'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { Followings, Notes } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { ApiError } from '../../error.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { Followings, Notes } from '@/models/index.js'; import { Brackets } from 'typeorm'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { activeUsersChart } from '../../../../services/chart'; -import { generateRepliesQuery } from '../../common/generate-replies-query'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; -import { generateChannelQuery } from '../../common/generate-channel-query'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { activeUsersChart } from '@/services/chart/index.js'; +import { generateRepliesQuery } from '../../common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; +import { generateChannelQuery } from '../../common/generate-channel-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/local-timeline.ts b/src/server/api/endpoints/notes/local-timeline.ts index 4f481b599d..95e748fae6 100644 --- a/src/server/api/endpoints/notes/local-timeline.ts +++ b/src/server/api/endpoints/notes/local-timeline.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { ApiError } from '../../error'; -import { Notes } from '../../../../models'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { activeUsersChart } from '../../../../services/chart'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { ApiError } from '../../error.js'; +import { Notes } from '@/models/index.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { activeUsersChart } from '@/services/chart/index.js'; import { Brackets } from 'typeorm'; -import { generateRepliesQuery } from '../../common/generate-replies-query'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; -import { generateChannelQuery } from '../../common/generate-channel-query'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { generateRepliesQuery } from '../../common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; +import { generateChannelQuery } from '../../common/generate-channel-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/mentions.ts b/src/server/api/endpoints/notes/mentions.ts index 6a2358228b..f3b8eecad6 100644 --- a/src/server/api/endpoints/notes/mentions.ts +++ b/src/server/api/endpoints/notes/mentions.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import read from '../../../../services/note/read'; -import { Notes, Followings } from '../../../../models'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import read from '@/services/note/read.js'; +import { Notes, Followings } from '@/models/index.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; import { Brackets } from 'typeorm'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/polls/recommendation.ts b/src/server/api/endpoints/notes/polls/recommendation.ts index af8a527398..194c2ae276 100644 --- a/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/src/server/api/endpoints/notes/polls/recommendation.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define'; -import { Polls, Mutings, Notes, PollVotes } from '../../../../../models'; +import define from '../../../define.js'; +import { Polls, Mutings, Notes, PollVotes } from '@/models/index.js'; import { Brackets, In } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts index 6f2892960f..0fde90b592 100644 --- a/src/server/api/endpoints/notes/polls/vote.ts +++ b/src/server/api/endpoints/notes/polls/vote.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishNoteStream } from '../../../../../services/stream'; -import { createNotification } from '../../../../../services/create-notification'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getNote } from '../../../common/getters'; -import { deliver } from '../../../../../queue'; -import { renderActivity } from '../../../../../remote/activitypub/renderer'; -import renderVote from '../../../../../remote/activitypub/renderer/vote'; -import { deliverQuestionUpdate } from '../../../../../services/note/polls/update'; -import { PollVotes, NoteWatchings, Users, Polls, Blockings } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { publishNoteStream } from '@/services/stream.js'; +import { createNotification } from '@/services/create-notification.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getNote } from '../../../common/getters.js'; +import { deliver } from '@/queue/index.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderVote from '@/remote/activitypub/renderer/vote.js'; +import { deliverQuestionUpdate } from '@/services/note/polls/update.js'; +import { PollVotes, NoteWatchings, Users, Polls, Blockings } from '@/models/index.js'; import { Not } from 'typeorm'; -import { IRemoteUser } from '../../../../../models/entities/user'; -import { genId } from '@/misc/gen-id'; +import { IRemoteUser } from '@/models/entities/user.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/reactions.ts b/src/server/api/endpoints/notes/reactions.ts index df780bfa06..a67851d3b7 100644 --- a/src/server/api/endpoints/notes/reactions.ts +++ b/src/server/api/endpoints/notes/reactions.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { getNote } from '../../common/getters'; -import { ApiError } from '../../error'; -import { NoteReactions } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { getNote } from '../../common/getters.js'; +import { ApiError } from '../../error.js'; +import { NoteReactions } from '@/models/index.js'; import { DeepPartial } from 'typeorm'; -import { NoteReaction } from '../../../../models/entities/note-reaction'; +import { NoteReaction } from '@/models/entities/note-reaction.js'; export const meta = { tags: ['notes', 'reactions'], diff --git a/src/server/api/endpoints/notes/reactions/create.ts b/src/server/api/endpoints/notes/reactions/create.ts index 3243332c50..41109746f8 100644 --- a/src/server/api/endpoints/notes/reactions/create.ts +++ b/src/server/api/endpoints/notes/reactions/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import createReaction from '../../../../../services/note/reaction/create'; -import define from '../../../define'; -import { getNote } from '../../../common/getters'; -import { ApiError } from '../../../error'; +import { ID } from '@/misc/cafy-id.js'; +import createReaction from '@/services/note/reaction/create.js'; +import define from '../../../define.js'; +import { getNote } from '../../../common/getters.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['reactions', 'notes'], diff --git a/src/server/api/endpoints/notes/reactions/delete.ts b/src/server/api/endpoints/notes/reactions/delete.ts index b18cb533d6..b9eaf6978c 100644 --- a/src/server/api/endpoints/notes/reactions/delete.ts +++ b/src/server/api/endpoints/notes/reactions/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; import * as ms from 'ms'; -import deleteReaction from '../../../../../services/note/reaction/delete'; -import { getNote } from '../../../common/getters'; -import { ApiError } from '../../../error'; +import deleteReaction from '@/services/note/reaction/delete.js'; +import { getNote } from '../../../common/getters.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['reactions', 'notes'], diff --git a/src/server/api/endpoints/notes/renotes.ts b/src/server/api/endpoints/notes/renotes.ts index 5e3b3ccbc6..b08173f249 100644 --- a/src/server/api/endpoints/notes/renotes.ts +++ b/src/server/api/endpoints/notes/renotes.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { getNote } from '../../common/getters'; -import { ApiError } from '../../error'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { Notes } from '../../../../models'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { getNote } from '../../common/getters.js'; +import { ApiError } from '../../error.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { Notes } from '@/models/index.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/replies.ts b/src/server/api/endpoints/notes/replies.ts index 7960078c8e..5a96c16fd2 100644 --- a/src/server/api/endpoints/notes/replies.ts +++ b/src/server/api/endpoints/notes/replies.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Notes } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Notes } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/search-by-tag.ts b/src/server/api/endpoints/notes/search-by-tag.ts index 39d99babac..2c0ad74635 100644 --- a/src/server/api/endpoints/notes/search-by-tag.ts +++ b/src/server/api/endpoints/notes/search-by-tag.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { Notes } from '../../../../models'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { Notes } from '@/models/index.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; import { Brackets } from 'typeorm'; -import { safeForSql } from '@/misc/safe-for-sql'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { safeForSql } from '@/misc/safe-for-sql.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes', 'hashtags'], diff --git a/src/server/api/endpoints/notes/search.ts b/src/server/api/endpoints/notes/search.ts index 0e0eaa06a8..45442c2548 100644 --- a/src/server/api/endpoints/notes/search.ts +++ b/src/server/api/endpoints/notes/search.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import es from '../../../../db/elasticsearch'; -import define from '../../define'; -import { Notes } from '../../../../models'; +import es from '../../../../db/elasticsearch.js'; +import define from '../../define.js'; +import { Notes } from '@/models/index.js'; import { In } from 'typeorm'; -import { ID } from '@/misc/cafy-id'; -import config from '@/config'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { ID } from '@/misc/cafy-id.js'; +import config from '@/config/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/show.ts b/src/server/api/endpoints/notes/show.ts index fc8e30788d..8387279b17 100644 --- a/src/server/api/endpoints/notes/show.ts +++ b/src/server/api/endpoints/notes/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { getNote } from '../../common/getters'; -import { ApiError } from '../../error'; -import { Notes } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { getNote } from '../../common/getters.js'; +import { ApiError } from '../../error.js'; +import { Notes } from '@/models/index.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/state.ts b/src/server/api/endpoints/notes/state.ts index 8af09f07dd..bd2e85ea9d 100644 --- a/src/server/api/endpoints/notes/state.ts +++ b/src/server/api/endpoints/notes/state.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { NoteFavorites, NoteWatchings } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { NoteFavorites, NoteWatchings } from '@/models/index.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/timeline.ts b/src/server/api/endpoints/notes/timeline.ts index 5f03400919..e1fd2d5fca 100644 --- a/src/server/api/endpoints/notes/timeline.ts +++ b/src/server/api/endpoints/notes/timeline.ts @@ -1,16 +1,16 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { Notes, Followings } from '../../../../models'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; -import { activeUsersChart } from '../../../../services/chart'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { Notes, Followings } from '@/models/index.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { activeUsersChart } from '@/services/chart/index.js'; import { Brackets } from 'typeorm'; -import { generateRepliesQuery } from '../../common/generate-replies-query'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; -import { generateChannelQuery } from '../../common/generate-channel-query'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { generateRepliesQuery } from '../../common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; +import { generateChannelQuery } from '../../common/generate-channel-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/translate.ts b/src/server/api/endpoints/notes/translate.ts index 67c02432c8..66354a2ea4 100644 --- a/src/server/api/endpoints/notes/translate.ts +++ b/src/server/api/endpoints/notes/translate.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { getNote } from '../../common/getters'; -import { ApiError } from '../../error'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { getNote } from '../../common/getters.js'; +import { ApiError } from '../../error.js'; import fetch from 'node-fetch'; -import config from '@/config'; -import { getAgentByUrl } from '@/misc/fetch'; +import config from '@/config/index.js'; +import { getAgentByUrl } from '@/misc/fetch.js'; import { URLSearchParams } from 'url'; -import { fetchMeta } from '@/misc/fetch-meta'; +import { fetchMeta } from '@/misc/fetch-meta.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/unrenote.ts b/src/server/api/endpoints/notes/unrenote.ts index 5e016f293f..eec7a21515 100644 --- a/src/server/api/endpoints/notes/unrenote.ts +++ b/src/server/api/endpoints/notes/unrenote.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import deleteNote from '../../../../services/note/delete'; -import define from '../../define'; +import { ID } from '@/misc/cafy-id.js'; +import deleteNote from '@/services/note/delete.js'; +import define from '../../define.js'; import * as ms from 'ms'; -import { getNote } from '../../common/getters'; -import { ApiError } from '../../error'; -import { Notes, Users } from '../../../../models'; +import { getNote } from '../../common/getters.js'; +import { ApiError } from '../../error.js'; +import { Notes, Users } from '@/models/index.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/user-list-timeline.ts b/src/server/api/endpoints/notes/user-list-timeline.ts index e160fff25a..15abaa6c22 100644 --- a/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/src/server/api/endpoints/notes/user-list-timeline.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { UserLists, UserListJoinings, Notes } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { activeUsersChart } from '../../../../services/chart'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { UserLists, UserListJoinings, Notes } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { activeUsersChart } from '@/services/chart/index.js'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/notes/watching/create.ts b/src/server/api/endpoints/notes/watching/create.ts index 74d31fe1a3..1c2c1652ae 100644 --- a/src/server/api/endpoints/notes/watching/create.ts +++ b/src/server/api/endpoints/notes/watching/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import watch from '../../../../../services/note/watch'; -import { getNote } from '../../../common/getters'; -import { ApiError } from '../../../error'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import watch from '@/services/note/watch.js'; +import { getNote } from '../../../common/getters.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/watching/delete.ts b/src/server/api/endpoints/notes/watching/delete.ts index a91d72be05..b418d3af2b 100644 --- a/src/server/api/endpoints/notes/watching/delete.ts +++ b/src/server/api/endpoints/notes/watching/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import unwatch from '../../../../../services/note/unwatch'; -import { getNote } from '../../../common/getters'; -import { ApiError } from '../../../error'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import unwatch from '@/services/note/unwatch.js'; +import { getNote } from '../../../common/getters.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notifications/create.ts b/src/server/api/endpoints/notifications/create.ts index 6267699e90..5231d9011b 100644 --- a/src/server/api/endpoints/notifications/create.ts +++ b/src/server/api/endpoints/notifications/create.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { createNotification } from '../../../../services/create-notification'; +import define from '../../define.js'; +import { createNotification } from '@/services/create-notification.js'; export const meta = { tags: ['notifications'], diff --git a/src/server/api/endpoints/notifications/mark-all-as-read.ts b/src/server/api/endpoints/notifications/mark-all-as-read.ts index cce54587c7..d0dc7be31b 100644 --- a/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -1,6 +1,6 @@ -import { publishMainStream } from '../../../../services/stream'; -import define from '../../define'; -import { Notifications } from '../../../../models'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../../define.js'; +import { Notifications } from '@/models/index.js'; export const meta = { tags: ['notifications', 'account'], diff --git a/src/server/api/endpoints/notifications/read.ts b/src/server/api/endpoints/notifications/read.ts index fe8e5ba44f..94140db82e 100644 --- a/src/server/api/endpoints/notifications/read.ts +++ b/src/server/api/endpoints/notifications/read.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishMainStream } from '../../../../services/stream'; -import define from '../../define'; -import { Notifications } from '../../../../models'; -import { readNotification } from '../../common/read-notification'; -import { ApiError } from '../../error'; +import { ID } from '@/misc/cafy-id.js'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../../define.js'; +import { Notifications } from '@/models/index.js'; +import { readNotification } from '../../common/read-notification.js'; +import { ApiError } from '../../error.js'; export const meta = { tags: ['notifications', 'account'], diff --git a/src/server/api/endpoints/page-push.ts b/src/server/api/endpoints/page-push.ts index 9ec9f9184c..1d48303394 100644 --- a/src/server/api/endpoints/page-push.ts +++ b/src/server/api/endpoints/page-push.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../define'; -import { ID } from '@/misc/cafy-id'; -import { publishMainStream } from '../../../services/stream'; -import { Users, Pages } from '../../../models'; -import { ApiError } from '../error'; +import define from '../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { publishMainStream } from '@/services/stream.js'; +import { Users, Pages } from '@/models/index.js'; +import { ApiError } from '../error.js'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/pages/create.ts b/src/server/api/endpoints/pages/create.ts index 07e0969bdd..4f8a09b02a 100644 --- a/src/server/api/endpoints/pages/create.ts +++ b/src/server/api/endpoints/pages/create.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../define'; -import { ID } from '@/misc/cafy-id'; -import { Pages, DriveFiles } from '../../../../models'; -import { genId } from '@/misc/gen-id'; -import { Page } from '../../../../models/entities/page'; -import { ApiError } from '../../error'; +import define from '../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Pages, DriveFiles } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { Page } from '@/models/entities/page.js'; +import { ApiError } from '../../error.js'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/delete.ts b/src/server/api/endpoints/pages/delete.ts index 12a3360e43..8777c65e42 100644 --- a/src/server/api/endpoints/pages/delete.ts +++ b/src/server/api/endpoints/pages/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Pages } from '../../../../models'; -import { ID } from '@/misc/cafy-id'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Pages } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/featured.ts b/src/server/api/endpoints/pages/featured.ts index 19802d0448..68adac930d 100644 --- a/src/server/api/endpoints/pages/featured.ts +++ b/src/server/api/endpoints/pages/featured.ts @@ -1,5 +1,5 @@ -import define from '../../define'; -import { Pages } from '../../../../models'; +import define from '../../define.js'; +import { Pages } from '@/models/index.js'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/like.ts b/src/server/api/endpoints/pages/like.ts index bed8e975ec..ac0f577eb8 100644 --- a/src/server/api/endpoints/pages/like.ts +++ b/src/server/api/endpoints/pages/like.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Pages, PageLikes } from '../../../../models'; -import { genId } from '@/misc/gen-id'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Pages, PageLikes } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/show.ts b/src/server/api/endpoints/pages/show.ts index d4d04bccff..21084d3b9a 100644 --- a/src/server/api/endpoints/pages/show.ts +++ b/src/server/api/endpoints/pages/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Pages, Users } from '../../../../models'; -import { ID } from '@/misc/cafy-id'; -import { Page } from '../../../../models/entities/page'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Pages, Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Page } from '@/models/entities/page.js'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/unlike.ts b/src/server/api/endpoints/pages/unlike.ts index a5e22a2c7b..dddecccf62 100644 --- a/src/server/api/endpoints/pages/unlike.ts +++ b/src/server/api/endpoints/pages/unlike.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Pages, PageLikes } from '../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Pages, PageLikes } from '@/models/index.js'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/update.ts b/src/server/api/endpoints/pages/update.ts index 6d1ae4c6fe..d1df9b08a2 100644 --- a/src/server/api/endpoints/pages/update.ts +++ b/src/server/api/endpoints/pages/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Pages, DriveFiles } from '../../../../models'; -import { ID } from '@/misc/cafy-id'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Pages, DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; import { Not } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/ping.ts b/src/server/api/endpoints/ping.ts index 0b1bb6e164..1d342dac33 100644 --- a/src/server/api/endpoints/ping.ts +++ b/src/server/api/endpoints/ping.ts @@ -1,4 +1,4 @@ -import define from '../define'; +import define from '../define.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/pinned-users.ts b/src/server/api/endpoints/pinned-users.ts index bcef072fed..0ea5e9b390 100644 --- a/src/server/api/endpoints/pinned-users.ts +++ b/src/server/api/endpoints/pinned-users.ts @@ -1,8 +1,8 @@ -import define from '../define'; -import { Users } from '../../../models'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { parseAcct } from '@/misc/acct'; -import { User } from '../../../models/entities/user'; +import define from '../define.js'; +import { Users } from '@/models/index.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { parseAcct } from '@/misc/acct.js'; +import { User } from '@/models/entities/user.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/promo/read.ts b/src/server/api/endpoints/promo/read.ts index 32b543295d..92a6768988 100644 --- a/src/server/api/endpoints/promo/read.ts +++ b/src/server/api/endpoints/promo/read.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getNote } from '../../common/getters'; -import { PromoReads } from '../../../../models'; -import { genId } from '@/misc/gen-id'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getNote } from '../../common/getters.js'; +import { PromoReads } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/request-reset-password.ts b/src/server/api/endpoints/request-reset-password.ts index c880df7527..754a5a1c87 100644 --- a/src/server/api/endpoints/request-reset-password.ts +++ b/src/server/api/endpoints/request-reset-password.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { publishMainStream } from '../../../services/stream'; -import define from '../define'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../define.js'; import rndstr from 'rndstr'; -import config from '@/config'; +import config from '@/config/index.js'; import * as ms from 'ms'; -import { Users, UserProfiles, PasswordResetRequests } from '../../../models'; -import { sendEmail } from '../../../services/send-email'; -import { ApiError } from '../error'; -import { genId } from '@/misc/gen-id'; +import { Users, UserProfiles, PasswordResetRequests } from '@/models/index.js'; +import { sendEmail } from '@/services/send-email.js'; +import { ApiError } from '../error.js'; +import { genId } from '@/misc/gen-id.js'; import { IsNull } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/reset-db.ts b/src/server/api/endpoints/reset-db.ts index f430869302..c6ad8303fa 100644 --- a/src/server/api/endpoints/reset-db.ts +++ b/src/server/api/endpoints/reset-db.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../define'; -import { ApiError } from '../error'; -import { resetDb } from '@/db/postgre'; +import define from '../define.js'; +import { ApiError } from '../error.js'; +import { resetDb } from '@/db/postgre.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/reset-password.ts b/src/server/api/endpoints/reset-password.ts index 5f79bdbd00..f32e499e01 100644 --- a/src/server/api/endpoints/reset-password.ts +++ b/src/server/api/endpoints/reset-password.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import { publishMainStream } from '../../../services/stream'; -import define from '../define'; -import { Users, UserProfiles, PasswordResetRequests } from '../../../models'; -import { ApiError } from '../error'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../define.js'; +import { Users, UserProfiles, PasswordResetRequests } from '@/models/index.js'; +import { ApiError } from '../error.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/room/show.ts b/src/server/api/endpoints/room/show.ts index 85cd57aef4..dcedde5db3 100644 --- a/src/server/api/endpoints/room/show.ts +++ b/src/server/api/endpoints/room/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Users, UserProfiles } from '../../../../models'; -import { ID } from '@/misc/cafy-id'; -import { toPunyNullable } from '@/misc/convert-host'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Users, UserProfiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id.js'; +import { toPunyNullable } from '@/misc/convert-host.js'; export const meta = { tags: ['room'], diff --git a/src/server/api/endpoints/room/update.ts b/src/server/api/endpoints/room/update.ts index af8b80be9a..2ee44e157c 100644 --- a/src/server/api/endpoints/room/update.ts +++ b/src/server/api/endpoints/room/update.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { publishMainStream } from '../../../../services/stream'; -import define from '../../define'; -import { Users, UserProfiles } from '../../../../models'; +import { publishMainStream } from '@/services/stream.js'; +import define from '../../define.js'; +import { Users, UserProfiles } from '@/models/index.js'; export const meta = { tags: ['room'], diff --git a/src/server/api/endpoints/server-info.ts b/src/server/api/endpoints/server-info.ts index 4e636d331c..23a7aabba4 100644 --- a/src/server/api/endpoints/server-info.ts +++ b/src/server/api/endpoints/server-info.ts @@ -1,6 +1,6 @@ import * as os from 'os'; import * as si from 'systeminformation'; -import define from '../define'; +import define from '../define.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts index f9c17f86eb..84b56c0ba9 100644 --- a/src/server/api/endpoints/stats.ts +++ b/src/server/api/endpoints/stats.ts @@ -1,6 +1,6 @@ -import define from '../define'; -import { NoteReactions, Notes, Users } from '../../../models'; -import { federationChart, driveChart } from '../../../services/chart'; +import define from '../define.js'; +import { NoteReactions, Notes, Users } from '@/models/index.js'; +import { federationChart, driveChart } from '@/services/chart/index.js'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/sw/register.ts b/src/server/api/endpoints/sw/register.ts index 43d4118df6..c008e6ec70 100644 --- a/src/server/api/endpoints/sw/register.ts +++ b/src/server/api/endpoints/sw/register.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { genId } from '@/misc/gen-id'; -import { SwSubscriptions } from '../../../../models'; +import define from '../../define.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { genId } from '@/misc/gen-id.js'; +import { SwSubscriptions } from '@/models/index.js'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/username/available.ts b/src/server/api/endpoints/username/available.ts index cd434b582e..38442fdc9c 100644 --- a/src/server/api/endpoints/username/available.ts +++ b/src/server/api/endpoints/username/available.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { Users, UsedUsernames } from '../../../../models'; +import define from '../../define.js'; +import { Users, UsedUsernames } from '@/models/index.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users.ts b/src/server/api/endpoints/users.ts index 3c30f459da..462055b285 100644 --- a/src/server/api/endpoints/users.ts +++ b/src/server/api/endpoints/users.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../define'; -import { Users } from '../../../models'; -import { generateMutedUserQueryForUsers } from '../common/generate-muted-user-query'; -import { generateBlockedUserQuery } from '../common/generate-block-query'; +import define from '../define.js'; +import { Users } from '@/models/index.js'; +import { generateMutedUserQueryForUsers } from '../common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '../common/generate-block-query.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/clips.ts b/src/server/api/endpoints/users/clips.ts index 12aa964034..8e53843bb3 100644 --- a/src/server/api/endpoints/users/clips.ts +++ b/src/server/api/endpoints/users/clips.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Clips } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Clips } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['users', 'clips'], diff --git a/src/server/api/endpoints/users/followers.ts b/src/server/api/endpoints/users/followers.ts index c9fe36e4e4..896c3ca1cd 100644 --- a/src/server/api/endpoints/users/followers.ts +++ b/src/server/api/endpoints/users/followers.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Users, Followings } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { toPunyNullable } from '@/misc/convert-host'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Users, Followings } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { toPunyNullable } from '@/misc/convert-host.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/following.ts b/src/server/api/endpoints/users/following.ts index c3dd90ff7e..ab60cc02fb 100644 --- a/src/server/api/endpoints/users/following.ts +++ b/src/server/api/endpoints/users/following.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { Users, Followings } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { toPunyNullable } from '@/misc/convert-host'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { Users, Followings } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { toPunyNullable } from '@/misc/convert-host.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/gallery/posts.ts b/src/server/api/endpoints/users/gallery/posts.ts index 1da6bced5c..7c5a7d1cf3 100644 --- a/src/server/api/endpoints/users/gallery/posts.ts +++ b/src/server/api/endpoints/users/gallery/posts.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { GalleryPosts } from '../../../../../models'; -import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { GalleryPosts } from '@/models/index.js'; +import { makePaginationQuery } from '../../../common/make-pagination-query.js'; export const meta = { tags: ['users', 'gallery'], diff --git a/src/server/api/endpoints/users/get-frequently-replied-users.ts b/src/server/api/endpoints/users/get-frequently-replied-users.ts index bdfb7772ae..4207aa004c 100644 --- a/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { maximum } from '../../../../prelude/array'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { maximum } from '../../../../prelude/array.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; import { Not, In, IsNull } from 'typeorm'; -import { Notes, Users } from '../../../../models'; +import { Notes, Users } from '@/models/index.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/groups/create.ts b/src/server/api/endpoints/users/groups/create.ts index 2cd0653baa..7c3d5d258d 100644 --- a/src/server/api/endpoints/users/groups/create.ts +++ b/src/server/api/endpoints/users/groups/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define'; -import { UserGroups, UserGroupJoinings } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; -import { UserGroup } from '../../../../../models/entities/user-group'; -import { UserGroupJoining } from '../../../../../models/entities/user-group-joining'; +import define from '../../../define.js'; +import { UserGroups, UserGroupJoinings } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { UserGroup } from '@/models/entities/user-group.js'; +import { UserGroupJoining } from '@/models/entities/user-group-joining.js'; export const meta = { tags: ['groups'], diff --git a/src/server/api/endpoints/users/groups/delete.ts b/src/server/api/endpoints/users/groups/delete.ts index 4c4a8c15b1..71d6c615a7 100644 --- a/src/server/api/endpoints/users/groups/delete.ts +++ b/src/server/api/endpoints/users/groups/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { UserGroups } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { UserGroups } from '@/models/index.js'; export const meta = { tags: ['groups'], diff --git a/src/server/api/endpoints/users/groups/invitations/accept.ts b/src/server/api/endpoints/users/groups/invitations/accept.ts index 943d158661..6eab46337d 100644 --- a/src/server/api/endpoints/users/groups/invitations/accept.ts +++ b/src/server/api/endpoints/users/groups/invitations/accept.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../../define'; -import { ApiError } from '../../../../error'; -import { UserGroupJoinings, UserGroupInvitations } from '../../../../../../models'; -import { genId } from '@/misc/gen-id'; -import { UserGroupJoining } from '../../../../../../models/entities/user-group-joining'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../../define.js'; +import { ApiError } from '../../../../error.js'; +import { UserGroupJoinings, UserGroupInvitations } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { UserGroupJoining } from '@/models/entities/user-group-joining.js'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/invitations/reject.ts b/src/server/api/endpoints/users/groups/invitations/reject.ts index 4bc902ae5d..ff0ff58f3c 100644 --- a/src/server/api/endpoints/users/groups/invitations/reject.ts +++ b/src/server/api/endpoints/users/groups/invitations/reject.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../../define'; -import { ApiError } from '../../../../error'; -import { UserGroupInvitations } from '../../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../../define.js'; +import { ApiError } from '../../../../error.js'; +import { UserGroupInvitations } from '@/models/index.js'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/invite.ts b/src/server/api/endpoints/users/groups/invite.ts index 688b18f69d..2a4af72662 100644 --- a/src/server/api/endpoints/users/groups/invite.ts +++ b/src/server/api/endpoints/users/groups/invite.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { UserGroups, UserGroupJoinings, UserGroupInvitations } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; -import { UserGroupInvitation } from '../../../../../models/entities/user-group-invitation'; -import { createNotification } from '../../../../../services/create-notification'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { UserGroups, UserGroupJoinings, UserGroupInvitations } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { UserGroupInvitation } from '@/models/entities/user-group-invitation.js'; +import { createNotification } from '@/services/create-notification.js'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/joined.ts b/src/server/api/endpoints/users/groups/joined.ts index b25341c854..4066c6ddc3 100644 --- a/src/server/api/endpoints/users/groups/joined.ts +++ b/src/server/api/endpoints/users/groups/joined.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { UserGroups, UserGroupJoinings } from '../../../../../models'; +import define from '../../../define.js'; +import { UserGroups, UserGroupJoinings } from '@/models/index.js'; import { Not, In } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/users/groups/owned.ts b/src/server/api/endpoints/users/groups/owned.ts index e0b003c9e4..0111ff09d1 100644 --- a/src/server/api/endpoints/users/groups/owned.ts +++ b/src/server/api/endpoints/users/groups/owned.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { UserGroups } from '../../../../../models'; +import define from '../../../define.js'; +import { UserGroups } from '@/models/index.js'; export const meta = { tags: ['groups', 'account'], diff --git a/src/server/api/endpoints/users/groups/pull.ts b/src/server/api/endpoints/users/groups/pull.ts index d93a16bd9d..4e080074b4 100644 --- a/src/server/api/endpoints/users/groups/pull.ts +++ b/src/server/api/endpoints/users/groups/pull.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { UserGroups, UserGroupJoinings } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { UserGroups, UserGroupJoinings } from '@/models/index.js'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/show.ts b/src/server/api/endpoints/users/groups/show.ts index 1b71933c20..666c159c6d 100644 --- a/src/server/api/endpoints/users/groups/show.ts +++ b/src/server/api/endpoints/users/groups/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { UserGroups, UserGroupJoinings } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { UserGroups, UserGroupJoinings } from '@/models/index.js'; export const meta = { tags: ['groups', 'account'], diff --git a/src/server/api/endpoints/users/groups/transfer.ts b/src/server/api/endpoints/users/groups/transfer.ts index d6376993c9..a216e80025 100644 --- a/src/server/api/endpoints/users/groups/transfer.ts +++ b/src/server/api/endpoints/users/groups/transfer.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { UserGroups, UserGroupJoinings } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { UserGroups, UserGroupJoinings } from '@/models/index.js'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/update.ts b/src/server/api/endpoints/users/groups/update.ts index a403152b4e..c6c1b14818 100644 --- a/src/server/api/endpoints/users/groups/update.ts +++ b/src/server/api/endpoints/users/groups/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { UserGroups } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { UserGroups } from '@/models/index.js'; export const meta = { tags: ['groups'], diff --git a/src/server/api/endpoints/users/lists/create.ts b/src/server/api/endpoints/users/lists/create.ts index c524130089..89af90ea52 100644 --- a/src/server/api/endpoints/users/lists/create.ts +++ b/src/server/api/endpoints/users/lists/create.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define'; -import { UserLists } from '../../../../../models'; -import { genId } from '@/misc/gen-id'; -import { UserList } from '../../../../../models/entities/user-list'; +import define from '../../../define.js'; +import { UserLists } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { UserList } from '@/models/entities/user-list.js'; export const meta = { tags: ['lists'], diff --git a/src/server/api/endpoints/users/lists/delete.ts b/src/server/api/endpoints/users/lists/delete.ts index ecae5641c5..d33222242e 100644 --- a/src/server/api/endpoints/users/lists/delete.ts +++ b/src/server/api/endpoints/users/lists/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { UserLists } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { UserLists } from '@/models/index.js'; export const meta = { tags: ['lists'], diff --git a/src/server/api/endpoints/users/lists/list.ts b/src/server/api/endpoints/users/lists/list.ts index 1548208714..f186408981 100644 --- a/src/server/api/endpoints/users/lists/list.ts +++ b/src/server/api/endpoints/users/lists/list.ts @@ -1,5 +1,5 @@ -import define from '../../../define'; -import { UserLists } from '../../../../../models'; +import define from '../../../define.js'; +import { UserLists } from '@/models/index.js'; export const meta = { tags: ['lists', 'account'], diff --git a/src/server/api/endpoints/users/lists/pull.ts b/src/server/api/endpoints/users/lists/pull.ts index f8b5df0fc5..db15d67d98 100644 --- a/src/server/api/endpoints/users/lists/pull.ts +++ b/src/server/api/endpoints/users/lists/pull.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import { publishUserListStream } from '../../../../../services/stream'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { UserLists, UserListJoinings, Users } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import { publishUserListStream } from '@/services/stream.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { UserLists, UserListJoinings, Users } from '@/models/index.js'; export const meta = { tags: ['lists', 'users'], diff --git a/src/server/api/endpoints/users/lists/push.ts b/src/server/api/endpoints/users/lists/push.ts index 7bb6fc7f79..266e813b16 100644 --- a/src/server/api/endpoints/users/lists/push.ts +++ b/src/server/api/endpoints/users/lists/push.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { getUser } from '../../../common/getters'; -import { pushUserToUserList } from '../../../../../services/user-list/push'; -import { UserLists, UserListJoinings, Blockings } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { getUser } from '../../../common/getters.js'; +import { pushUserToUserList } from '@/services/user-list/push.js'; +import { UserLists, UserListJoinings, Blockings } from '@/models/index.js'; export const meta = { tags: ['lists', 'users'], diff --git a/src/server/api/endpoints/users/lists/show.ts b/src/server/api/endpoints/users/lists/show.ts index ff9ed001f7..c3a49b7472 100644 --- a/src/server/api/endpoints/users/lists/show.ts +++ b/src/server/api/endpoints/users/lists/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { UserLists } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { UserLists } from '@/models/index.js'; export const meta = { tags: ['lists', 'account'], diff --git a/src/server/api/endpoints/users/lists/update.ts b/src/server/api/endpoints/users/lists/update.ts index eaa420a5b9..c883ed420f 100644 --- a/src/server/api/endpoints/users/lists/update.ts +++ b/src/server/api/endpoints/users/lists/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../../define'; -import { ApiError } from '../../../error'; -import { UserLists } from '../../../../../models'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; +import { UserLists } from '@/models/index.js'; export const meta = { tags: ['lists'], diff --git a/src/server/api/endpoints/users/notes.ts b/src/server/api/endpoints/users/notes.ts index 836c3c97b7..ae6d75e641 100644 --- a/src/server/api/endpoints/users/notes.ts +++ b/src/server/api/endpoints/users/notes.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { makePaginationQuery } from '../../common/make-pagination-query'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query'; -import { Notes } from '../../../../models'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { Notes } from '@/models/index.js'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; import { Brackets } from 'typeorm'; -import { generateBlockedUserQuery } from '../../common/generate-block-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; export const meta = { tags: ['users', 'notes'], diff --git a/src/server/api/endpoints/users/pages.ts b/src/server/api/endpoints/users/pages.ts index b9f37f3210..b27b21bac5 100644 --- a/src/server/api/endpoints/users/pages.ts +++ b/src/server/api/endpoints/users/pages.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { Pages } from '../../../../models'; -import { makePaginationQuery } from '../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { Pages } from '@/models/index.js'; +import { makePaginationQuery } from '../../common/make-pagination-query.js'; export const meta = { tags: ['users', 'pages'], diff --git a/src/server/api/endpoints/users/recommendation.ts b/src/server/api/endpoints/users/recommendation.ts index fba4f4f682..0c86c13366 100644 --- a/src/server/api/endpoints/users/recommendation.ts +++ b/src/server/api/endpoints/users/recommendation.ts @@ -1,9 +1,9 @@ import * as ms from 'ms'; import $ from 'cafy'; -import define from '../../define'; -import { Users, Followings } from '../../../../models'; -import { generateMutedUserQueryForUsers } from '../../common/generate-muted-user-query'; -import { generateBlockedUserQuery, generateBlockQueryForUsers } from '../../common/generate-block-query'; +import define from '../../define.js'; +import { Users, Followings } from '@/models/index.js'; +import { generateMutedUserQueryForUsers } from '../../common/generate-muted-user-query.js'; +import { generateBlockedUserQuery, generateBlockQueryForUsers } from '../../common/generate-block-query.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/relation.ts b/src/server/api/endpoints/users/relation.ts index 18ec5d44b3..5998f2dbc2 100644 --- a/src/server/api/endpoints/users/relation.ts +++ b/src/server/api/endpoints/users/relation.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { ID } from '@/misc/cafy-id'; -import { Users } from '../../../../models'; +import define from '../../define.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/report-abuse.ts b/src/server/api/endpoints/users/report-abuse.ts index 776d683700..37de2d533c 100644 --- a/src/server/api/endpoints/users/report-abuse.ts +++ b/src/server/api/endpoints/users/report-abuse.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id'; -import define from '../../define'; -import { publishAdminStream } from '../../../../services/stream'; -import { ApiError } from '../../error'; -import { getUser } from '../../common/getters'; -import { AbuseUserReports, Users } from '../../../../models'; -import { genId } from '@/misc/gen-id'; +import { ID } from '@/misc/cafy-id.js'; +import define from '../../define.js'; +import { publishAdminStream } from '@/services/stream.js'; +import { ApiError } from '../../error.js'; +import { getUser } from '../../common/getters.js'; +import { AbuseUserReports, Users } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/search-by-username-and-host.ts b/src/server/api/endpoints/users/search-by-username-and-host.ts index 13c5a18dbe..690c346e28 100644 --- a/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define'; -import { Users } from '../../../../models'; +import define from '../../define.js'; +import { Users } from '@/models/index.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index c183194c41..46e179b6dc 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define'; -import { UserProfiles, Users } from '../../../../models'; -import { User } from '../../../../models/entities/user'; +import define from '../../define.js'; +import { UserProfiles, Users } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index fde2b5a14d..bd0d65f760 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { resolveUser } from '../../../../remote/resolve-user'; -import define from '../../define'; -import { apiLogger } from '../../logger'; -import { ApiError } from '../../error'; -import { ID } from '@/misc/cafy-id'; -import { Users } from '../../../../models'; +import { resolveUser } from '@/remote/resolve-user.js'; +import define from '../../define.js'; +import { apiLogger } from '../../logger.js'; +import { ApiError } from '../../error.js'; +import { ID } from '@/misc/cafy-id.js'; +import { Users } from '@/models/index.js'; import { In } from 'typeorm'; -import { User } from '@/models/entities/user'; +import { User } from '@/models/entities/user.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/stats.ts b/src/server/api/endpoints/users/stats.ts index 6763c1774e..7cf08f71c9 100644 --- a/src/server/api/endpoints/users/stats.ts +++ b/src/server/api/endpoints/users/stats.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define'; -import { ApiError } from '../../error'; -import { ID } from '@/misc/cafy-id'; -import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, ReversiGames, Users } from '../../../../models'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; +import { ID } from '@/misc/cafy-id.js'; +import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, ReversiGames, Users } from '@/models/index.js'; export const meta = { tags: ['users'], diff --git a/src/server/api/index.ts b/src/server/api/index.ts index aec4a97379..b967f70b3a 100644 --- a/src/server/api/index.ts +++ b/src/server/api/index.ts @@ -8,14 +8,14 @@ import * as multer from '@koa/multer'; import * as bodyParser from 'koa-bodyparser'; import * as cors from '@koa/cors'; -import endpoints from './endpoints'; -import handler from './api-handler'; -import signup from './private/signup'; -import signin from './private/signin'; -import discord from './service/discord'; -import github from './service/github'; -import twitter from './service/twitter'; -import { Instances, AccessTokens, Users } from '../../models'; +import endpoints from './endpoints.js'; +import handler from './api-handler.js'; +import signup from './private/signup.js'; +import signin from './private/signin.js'; +import discord from './service/discord.js'; +import github from './service/github.js'; +import twitter from './service/twitter.js'; +import { Instances, AccessTokens, Users } from '@/models/index.js'; // Init app const app = new Koa(); diff --git a/src/server/api/limiter.ts b/src/server/api/limiter.ts index 540ca24994..f624bd1166 100644 --- a/src/server/api/limiter.ts +++ b/src/server/api/limiter.ts @@ -1,9 +1,9 @@ import * as Limiter from 'ratelimiter'; -import { redisClient } from '../../db/redis'; -import { IEndpoint } from './endpoints'; -import { getAcct } from '@/misc/acct'; -import { User } from '../../models/entities/user'; -import Logger from '../../services/logger'; +import { redisClient } from '../../db/redis.js'; +import { IEndpoint } from './endpoints.js'; +import { getAcct } from '@/misc/acct.js'; +import { User } from '@/models/entities/user.js'; +import Logger from '@/services/logger.js'; const logger = new Logger('limiter'); diff --git a/src/server/api/logger.ts b/src/server/api/logger.ts index dde4b0d5fc..ec22d6c3e2 100644 --- a/src/server/api/logger.ts +++ b/src/server/api/logger.ts @@ -1,3 +1,3 @@ -import Logger from '../../services/logger'; +import Logger from '@/services/logger.js'; export const apiLogger = new Logger('api'); diff --git a/src/server/api/openapi/description.ts b/src/server/api/openapi/description.ts index 6306920b7a..b9e544b04c 100644 --- a/src/server/api/openapi/description.ts +++ b/src/server/api/openapi/description.ts @@ -1,6 +1,6 @@ -import endpoints from '../endpoints'; -import * as locale from '../../../../locales/'; -import { kinds as kindsList } from '@/misc/api-permissions'; +import endpoints from '../endpoints.js'; +import * as locale from '../../../../locales/index.js'; +import { kinds as kindsList } from '@/misc/api-permissions.js'; export interface IKindInfo { endpoints: string[]; diff --git a/src/server/api/openapi/gen-spec.ts b/src/server/api/openapi/gen-spec.ts index adac3bda2c..de87288b42 100644 --- a/src/server/api/openapi/gen-spec.ts +++ b/src/server/api/openapi/gen-spec.ts @@ -1,9 +1,9 @@ -import endpoints from '../endpoints'; +import endpoints from '../endpoints.js'; import { Context } from 'cafy'; -import config from '@/config'; -import { errors as basicErrors } from './errors'; -import { schemas, convertSchemaToOpenApiSchema } from './schemas'; -import { getDescription } from './description'; +import config from '@/config/index.js'; +import { errors as basicErrors } from './errors.js'; +import { schemas, convertSchemaToOpenApiSchema } from './schemas.js'; +import { getDescription } from './description.js'; export function genOpenapiSpec(lang = 'ja-JP') { const spec = { diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts index ee2773fe47..e8bbfe5277 100644 --- a/src/server/api/openapi/schemas.ts +++ b/src/server/api/openapi/schemas.ts @@ -1,26 +1,26 @@ -import { packedUserSchema } from '../../../models/repositories/user'; -import { Schema } from '@/misc/schema'; -import { packedNoteSchema } from '../../../models/repositories/note'; -import { packedUserListSchema } from '../../../models/repositories/user-list'; -import { packedAppSchema } from '../../../models/repositories/app'; -import { packedMessagingMessageSchema } from '../../../models/repositories/messaging-message'; -import { packedNotificationSchema } from '../../../models/repositories/notification'; -import { packedDriveFileSchema } from '../../../models/repositories/drive-file'; -import { packedDriveFolderSchema } from '../../../models/repositories/drive-folder'; -import { packedFollowingSchema } from '../../../models/repositories/following'; -import { packedMutingSchema } from '../../../models/repositories/muting'; -import { packedBlockingSchema } from '../../../models/repositories/blocking'; -import { packedNoteReactionSchema } from '../../../models/repositories/note-reaction'; -import { packedHashtagSchema } from '../../../models/repositories/hashtag'; -import { packedPageSchema } from '../../../models/repositories/page'; -import { packedUserGroupSchema } from '../../../models/repositories/user-group'; -import { packedNoteFavoriteSchema } from '../../../models/repositories/note-favorite'; -import { packedChannelSchema } from '../../../models/repositories/channel'; -import { packedAntennaSchema } from '../../../models/repositories/antenna'; -import { packedClipSchema } from '../../../models/repositories/clip'; -import { packedFederationInstanceSchema } from '../../../models/repositories/federation-instance'; -import { packedQueueCountSchema } from '../../../models/repositories/queue'; -import { packedGalleryPostSchema } from '@/models/repositories/gallery-post'; +import { packedUserSchema } from '@/models/repositories/user.js'; +import { Schema } from '@/misc/schema.js'; +import { packedNoteSchema } from '@/models/repositories/note.js'; +import { packedUserListSchema } from '@/models/repositories/user-list.js'; +import { packedAppSchema } from '@/models/repositories/app.js'; +import { packedMessagingMessageSchema } from '@/models/repositories/messaging-message.js'; +import { packedNotificationSchema } from '@/models/repositories/notification.js'; +import { packedDriveFileSchema } from '@/models/repositories/drive-file.js'; +import { packedDriveFolderSchema } from '@/models/repositories/drive-folder.js'; +import { packedFollowingSchema } from '@/models/repositories/following.js'; +import { packedMutingSchema } from '@/models/repositories/muting.js'; +import { packedBlockingSchema } from '@/models/repositories/blocking.js'; +import { packedNoteReactionSchema } from '@/models/repositories/note-reaction.js'; +import { packedHashtagSchema } from '@/models/repositories/hashtag.js'; +import { packedPageSchema } from '@/models/repositories/page.js'; +import { packedUserGroupSchema } from '@/models/repositories/user-group.js'; +import { packedNoteFavoriteSchema } from '@/models/repositories/note-favorite.js'; +import { packedChannelSchema } from '@/models/repositories/channel.js'; +import { packedAntennaSchema } from '@/models/repositories/antenna.js'; +import { packedClipSchema } from '@/models/repositories/clip.js'; +import { packedFederationInstanceSchema } from '@/models/repositories/federation-instance.js'; +import { packedQueueCountSchema } from '@/models/repositories/queue.js'; +import { packedGalleryPostSchema } from '@/models/repositories/gallery-post.js'; export function convertSchemaToOpenApiSchema(schema: Schema) { const res: any = schema; diff --git a/src/server/api/private/signin.ts b/src/server/api/private/signin.ts index c01c1f265a..1eda141919 100644 --- a/src/server/api/private/signin.ts +++ b/src/server/api/private/signin.ts @@ -1,12 +1,12 @@ import * as Koa from 'koa'; import * as bcrypt from 'bcryptjs'; import * as speakeasy from 'speakeasy'; -import signin from '../common/signin'; -import config from '@/config'; -import { Users, Signins, UserProfiles, UserSecurityKeys, AttestationChallenges } from '../../../models'; -import { ILocalUser } from '../../../models/entities/user'; -import { genId } from '@/misc/gen-id'; -import { verifyLogin, hash } from '../2fa'; +import signin from '../common/signin.js'; +import config from '@/config/index.js'; +import { Users, Signins, UserProfiles, UserSecurityKeys, AttestationChallenges } from '@/models/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; +import { genId } from '@/misc/gen-id.js'; +import { verifyLogin, hash } from '../2fa.js'; import { randomBytes } from 'crypto'; export default async (ctx: Koa.Context) => { diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index f0cf75797a..e554b49a63 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -1,8 +1,8 @@ import * as Koa from 'koa'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { verifyHcaptcha, verifyRecaptcha } from '@/misc/captcha'; -import { Users, RegistrationTickets } from '../../../models'; -import { signup } from '../common/signup'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { verifyHcaptcha, verifyRecaptcha } from '@/misc/captcha.js'; +import { Users, RegistrationTickets } from '@/models/index.js'; +import { signup } from '../common/signup.js'; export default async (ctx: Koa.Context) => { const body = ctx.request.body; diff --git a/src/server/api/service/discord.ts b/src/server/api/service/discord.ts index a684e71fc6..986a4d184c 100644 --- a/src/server/api/service/discord.ts +++ b/src/server/api/service/discord.ts @@ -1,15 +1,15 @@ import * as Koa from 'koa'; import * as Router from '@koa/router'; -import { getJson } from '@/misc/fetch'; +import { getJson } from '@/misc/fetch.js'; import { OAuth2 } from 'oauth'; -import config from '@/config'; -import { publishMainStream } from '../../../services/stream'; -import { redisClient } from '../../../db/redis'; +import config from '@/config/index.js'; +import { publishMainStream } from '@/services/stream.js'; +import { redisClient } from '../../../db/redis.js'; import { v4 as uuid } from 'uuid'; -import signin from '../common/signin'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Users, UserProfiles } from '../../../models'; -import { ILocalUser } from '../../../models/entities/user'; +import signin from '../common/signin.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Users, UserProfiles } from '@/models/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; function getUserToken(ctx: Koa.Context) { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts index 12435b7e81..841b8e5d12 100644 --- a/src/server/api/service/github.ts +++ b/src/server/api/service/github.ts @@ -1,15 +1,15 @@ import * as Koa from 'koa'; import * as Router from '@koa/router'; -import { getJson } from '@/misc/fetch'; +import { getJson } from '@/misc/fetch.js'; import { OAuth2 } from 'oauth'; -import config from '@/config'; -import { publishMainStream } from '../../../services/stream'; -import { redisClient } from '../../../db/redis'; +import config from '@/config/index.js'; +import { publishMainStream } from '@/services/stream.js'; +import { redisClient } from '../../../db/redis.js'; import { v4 as uuid } from 'uuid'; -import signin from '../common/signin'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Users, UserProfiles } from '../../../models'; -import { ILocalUser } from '../../../models/entities/user'; +import signin from '../common/signin.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Users, UserProfiles } from '@/models/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; function getUserToken(ctx: Koa.Context) { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; diff --git a/src/server/api/service/twitter.ts b/src/server/api/service/twitter.ts index 8520a5656f..5b08e0533a 100644 --- a/src/server/api/service/twitter.ts +++ b/src/server/api/service/twitter.ts @@ -2,13 +2,13 @@ import * as Koa from 'koa'; import * as Router from '@koa/router'; import { v4 as uuid } from 'uuid'; import autwh from 'autwh'; -import { redisClient } from '../../../db/redis'; -import { publishMainStream } from '../../../services/stream'; -import config from '@/config'; -import signin from '../common/signin'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Users, UserProfiles } from '../../../models'; -import { ILocalUser } from '../../../models/entities/user'; +import { redisClient } from '../../../db/redis.js'; +import { publishMainStream } from '@/services/stream.js'; +import config from '@/config/index.js'; +import signin from '../common/signin.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Users, UserProfiles } from '@/models/index.js'; +import { ILocalUser } from '@/models/entities/user.js'; function getUserToken(ctx: Koa.Context) { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; diff --git a/src/server/api/stream/channels/admin.ts b/src/server/api/stream/channels/admin.ts index 1ff932d1dd..e68490d05c 100644 --- a/src/server/api/stream/channels/admin.ts +++ b/src/server/api/stream/channels/admin.ts @@ -1,5 +1,5 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel'; +import Channel from '../channel.js'; export default class extends Channel { public readonly chName = 'admin'; diff --git a/src/server/api/stream/channels/antenna.ts b/src/server/api/stream/channels/antenna.ts index db4fab8412..6c672ffd65 100644 --- a/src/server/api/stream/channels/antenna.ts +++ b/src/server/api/stream/channels/antenna.ts @@ -1,8 +1,8 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel'; -import { Notes } from '../../../../models'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import Channel from '../channel.js'; +import { Notes } from '@/models/index.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; export default class extends Channel { public readonly chName = 'antenna'; diff --git a/src/server/api/stream/channels/channel.ts b/src/server/api/stream/channels/channel.ts index 7910f0f2f8..8665c8253d 100644 --- a/src/server/api/stream/channels/channel.ts +++ b/src/server/api/stream/channels/channel.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel'; -import { Notes, Users } from '../../../../models'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; -import { PackedNote } from '../../../../models/repositories/note'; -import { User } from '../../../../models/entities/user'; +import Channel from '../channel.js'; +import { Notes, Users } from '@/models/index.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { User } from '@/models/entities/user.js'; export default class extends Channel { public readonly chName = 'channel'; diff --git a/src/server/api/stream/channels/drive.ts b/src/server/api/stream/channels/drive.ts index 4112dd9b04..66f2647942 100644 --- a/src/server/api/stream/channels/drive.ts +++ b/src/server/api/stream/channels/drive.ts @@ -1,5 +1,5 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel'; +import Channel from '../channel.js'; export default class extends Channel { public readonly chName = 'drive'; diff --git a/src/server/api/stream/channels/games/reversi-game.ts b/src/server/api/stream/channels/games/reversi-game.ts index e1c2116ac6..a13d79d3c3 100644 --- a/src/server/api/stream/channels/games/reversi-game.ts +++ b/src/server/api/stream/channels/games/reversi-game.ts @@ -1,12 +1,12 @@ import autobind from 'autobind-decorator'; import * as CRC32 from 'crc-32'; -import { publishReversiGameStream } from '../../../../../services/stream'; -import Reversi from '../../../../../games/reversi/core'; -import * as maps from '../../../../../games/reversi/maps'; -import Channel from '../../channel'; -import { ReversiGame } from '../../../../../models/entities/games/reversi/game'; -import { ReversiGames, Users } from '../../../../../models'; -import { User } from '../../../../../models/entities/user'; +import { publishReversiGameStream } from '@/services/stream.js'; +import Reversi from '../../../../../games/reversi/core.js'; +import * as maps from '../../../../../games/reversi/maps.js'; +import Channel from '../../channel.js'; +import { ReversiGame } from '@/models/entities/games/reversi/game.js'; +import { ReversiGames, Users } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; export default class extends Channel { public readonly chName = 'gamesReversiGame'; diff --git a/src/server/api/stream/channels/games/reversi.ts b/src/server/api/stream/channels/games/reversi.ts index e0e41d9acd..f8fa7b94e1 100644 --- a/src/server/api/stream/channels/games/reversi.ts +++ b/src/server/api/stream/channels/games/reversi.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import { publishMainStream } from '../../../../../services/stream'; -import Channel from '../../channel'; -import { ReversiMatchings } from '../../../../../models'; +import { publishMainStream } from '@/services/stream.js'; +import Channel from '../../channel.js'; +import { ReversiMatchings } from '@/models/index.js'; export default class extends Channel { public readonly chName = 'gamesReversi'; diff --git a/src/server/api/stream/channels/global-timeline.ts b/src/server/api/stream/channels/global-timeline.ts index 02792bffa4..1e1e8b5c96 100644 --- a/src/server/api/stream/channels/global-timeline.ts +++ b/src/server/api/stream/channels/global-timeline.ts @@ -1,11 +1,11 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import Channel from '../channel'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Notes } from '../../../../models'; -import { PackedNote } from '../../../../models/repositories/note'; -import { checkWordMute } from '@/misc/check-word-mute'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import Channel from '../channel.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Notes } from '@/models/index.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { checkWordMute } from '@/misc/check-word-mute.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; export default class extends Channel { public readonly chName = 'globalTimeline'; diff --git a/src/server/api/stream/channels/hashtag.ts b/src/server/api/stream/channels/hashtag.ts index 4cabd4db62..8a5b7a267d 100644 --- a/src/server/api/stream/channels/hashtag.ts +++ b/src/server/api/stream/channels/hashtag.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import Channel from '../channel'; -import { Notes } from '../../../../models'; -import { PackedNote } from '../../../../models/repositories/note'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import Channel from '../channel.js'; +import { Notes } from '@/models/index.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; export default class extends Channel { public readonly chName = 'hashtag'; diff --git a/src/server/api/stream/channels/home-timeline.ts b/src/server/api/stream/channels/home-timeline.ts index 7659b5ffa3..e19cd077c3 100644 --- a/src/server/api/stream/channels/home-timeline.ts +++ b/src/server/api/stream/channels/home-timeline.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import Channel from '../channel'; -import { Notes } from '../../../../models'; -import { PackedNote } from '../../../../models/repositories/note'; -import { checkWordMute } from '@/misc/check-word-mute'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import Channel from '../channel.js'; +import { Notes } from '@/models/index.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { checkWordMute } from '@/misc/check-word-mute.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; export default class extends Channel { public readonly chName = 'homeTimeline'; diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts index 664435f674..4d48075af6 100644 --- a/src/server/api/stream/channels/hybrid-timeline.ts +++ b/src/server/api/stream/channels/hybrid-timeline.ts @@ -1,12 +1,12 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import Channel from '../channel'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Notes } from '../../../../models'; -import { PackedNote } from '../../../../models/repositories/note'; -import { PackedUser } from '../../../../models/repositories/user'; -import { checkWordMute } from '@/misc/check-word-mute'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import Channel from '../channel.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Notes } from '@/models/index.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { PackedUser } from '@/models/repositories/user.js'; +import { checkWordMute } from '@/misc/check-word-mute.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; export default class extends Channel { public readonly chName = 'hybridTimeline'; diff --git a/src/server/api/stream/channels/index.ts b/src/server/api/stream/channels/index.ts index 1841573043..39f4d235f1 100644 --- a/src/server/api/stream/channels/index.ts +++ b/src/server/api/stream/channels/index.ts @@ -1,20 +1,20 @@ -import main from './main'; -import homeTimeline from './home-timeline'; -import localTimeline from './local-timeline'; -import hybridTimeline from './hybrid-timeline'; -import globalTimeline from './global-timeline'; -import serverStats from './server-stats'; -import queueStats from './queue-stats'; -import userList from './user-list'; -import antenna from './antenna'; -import messaging from './messaging'; -import messagingIndex from './messaging-index'; -import drive from './drive'; -import hashtag from './hashtag'; -import channel from './channel'; -import admin from './admin'; -import gamesReversi from './games/reversi'; -import gamesReversiGame from './games/reversi-game'; +import main from './main.js'; +import homeTimeline from './home-timeline.js'; +import localTimeline from './local-timeline.js'; +import hybridTimeline from './hybrid-timeline.js'; +import globalTimeline from './global-timeline.js'; +import serverStats from './server-stats.js'; +import queueStats from './queue-stats.js'; +import userList from './user-list.js'; +import antenna from './antenna.js'; +import messaging from './messaging.js'; +import messagingIndex from './messaging-index.js'; +import drive from './drive.js'; +import hashtag from './hashtag.js'; +import channel from './channel.js'; +import admin from './admin.js'; +import gamesReversi from './games/reversi.js'; +import gamesReversiGame from './games/reversi-game.js'; export default { main, diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts index 528059daba..c01ca5347b 100644 --- a/src/server/api/stream/channels/local-timeline.ts +++ b/src/server/api/stream/channels/local-timeline.ts @@ -1,12 +1,12 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import Channel from '../channel'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Notes } from '../../../../models'; -import { PackedNote } from '../../../../models/repositories/note'; -import { PackedUser } from '../../../../models/repositories/user'; -import { checkWordMute } from '@/misc/check-word-mute'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import Channel from '../channel.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Notes } from '@/models/index.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { PackedUser } from '@/models/repositories/user.js'; +import { checkWordMute } from '@/misc/check-word-mute.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; export default class extends Channel { public readonly chName = 'localTimeline'; diff --git a/src/server/api/stream/channels/main.ts b/src/server/api/stream/channels/main.ts index 780bc0b89f..103c61a0fb 100644 --- a/src/server/api/stream/channels/main.ts +++ b/src/server/api/stream/channels/main.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel'; -import { Notes } from '../../../../models'; +import Channel from '../channel.js'; +import { Notes } from '@/models/index.js'; export default class extends Channel { public readonly chName = 'main'; diff --git a/src/server/api/stream/channels/messaging-index.ts b/src/server/api/stream/channels/messaging-index.ts index 0c495398ab..24f8aad400 100644 --- a/src/server/api/stream/channels/messaging-index.ts +++ b/src/server/api/stream/channels/messaging-index.ts @@ -1,5 +1,5 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel'; +import Channel from '../channel.js'; export default class extends Channel { public readonly chName = 'messagingIndex'; diff --git a/src/server/api/stream/channels/messaging.ts b/src/server/api/stream/channels/messaging.ts index 58427e2771..c16507a5f3 100644 --- a/src/server/api/stream/channels/messaging.ts +++ b/src/server/api/stream/channels/messaging.ts @@ -1,8 +1,8 @@ import autobind from 'autobind-decorator'; -import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message'; -import Channel from '../channel'; -import { UserGroupJoinings, Users, MessagingMessages } from '../../../../models'; -import { User, ILocalUser, IRemoteUser } from '../../../../models/entities/user'; +import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message.js'; +import Channel from '../channel.js'; +import { UserGroupJoinings, Users, MessagingMessages } from '@/models/index.js'; +import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; export default class extends Channel { public readonly chName = 'messaging'; diff --git a/src/server/api/stream/channels/queue-stats.ts b/src/server/api/stream/channels/queue-stats.ts index 0bda0cfcb9..f05e619b96 100644 --- a/src/server/api/stream/channels/queue-stats.ts +++ b/src/server/api/stream/channels/queue-stats.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Xev from 'xev'; -import Channel from '../channel'; +import Channel from '../channel.js'; const ev = new Xev(); diff --git a/src/server/api/stream/channels/server-stats.ts b/src/server/api/stream/channels/server-stats.ts index d245a7f70c..76eb5b0f26 100644 --- a/src/server/api/stream/channels/server-stats.ts +++ b/src/server/api/stream/channels/server-stats.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Xev from 'xev'; -import Channel from '../channel'; +import Channel from '../channel.js'; const ev = new Xev(); diff --git a/src/server/api/stream/channels/user-list.ts b/src/server/api/stream/channels/user-list.ts index 1f42fbe49e..ca8e46d507 100644 --- a/src/server/api/stream/channels/user-list.ts +++ b/src/server/api/stream/channels/user-list.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel'; -import { Notes, UserListJoinings, UserLists } from '../../../../models'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import { User } from '../../../../models/entities/user'; -import { PackedNote } from '../../../../models/repositories/note'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import Channel from '../channel.js'; +import { Notes, UserListJoinings, UserLists } from '@/models/index.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import { User } from '@/models/entities/user.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; export default class extends Channel { public readonly chName = 'userList'; diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index 96d4194a7d..1947be0a75 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -1,20 +1,20 @@ import autobind from 'autobind-decorator'; import * as websocket from 'websocket'; -import { readNotification } from '../common/read-notification'; -import call from '../call'; -import readNote from '../../../services/note/read'; -import Channel from './channel'; -import channels from './channels'; +import { readNotification } from '../common/read-notification.js'; +import call from '../call.js'; +import readNote from '@/services/note/read.js'; +import Channel from './channel.js'; +import channels from './channels/index.js'; import { EventEmitter } from 'events'; -import { User } from '../../../models/entities/user'; -import { Channel as ChannelModel } from '../../../models/entities/channel'; -import { Users, Followings, Mutings, UserProfiles, ChannelFollowings, Blockings } from '../../../models'; -import { ApiError } from '../error'; -import { AccessToken } from '../../../models/entities/access-token'; -import { UserProfile } from '../../../models/entities/user-profile'; -import { publishChannelStream, publishGroupMessagingStream, publishMessagingStream } from '../../../services/stream'; -import { UserGroup } from '../../../models/entities/user-group'; -import { PackedNote } from '../../../models/repositories/note'; +import { User } from '@/models/entities/user.js'; +import { Channel as ChannelModel } from '@/models/entities/channel.js'; +import { Users, Followings, Mutings, UserProfiles, ChannelFollowings, Blockings } from '@/models/index.js'; +import { ApiError } from '../error.js'; +import { AccessToken } from '@/models/entities/access-token.js'; +import { UserProfile } from '@/models/entities/user-profile.js'; +import { publishChannelStream, publishGroupMessagingStream, publishMessagingStream } from '@/services/stream.js'; +import { UserGroup } from '@/models/entities/user-group.js'; +import { PackedNote } from '@/models/repositories/note.js'; /** * Main stream connection diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index b431bc5ad3..115692bed0 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -1,12 +1,12 @@ import * as http from 'http'; import * as websocket from 'websocket'; -import MainStreamConnection from './stream'; +import MainStreamConnection from './stream/index.js'; import { ParsedUrlQuery } from 'querystring'; -import authenticate from './authenticate'; +import authenticate from './authenticate.js'; import { EventEmitter } from 'events'; -import { subsdcriber as redisClient } from '../../db/redis'; -import { Users } from '@/models'; +import { subsdcriber as redisClient } from '../../db/redis.js'; +import { Users } from '@/models/index.js'; module.exports = (server: http.Server) => { // Init websocket server diff --git a/src/server/file/index.ts b/src/server/file/index.ts index 0410efb99c..c58c3cbf25 100644 --- a/src/server/file/index.ts +++ b/src/server/file/index.ts @@ -3,10 +3,16 @@ */ import * as fs from 'fs'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; import * as Koa from 'koa'; import * as cors from '@koa/cors'; import * as Router from '@koa/router'; -import sendDriveFile from './send-drive-file'; +import sendDriveFile from './send-drive-file.js'; + +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); // Init app const app = new Koa(); @@ -16,7 +22,7 @@ app.use(cors()); const router = new Router(); router.get('/app-default.jpg', ctx => { - const file = fs.createReadStream(`${__dirname}/assets/dummy.png`); + const file = fs.createReadStream(`${_dirname}/assets/dummy.png`); ctx.body = file; ctx.set('Content-Type', 'image/jpeg'); ctx.set('Cache-Control', 'max-age=31536000, immutable'); diff --git a/src/server/file/send-drive-file.ts b/src/server/file/send-drive-file.ts index 9745b1201d..f4f4bdb3c7 100644 --- a/src/server/file/send-drive-file.ts +++ b/src/server/file/send-drive-file.ts @@ -1,18 +1,24 @@ +import * as fs from 'fs'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; import * as Koa from 'koa'; import * as send from 'koa-send'; import * as rename from 'rename'; import * as tmp from 'tmp'; -import * as fs from 'fs'; -import { serverLogger } from '..'; -import { contentDisposition } from '@/misc/content-disposition'; -import { DriveFiles } from '../../models'; -import { InternalStorage } from '../../services/drive/internal-storage'; -import { downloadUrl } from '@/misc/download-url'; -import { detectType } from '@/misc/get-file-info'; -import { convertToJpeg, convertToPngOrJpeg } from '../../services/drive/image-processor'; -import { GenerateVideoThumbnail } from '../../services/drive/generate-video-thumbnail'; +import { serverLogger } from '../index.js'; +import { contentDisposition } from '@/misc/content-disposition.js'; +import { DriveFiles } from '@/models/index.js'; +import { InternalStorage } from '@/services/drive/internal-storage.js'; +import { downloadUrl } from '@/misc/download-url.js'; +import { detectType } from '@/misc/get-file-info.js'; +import { convertToJpeg, convertToPngOrJpeg } from '@/services/drive/image-processor.js'; +import { GenerateVideoThumbnail } from '@/services/drive/generate-video-thumbnail.js'; -const assets = `${__dirname}/../../server/file/assets/`; +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); + +const assets = `${_dirname}/../../server/file/assets/`; const commonReadableHandlerGenerator = (ctx: Koa.Context) => (e: Error): void => { serverLogger.error(e); diff --git a/src/server/index.ts b/src/server/index.ts index 3b43aa7674..bf83b7dd42 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -13,19 +13,19 @@ import * as koaLogger from 'koa-logger'; import * as requestStats from 'request-stats'; import * as slow from 'koa-slow'; -import activityPub from './activitypub'; -import nodeinfo from './nodeinfo'; -import wellKnown from './well-known'; -import config from '@/config'; -import apiServer from './api'; -import { sum } from '../prelude/array'; -import Logger from '../services/logger'; -import { program } from '../argv'; -import { UserProfiles, Users } from '../models'; -import { networkChart } from '../services/chart'; -import { genAvatar } from '@/misc/gen-avatar'; -import { createTemp } from '@/misc/create-temp'; -import { publishMainStream } from '../services/stream'; +import activityPub from './activitypub.js'; +import nodeinfo from './nodeinfo.js'; +import wellKnown from './well-known.js'; +import config from '@/config/index.js'; +import apiServer from './api/index.js'; +import { sum } from '../prelude/array.js'; +import Logger from '@/services/logger.js'; +import { program } from '../argv.js'; +import { UserProfiles, Users } from '@/models/index.js'; +import { networkChart } from '@/services/chart/index.js'; +import { genAvatar } from '@/misc/gen-avatar.js'; +import { createTemp } from '@/misc/create-temp.js'; +import { publishMainStream } from '@/services/stream.js'; export const serverLogger = new Logger('server', 'gray', false); diff --git a/src/server/nodeinfo.ts b/src/server/nodeinfo.ts index 7a1d5b6292..3600bd2acd 100644 --- a/src/server/nodeinfo.ts +++ b/src/server/nodeinfo.ts @@ -1,9 +1,9 @@ import * as Router from '@koa/router'; -import config from '@/config'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { Users } from '../models'; -// import User from '../models/user'; -// import Note from '../models/note'; +import config from '@/config/index.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Users } from '@/models/index.js'; +// import User from '../models/user.js'; +// import Note from '../models/note.js'; const router = new Router(); diff --git a/src/server/proxy/index.ts b/src/server/proxy/index.ts index 9ef198d31b..210c2fcf12 100644 --- a/src/server/proxy/index.ts +++ b/src/server/proxy/index.ts @@ -5,7 +5,7 @@ import * as Koa from 'koa'; import * as cors from '@koa/cors'; import * as Router from '@koa/router'; -import { proxyMedia } from './proxy-media'; +import { proxyMedia } from './proxy-media.js'; // Init app const app = new Koa(); diff --git a/src/server/proxy/proxy-media.ts b/src/server/proxy/proxy-media.ts index f91df55624..3200266bed 100644 --- a/src/server/proxy/proxy-media.ts +++ b/src/server/proxy/proxy-media.ts @@ -1,10 +1,10 @@ import * as fs from 'fs'; import * as Koa from 'koa'; -import { serverLogger } from '..'; -import { IImage, convertToPng, convertToJpeg } from '../../services/drive/image-processor'; -import { createTemp } from '@/misc/create-temp'; -import { downloadUrl } from '@/misc/download-url'; -import { detectType } from '@/misc/get-file-info'; +import { serverLogger } from '../index.js'; +import { IImage, convertToPng, convertToJpeg } from '@/services/drive/image-processor.js'; +import { createTemp } from '@/misc/create-temp.js'; +import { downloadUrl } from '@/misc/download-url.js'; +import { detectType } from '@/misc/get-file-info.js'; export async function proxyMedia(ctx: Koa.Context) { const url = 'url' in ctx.query ? ctx.query.url : 'https://' + ctx.params.url; diff --git a/src/server/web/feed.ts b/src/server/web/feed.ts index d4792c63aa..57b1401e35 100644 --- a/src/server/web/feed.ts +++ b/src/server/web/feed.ts @@ -1,7 +1,7 @@ import { Feed } from 'feed'; -import config from '@/config'; -import { User } from '../../models/entities/user'; -import { Notes, DriveFiles, UserProfiles } from '../../models'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; +import { Notes, DriveFiles, UserProfiles } from '@/models/index.js'; import { In } from 'typeorm'; export default async function(user: User) { diff --git a/src/server/web/index.ts b/src/server/web/index.ts index 44ab2a997f..68cfc5d0f0 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -4,7 +4,9 @@ import * as os from 'os'; import * as fs from 'fs'; -import ms = require('ms'); +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; +import * as ms from 'ms'; import * as Koa from 'koa'; import * as Router from '@koa/router'; import * as send from 'koa-send'; @@ -13,37 +15,41 @@ import * as views from 'koa-views'; import * as glob from 'glob'; import * as MarkdownIt from 'markdown-it'; -import packFeed from './feed'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { genOpenapiSpec } from '../api/openapi/gen-spec'; -import config from '@/config'; -import { Users, Notes, Emojis, UserProfiles, Pages, Channels, Clips, GalleryPosts } from '../../models'; -import { parseAcct } from '@/misc/acct'; -import { getNoteSummary } from '@/misc/get-note-summary'; +import packFeed from './feed.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { genOpenapiSpec } from '../api/openapi/gen-spec.js'; +import config from '@/config/index.js'; +import { Users, Notes, Emojis, UserProfiles, Pages, Channels, Clips, GalleryPosts } from '@/models/index.js'; +import { parseAcct } from '@/misc/acct.js'; +import { getNoteSummary } from '@/misc/get-note-summary.js'; import { getConnection } from 'typeorm'; -import { redisClient } from '../../db/redis'; -import locales = require('../../../locales'); +import { redisClient } from '../../db/redis.js'; +import locales from '../../../locales/index.js'; + +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); const markdown = MarkdownIt({ html: true }); -const changelog = fs.readFileSync(`${__dirname}/../../../CHANGELOG.md`, { encoding: 'utf8' }); +const changelog = fs.readFileSync(`${_dirname}/../../../CHANGELOG.md`, { encoding: 'utf8' }); function genDoc(path: string): string { let md = fs.readFileSync(path, { encoding: 'utf8' }); md = md.replace('', changelog); return md; } -const staticAssets = `${__dirname}/../../../assets/`; -const docAssets = `${__dirname}/../../../src/docs/`; -const assets = `${__dirname}/../../assets/`; +const staticAssets = `${_dirname}/../../../assets/`; +const docAssets = `${_dirname}/../../../src/docs/`; +const assets = `${_dirname}/../../assets/`; // Init app const app = new Koa(); // Init renderer -app.use(views(__dirname + '/views', { +app.use(views(_dirname + '/views', { extension: 'pug', options: { version: config.version, @@ -52,7 +58,7 @@ app.use(views(__dirname + '/views', { })); // Serve favicon -app.use(favicon(`${__dirname}/../../../assets/favicon.ico`)); +app.use(favicon(`${_dirname}/../../../assets/favicon.ico`)); // Common request handler app.use(async (ctx, next) => { @@ -75,7 +81,7 @@ router.get('/static-assets/(.*)', async ctx => { router.get('/doc-assets/(.*)', async ctx => { if (ctx.path.includes('..')) return; - const path = `${__dirname}/../../../src/docs/${ctx.path.replace('/doc-assets/', '')}`; + const path = `${_dirname}/../../../src/docs/${ctx.path.replace('/doc-assets/', '')}`; const doc = genDoc(path); ctx.set('Content-Type', 'text/plain; charset=utf-8'); ctx.body = doc; @@ -134,7 +140,7 @@ router.get('/docs.json', async ctx => { ctx.body = []; return; } - const dirPath = `${__dirname}/../../../src/docs/${lang}`.replace(/\\/g, '/'); + const dirPath = `${_dirname}/../../../src/docs/${lang}`.replace(/\\/g, '/'); const paths = glob.sync(`${dirPath}/**/*.md`); const docs: { path: string; title: string; summary: string; }[] = []; for (const path of paths) { diff --git a/src/server/web/manifest.ts b/src/server/web/manifest.ts index 918fe27c03..a35b2a5696 100644 --- a/src/server/web/manifest.ts +++ b/src/server/web/manifest.ts @@ -1,6 +1,6 @@ import * as Koa from 'koa'; import * as manifest from './manifest.json'; -import { fetchMeta } from '@/misc/fetch-meta'; +import { fetchMeta } from '@/misc/fetch-meta.js'; module.exports = async (ctx: Koa.Context) => { const json = JSON.parse(JSON.stringify(manifest)); diff --git a/src/server/web/url-preview.ts b/src/server/web/url-preview.ts index 1ba8e0034a..af9e2c77f5 100644 --- a/src/server/web/url-preview.ts +++ b/src/server/web/url-preview.ts @@ -1,10 +1,10 @@ import * as Koa from 'koa'; import summaly from 'summaly'; -import { fetchMeta } from '@/misc/fetch-meta'; -import Logger from '../../services/logger'; -import config from '@/config'; -import { query } from '../../prelude/url'; -import { getJson } from '@/misc/fetch'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import Logger from '@/services/logger.js'; +import config from '@/config/index.js'; +import { query } from '../../prelude/url.js'; +import { getJson } from '@/misc/fetch.js'; const logger = new Logger('url-preview'); diff --git a/src/server/well-known.ts b/src/server/well-known.ts index 5771db91d0..d5fd44069d 100644 --- a/src/server/well-known.ts +++ b/src/server/well-known.ts @@ -1,11 +1,11 @@ import * as Router from '@koa/router'; -import config from '@/config'; -import { parseAcct, Acct } from '@/misc/acct'; -import { links } from './nodeinfo'; -import { escapeAttribute, escapeValue } from '../prelude/xml'; -import { Users } from '../models'; -import { User } from '../models/entities/user'; +import config from '@/config/index.js'; +import { parseAcct, Acct } from '@/misc/acct.js'; +import { links } from './nodeinfo.js'; +import { escapeAttribute, escapeValue } from '../prelude/xml.js'; +import { Users } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; // Init router const router = new Router(); diff --git a/src/services/add-note-to-antenna.ts b/src/services/add-note-to-antenna.ts index 56d0149155..f285b7a605 100644 --- a/src/services/add-note-to-antenna.ts +++ b/src/services/add-note-to-antenna.ts @@ -1,10 +1,10 @@ -import { Antenna } from '../models/entities/antenna'; -import { Note } from '../models/entities/note'; -import { AntennaNotes, Mutings, Notes } from '../models'; -import { genId } from '@/misc/gen-id'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related'; -import { publishAntennaStream, publishMainStream } from './stream'; -import { User } from '../models/entities/user'; +import { Antenna } from '@/models/entities/antenna.js'; +import { Note } from '@/models/entities/note.js'; +import { AntennaNotes, Mutings, Notes } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; +import { publishAntennaStream, publishMainStream } from '@/services/stream.js'; +import { User } from '@/models/entities/user.js'; export async function addNoteToAntenna(antenna: Antenna, note: Note, noteUser: { id: User['id']; }) { // 通知しない設定になっているか、自分自身の投稿なら既読にする diff --git a/src/services/blocking/create.ts b/src/services/blocking/create.ts index d92856689c..415223f089 100644 --- a/src/services/blocking/create.ts +++ b/src/services/blocking/create.ts @@ -1,14 +1,14 @@ -import { publishMainStream, publishUserEvent } from '../stream'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderFollow from '../../remote/activitypub/renderer/follow'; -import renderUndo from '../../remote/activitypub/renderer/undo'; -import renderBlock from '../../remote/activitypub/renderer/block'; -import { deliver } from '../../queue'; -import renderReject from '../../remote/activitypub/renderer/reject'; -import { User } from '../../models/entities/user'; -import { Blockings, Users, FollowRequests, Followings, UserListJoinings, UserLists } from '../../models'; -import { perUserFollowingChart } from '../chart'; -import { genId } from '@/misc/gen-id'; +import { publishMainStream, publishUserEvent } from '@/services/stream.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderFollow from '@/remote/activitypub/renderer/follow.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import renderBlock from '@/remote/activitypub/renderer/block.js'; +import { deliver } from '@/queue/index.js'; +import renderReject from '@/remote/activitypub/renderer/reject.js'; +import { User } from '@/models/entities/user.js'; +import { Blockings, Users, FollowRequests, Followings, UserListJoinings, UserLists } from '@/models/index.js'; +import { perUserFollowingChart } from '@/services/chart/index.js'; +import { genId } from '@/misc/gen-id.js'; export default async function(blocker: User, blockee: User) { await Promise.all([ diff --git a/src/services/blocking/delete.ts b/src/services/blocking/delete.ts index 2c05cb7f3f..240c0b15d1 100644 --- a/src/services/blocking/delete.ts +++ b/src/services/blocking/delete.ts @@ -1,10 +1,10 @@ -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderBlock from '../../remote/activitypub/renderer/block'; -import renderUndo from '../../remote/activitypub/renderer/undo'; -import { deliver } from '../../queue'; -import Logger from '../logger'; -import { User } from '../../models/entities/user'; -import { Blockings, Users } from '../../models'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderBlock from '@/remote/activitypub/renderer/block.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import { deliver } from '@/queue/index.js'; +import Logger from '../logger.js'; +import { User } from '@/models/entities/user.js'; +import { Blockings, Users } from '@/models/index.js'; const logger = new Logger('blocking/delete'); diff --git a/src/services/chart/charts/classes/active-users.ts b/src/services/chart/charts/classes/active-users.ts index e732b25d24..959eb0f8e1 100644 --- a/src/services/chart/charts/classes/active-users.ts +++ b/src/services/chart/charts/classes/active-users.ts @@ -1,9 +1,9 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { User } from '../../../../models/entities/user'; -import { SchemaType } from '@/misc/schema'; -import { Users } from '../../../../models'; -import { name, schema } from '../schemas/active-users'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { User } from '@/models/entities/user.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Users } from '@/models/index.js'; +import { name, schema } from '../schemas/active-users.js'; type ActiveUsersLog = SchemaType; diff --git a/src/services/chart/charts/classes/drive.ts b/src/services/chart/charts/classes/drive.ts index 18537918f0..9bd64074ed 100644 --- a/src/services/chart/charts/classes/drive.ts +++ b/src/services/chart/charts/classes/drive.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { DriveFiles } from '../../../../models'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { DriveFiles } from '@/models/index.js'; import { Not, IsNull } from 'typeorm'; -import { DriveFile } from '../../../../models/entities/drive-file'; -import { name, schema } from '../schemas/drive'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { name, schema } from '../schemas/drive.js'; type DriveLog = SchemaType; diff --git a/src/services/chart/charts/classes/federation.ts b/src/services/chart/charts/classes/federation.ts index e593a53cf1..39feed7b14 100644 --- a/src/services/chart/charts/classes/federation.ts +++ b/src/services/chart/charts/classes/federation.ts @@ -1,8 +1,8 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { Instances } from '../../../../models'; -import { name, schema } from '../schemas/federation'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Instances } from '@/models/index.js'; +import { name, schema } from '../schemas/federation.js'; type FederationLog = SchemaType; diff --git a/src/services/chart/charts/classes/hashtag.ts b/src/services/chart/charts/classes/hashtag.ts index 98d5421c9b..13f4598499 100644 --- a/src/services/chart/charts/classes/hashtag.ts +++ b/src/services/chart/charts/classes/hashtag.ts @@ -1,9 +1,9 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { User } from '../../../../models/entities/user'; -import { SchemaType } from '@/misc/schema'; -import { Users } from '../../../../models'; -import { name, schema } from '../schemas/hashtag'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { User } from '@/models/entities/user.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Users } from '@/models/index.js'; +import { name, schema } from '../schemas/hashtag.js'; type HashtagLog = SchemaType; diff --git a/src/services/chart/charts/classes/instance.ts b/src/services/chart/charts/classes/instance.ts index f93da58d61..429d4067bd 100644 --- a/src/services/chart/charts/classes/instance.ts +++ b/src/services/chart/charts/classes/instance.ts @@ -1,11 +1,11 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { DriveFiles, Followings, Users, Notes } from '../../../../models'; -import { DriveFile } from '../../../../models/entities/drive-file'; -import { name, schema } from '../schemas/instance'; -import { Note } from '../../../../models/entities/note'; -import { toPuny } from '@/misc/convert-host'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { DriveFiles, Followings, Users, Notes } from '@/models/index.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { name, schema } from '../schemas/instance.js'; +import { Note } from '@/models/entities/note.js'; +import { toPuny } from '@/misc/convert-host.js'; type InstanceLog = SchemaType; diff --git a/src/services/chart/charts/classes/network.ts b/src/services/chart/charts/classes/network.ts index 2ce75e0b34..1e39115b02 100644 --- a/src/services/chart/charts/classes/network.ts +++ b/src/services/chart/charts/classes/network.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { name, schema } from '../schemas/network'; +import Chart, { DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { name, schema } from '../schemas/network.js'; type NetworkLog = SchemaType; diff --git a/src/services/chart/charts/classes/notes.ts b/src/services/chart/charts/classes/notes.ts index a6eb653b70..7cc3c7de83 100644 --- a/src/services/chart/charts/classes/notes.ts +++ b/src/services/chart/charts/classes/notes.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { Notes } from '../../../../models'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Notes } from '@/models/index.js'; import { Not, IsNull } from 'typeorm'; -import { Note } from '../../../../models/entities/note'; -import { name, schema } from '../schemas/notes'; +import { Note } from '@/models/entities/note.js'; +import { name, schema } from '../schemas/notes.js'; type NotesLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-drive.ts b/src/services/chart/charts/classes/per-user-drive.ts index 182e5927e8..04b29c0abe 100644 --- a/src/services/chart/charts/classes/per-user-drive.ts +++ b/src/services/chart/charts/classes/per-user-drive.ts @@ -1,9 +1,9 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { DriveFiles } from '../../../../models'; -import { DriveFile } from '../../../../models/entities/drive-file'; -import { name, schema } from '../schemas/per-user-drive'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { DriveFiles } from '@/models/index.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { name, schema } from '../schemas/per-user-drive.js'; type PerUserDriveLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-following.ts b/src/services/chart/charts/classes/per-user-following.ts index 5972d3759b..43ca9d3b6c 100644 --- a/src/services/chart/charts/classes/per-user-following.ts +++ b/src/services/chart/charts/classes/per-user-following.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { Followings, Users } from '../../../../models'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Followings, Users } from '@/models/index.js'; import { Not, IsNull } from 'typeorm'; -import { User } from '../../../../models/entities/user'; -import { name, schema } from '../schemas/per-user-following'; +import { User } from '@/models/entities/user.js'; +import { name, schema } from '../schemas/per-user-following.js'; type PerUserFollowingLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-notes.ts b/src/services/chart/charts/classes/per-user-notes.ts index 7f93965adb..3da16f8139 100644 --- a/src/services/chart/charts/classes/per-user-notes.ts +++ b/src/services/chart/charts/classes/per-user-notes.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { User } from '../../../../models/entities/user'; -import { SchemaType } from '@/misc/schema'; -import { Notes } from '../../../../models'; -import { Note } from '../../../../models/entities/note'; -import { name, schema } from '../schemas/per-user-notes'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { User } from '@/models/entities/user.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Notes } from '@/models/index.js'; +import { Note } from '@/models/entities/note.js'; +import { name, schema } from '../schemas/per-user-notes.js'; type PerUserNotesLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-reactions.ts b/src/services/chart/charts/classes/per-user-reactions.ts index 69ed81cd44..d4665c0677 100644 --- a/src/services/chart/charts/classes/per-user-reactions.ts +++ b/src/services/chart/charts/classes/per-user-reactions.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { DeepPartial } from '../../core'; -import { User } from '../../../../models/entities/user'; -import { Note } from '../../../../models/entities/note'; -import { SchemaType } from '@/misc/schema'; -import { Users } from '../../../../models'; -import { name, schema } from '../schemas/per-user-reactions'; +import Chart, { DeepPartial } from '../../core.js'; +import { User } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Users } from '@/models/index.js'; +import { name, schema } from '../schemas/per-user-reactions.js'; type PerUserReactionsLog = SchemaType; diff --git a/src/services/chart/charts/classes/test-grouped.ts b/src/services/chart/charts/classes/test-grouped.ts index 84e6d5e33f..a667aaff15 100644 --- a/src/services/chart/charts/classes/test-grouped.ts +++ b/src/services/chart/charts/classes/test-grouped.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { name, schema } from '../schemas/test-grouped'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { name, schema } from '../schemas/test-grouped.js'; type TestGroupedLog = SchemaType; diff --git a/src/services/chart/charts/classes/test-unique.ts b/src/services/chart/charts/classes/test-unique.ts index 559fda13c9..c0ca5f625c 100644 --- a/src/services/chart/charts/classes/test-unique.ts +++ b/src/services/chart/charts/classes/test-unique.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { name, schema } from '../schemas/test-unique'; +import Chart, { DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { name, schema } from '../schemas/test-unique.js'; type TestUniqueLog = SchemaType; diff --git a/src/services/chart/charts/classes/test.ts b/src/services/chart/charts/classes/test.ts index a91d5e1895..829867f5ed 100644 --- a/src/services/chart/charts/classes/test.ts +++ b/src/services/chart/charts/classes/test.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { name, schema } from '../schemas/test'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { name, schema } from '../schemas/test.js'; type TestLog = SchemaType; diff --git a/src/services/chart/charts/classes/users.ts b/src/services/chart/charts/classes/users.ts index 8f208de6d6..be279cb8c1 100644 --- a/src/services/chart/charts/classes/users.ts +++ b/src/services/chart/charts/classes/users.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core'; -import { SchemaType } from '@/misc/schema'; -import { Users } from '../../../../models'; +import Chart, { Obj, DeepPartial } from '../../core.js'; +import { SchemaType } from '@/misc/schema.js'; +import { Users } from '@/models/index.js'; import { Not, IsNull } from 'typeorm'; -import { User } from '../../../../models/entities/user'; -import { name, schema } from '../schemas/users'; +import { User } from '@/models/entities/user.js'; +import { name, schema } from '../schemas/users.js'; type UsersLog = SchemaType; diff --git a/src/services/chart/core.ts b/src/services/chart/core.ts index 3c0526d2e5..109d75933b 100644 --- a/src/services/chart/core.ts +++ b/src/services/chart/core.ts @@ -6,11 +6,11 @@ import * as nestedProperty from 'nested-property'; import autobind from 'autobind-decorator'; -import Logger from '../logger'; -import { Schema } from '@/misc/schema'; +import Logger from '../logger.js'; +import { Schema } from '@/misc/schema.js'; import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm'; -import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time'; -import { getChartInsertLock } from '@/misc/app-lock'; +import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time.js'; +import { getChartInsertLock } from '@/misc/app-lock.js'; const logger = new Logger('chart', 'white', process.env.NODE_ENV !== 'test'); diff --git a/src/services/chart/entities.ts b/src/services/chart/entities.ts index e3d5e6f8c6..357a4a5b58 100644 --- a/src/services/chart/entities.ts +++ b/src/services/chart/entities.ts @@ -1,7 +1,13 @@ -import Chart from './core'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; +import Chart from './core.js'; + +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); export const entities = Object.values(require('require-all')({ - dirname: __dirname + '/charts/schemas', + dirname: _dirname + '/charts/schemas', filter: /^.+\.[jt]s$/, resolve: (x: any) => { return Chart.schemaToEntity(x.name, x.schema); diff --git a/src/services/chart/index.ts b/src/services/chart/index.ts index 61eb431ea3..b070ed8637 100644 --- a/src/services/chart/index.ts +++ b/src/services/chart/index.ts @@ -1,16 +1,16 @@ -import FederationChart from './charts/classes/federation'; -import NotesChart from './charts/classes/notes'; -import UsersChart from './charts/classes/users'; -import NetworkChart from './charts/classes/network'; -import ActiveUsersChart from './charts/classes/active-users'; -import InstanceChart from './charts/classes/instance'; -import PerUserNotesChart from './charts/classes/per-user-notes'; -import DriveChart from './charts/classes/drive'; -import PerUserReactionsChart from './charts/classes/per-user-reactions'; -import HashtagChart from './charts/classes/hashtag'; -import PerUserFollowingChart from './charts/classes/per-user-following'; -import PerUserDriveChart from './charts/classes/per-user-drive'; -import { beforeShutdown } from '@/misc/before-shutdown'; +import FederationChart from './charts/classes/federation.js'; +import NotesChart from './charts/classes/notes.js'; +import UsersChart from './charts/classes/users.js'; +import NetworkChart from './charts/classes/network.js'; +import ActiveUsersChart from './charts/classes/active-users.js'; +import InstanceChart from './charts/classes/instance.js'; +import PerUserNotesChart from './charts/classes/per-user-notes.js'; +import DriveChart from './charts/classes/drive.js'; +import PerUserReactionsChart from './charts/classes/per-user-reactions.js'; +import HashtagChart from './charts/classes/hashtag.js'; +import PerUserFollowingChart from './charts/classes/per-user-following.js'; +import PerUserDriveChart from './charts/classes/per-user-drive.js'; +import { beforeShutdown } from '@/misc/before-shutdown.js'; export const federationChart = new FederationChart(); export const notesChart = new NotesChart(); diff --git a/src/services/create-notification.ts b/src/services/create-notification.ts index 7d2726971f..d0ee0e0481 100644 --- a/src/services/create-notification.ts +++ b/src/services/create-notification.ts @@ -1,10 +1,10 @@ -import { publishMainStream } from './stream'; -import pushSw from './push-notification'; -import { Notifications, Mutings, UserProfiles, Users } from '../models'; -import { genId } from '@/misc/gen-id'; -import { User } from '../models/entities/user'; -import { Notification } from '../models/entities/notification'; -import { sendEmailNotification } from './send-email-notification'; +import { publishMainStream } from '@/services/stream.js'; +import pushSw from './push-notification.js'; +import { Notifications, Mutings, UserProfiles, Users } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { User } from '@/models/entities/user.js'; +import { Notification } from '@/models/entities/notification.js'; +import { sendEmailNotification } from './send-email-notification.js'; export async function createNotification( notifieeId: User['id'], diff --git a/src/services/create-system-user.ts b/src/services/create-system-user.ts index 052ceb6c99..de03dd4890 100644 --- a/src/services/create-system-user.ts +++ b/src/services/create-system-user.ts @@ -1,13 +1,13 @@ import * as bcrypt from 'bcryptjs'; import { v4 as uuid } from 'uuid'; -import generateNativeUserToken from '../server/api/common/generate-native-user-token'; -import { genRsaKeyPair } from '@/misc/gen-key-pair'; -import { User } from '../models/entities/user'; -import { UserProfile } from '../models/entities/user-profile'; +import generateNativeUserToken from '../server/api/common/generate-native-user-token.js'; +import { genRsaKeyPair } from '@/misc/gen-key-pair.js'; +import { User } from '@/models/entities/user.js'; +import { UserProfile } from '@/models/entities/user-profile.js'; import { getConnection } from 'typeorm'; -import { genId } from '@/misc/gen-id'; -import { UserKeypair } from '../models/entities/user-keypair'; -import { UsedUsername } from '../models/entities/used-username'; +import { genId } from '@/misc/gen-id.js'; +import { UserKeypair } from '@/models/entities/user-keypair.js'; +import { UsedUsername } from '@/models/entities/used-username.js'; export async function createSystemUser(username: string) { const password = uuid(); diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index 2356a23cbe..e1092d068d 100644 --- a/src/services/drive/add-file.ts +++ b/src/services/drive/add-file.ts @@ -2,23 +2,23 @@ import * as fs from 'fs'; import { v4 as uuid } from 'uuid'; -import { publishMainStream, publishDriveStream } from '../stream'; -import { deleteFile } from './delete-file'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { GenerateVideoThumbnail } from './generate-video-thumbnail'; -import { driveLogger } from './logger'; -import { IImage, convertSharpToJpeg, convertSharpToWebp, convertSharpToPng, convertSharpToPngOrJpeg } from './image-processor'; -import { contentDisposition } from '@/misc/content-disposition'; -import { getFileInfo } from '@/misc/get-file-info'; -import { DriveFiles, DriveFolders, Users, Instances, UserProfiles } from '../../models'; -import { InternalStorage } from './internal-storage'; -import { DriveFile } from '../../models/entities/drive-file'; -import { IRemoteUser, User } from '../../models/entities/user'; -import { driveChart, perUserDriveChart, instanceChart } from '../chart'; -import { genId } from '@/misc/gen-id'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; +import { publishMainStream, publishDriveStream } from '@/services/stream.js'; +import { deleteFile } from './delete-file.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { GenerateVideoThumbnail } from './generate-video-thumbnail.js'; +import { driveLogger } from './logger.js'; +import { IImage, convertSharpToJpeg, convertSharpToWebp, convertSharpToPng, convertSharpToPngOrJpeg } from './image-processor.js'; +import { contentDisposition } from '@/misc/content-disposition.js'; +import { getFileInfo } from '@/misc/get-file-info.js'; +import { DriveFiles, DriveFolders, Users, Instances, UserProfiles } from '@/models/index.js'; +import { InternalStorage } from './internal-storage.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { IRemoteUser, User } from '@/models/entities/user.js'; +import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; import * as S3 from 'aws-sdk/clients/s3'; -import { getS3 } from './s3'; +import { getS3 } from './s3.js'; import * as sharp from 'sharp'; const logger = driveLogger.createSubLogger('register', 'yellow'); diff --git a/src/services/drive/delete-file.ts b/src/services/drive/delete-file.ts index 2dd2445321..9deb1768b6 100644 --- a/src/services/drive/delete-file.ts +++ b/src/services/drive/delete-file.ts @@ -1,19 +1,19 @@ -import { DriveFile } from '../../models/entities/drive-file'; -import { InternalStorage } from './internal-storage'; -import { DriveFiles, Instances, Notes, Users } from '../../models'; -import { driveChart, perUserDriveChart, instanceChart } from '../chart'; -import { createDeleteObjectStorageFileJob } from '../../queue'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { getS3 } from './s3'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { InternalStorage } from './internal-storage.js'; +import { DriveFiles, Instances, Notes, Users } from '@/models/index.js'; +import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index.js'; +import { createDeleteObjectStorageFileJob } from '@/queue/index.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { getS3 } from './s3.js'; import { v4 as uuid } from 'uuid'; -import { Note } from '../../models/entities/note'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderDelete from '../../remote/activitypub/renderer/delete'; -import renderTombstone from '../../remote/activitypub/renderer/tombstone'; -import config from '@/config'; -import { deliverToFollowers } from '../../remote/activitypub/deliver-manager'; +import { Note } from '@/models/entities/note.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderDelete from '@/remote/activitypub/renderer/delete.js'; +import renderTombstone from '@/remote/activitypub/renderer/tombstone.js'; +import config from '@/config/index.js'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; import { Brackets } from 'typeorm'; -import { deliverToRelays } from '../relay'; +import { deliverToRelays } from '../relay.js'; export async function deleteFile(file: DriveFile, isExpired = false) { if (file.storedInternal) { diff --git a/src/services/drive/generate-video-thumbnail.ts b/src/services/drive/generate-video-thumbnail.ts index f0adc7c338..e5cb243d4d 100644 --- a/src/services/drive/generate-video-thumbnail.ts +++ b/src/services/drive/generate-video-thumbnail.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; import * as tmp from 'tmp'; -import { IImage, convertToJpeg } from './image-processor'; +import { IImage, convertToJpeg } from './image-processor.js'; import * as FFmpeg from 'fluent-ffmpeg'; export async function GenerateVideoThumbnail(path: string): Promise { diff --git a/src/services/drive/internal-storage.ts b/src/services/drive/internal-storage.ts index 5ec563584f..e857f942cc 100644 --- a/src/services/drive/internal-storage.ts +++ b/src/services/drive/internal-storage.ts @@ -1,9 +1,15 @@ import * as fs from 'fs'; import * as Path from 'path'; -import config from '@/config'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; +import config from '@/config/index.js'; + +//const _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); export class InternalStorage { - private static readonly path = Path.resolve(__dirname, '../../../files'); + private static readonly path = Path.resolve(_dirname, '../../../files'); public static resolvePath = (key: string) => Path.resolve(InternalStorage.path, key); diff --git a/src/services/drive/logger.ts b/src/services/drive/logger.ts index 655d074d6e..917a8317e2 100644 --- a/src/services/drive/logger.ts +++ b/src/services/drive/logger.ts @@ -1,3 +1,3 @@ -import Logger from '../logger'; +import Logger from '../logger.js'; export const driveLogger = new Logger('drive', 'blue'); diff --git a/src/services/drive/s3.ts b/src/services/drive/s3.ts index e75937861b..89fad70dc5 100644 --- a/src/services/drive/s3.ts +++ b/src/services/drive/s3.ts @@ -1,7 +1,7 @@ import { URL } from 'url'; import * as S3 from 'aws-sdk/clients/s3'; -import { Meta } from '../../models/entities/meta'; -import { getAgentByUrl } from '@/misc/fetch'; +import { Meta } from '@/models/entities/meta.js'; +import { getAgentByUrl } from '@/misc/fetch.js'; export function getS3(meta: Meta) { const u = meta.objectStorageEndpoint != null diff --git a/src/services/drive/upload-from-url.ts b/src/services/drive/upload-from-url.ts index 2f660d9035..21b294142b 100644 --- a/src/services/drive/upload-from-url.ts +++ b/src/services/drive/upload-from-url.ts @@ -1,12 +1,12 @@ import { URL } from 'url'; -import create from './add-file'; -import { User } from '../../models/entities/user'; -import { driveLogger } from './logger'; -import { createTemp } from '@/misc/create-temp'; -import { downloadUrl } from '@/misc/download-url'; -import { DriveFolder } from '../../models/entities/drive-folder'; -import { DriveFile } from '../../models/entities/drive-file'; -import { DriveFiles } from '../../models'; +import create from './add-file.js'; +import { User } from '@/models/entities/user.js'; +import { driveLogger } from './logger.js'; +import { createTemp } from '@/misc/create-temp.js'; +import { downloadUrl } from '@/misc/download-url.js'; +import { DriveFolder } from '@/models/entities/drive-folder.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { DriveFiles } from '@/models/index.js'; const logger = driveLogger.createSubLogger('downloader'); diff --git a/src/services/fetch-instance-metadata.ts b/src/services/fetch-instance-metadata.ts index e016e73a60..d21064868c 100644 --- a/src/services/fetch-instance-metadata.ts +++ b/src/services/fetch-instance-metadata.ts @@ -1,10 +1,10 @@ import { DOMWindow, JSDOM } from 'jsdom'; import fetch from 'node-fetch'; -import { getJson, getHtml, getAgentByUrl } from '@/misc/fetch'; -import { Instance } from '../models/entities/instance'; -import { Instances } from '../models'; -import { getFetchInstanceMetadataLock } from '@/misc/app-lock'; -import Logger from './logger'; +import { getJson, getHtml, getAgentByUrl } from '@/misc/fetch.js'; +import { Instance } from '@/models/entities/instance.js'; +import { Instances } from '@/models/index.js'; +import { getFetchInstanceMetadataLock } from '@/misc/app-lock.js'; +import Logger from './logger.js'; import { URL } from 'url'; const logger = new Logger('metadata', 'cyan'); diff --git a/src/services/following/create.ts b/src/services/following/create.ts index de12285fc7..194b95dea0 100644 --- a/src/services/following/create.ts +++ b/src/services/following/create.ts @@ -1,19 +1,19 @@ -import { publishMainStream, publishUserEvent } from '../stream'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderFollow from '../../remote/activitypub/renderer/follow'; -import renderAccept from '../../remote/activitypub/renderer/accept'; -import renderReject from '../../remote/activitypub/renderer/reject'; -import { deliver } from '../../queue'; -import createFollowRequest from './requests/create'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; -import Logger from '../logger'; -import { IdentifiableError } from '@/misc/identifiable-error'; -import { User } from '../../models/entities/user'; -import { Followings, Users, FollowRequests, Blockings, Instances, UserProfiles } from '../../models'; -import { instanceChart, perUserFollowingChart } from '../chart'; -import { genId } from '@/misc/gen-id'; -import { createNotification } from '../create-notification'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; +import { publishMainStream, publishUserEvent } from '@/services/stream.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderFollow from '@/remote/activitypub/renderer/follow.js'; +import renderAccept from '@/remote/activitypub/renderer/accept.js'; +import renderReject from '@/remote/activitypub/renderer/reject.js'; +import { deliver } from '@/queue/index.js'; +import createFollowRequest from './requests/create.js'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; +import Logger from '../logger.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { User } from '@/models/entities/user.js'; +import { Followings, Users, FollowRequests, Blockings, Instances, UserProfiles } from '@/models/index.js'; +import { instanceChart, perUserFollowingChart } from '@/services/chart/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { createNotification } from '../create-notification.js'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; const logger = new Logger('following/create'); diff --git a/src/services/following/delete.ts b/src/services/following/delete.ts index d0df0de6ae..3ea226744c 100644 --- a/src/services/following/delete.ts +++ b/src/services/following/delete.ts @@ -1,13 +1,13 @@ -import { publishMainStream, publishUserEvent } from '../stream'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderFollow from '../../remote/activitypub/renderer/follow'; -import renderUndo from '../../remote/activitypub/renderer/undo'; -import { deliver } from '../../queue'; -import Logger from '../logger'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; -import { User } from '../../models/entities/user'; -import { Followings, Users, Instances } from '../../models'; -import { instanceChart, perUserFollowingChart } from '../chart'; +import { publishMainStream, publishUserEvent } from '@/services/stream.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderFollow from '@/remote/activitypub/renderer/follow.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import { deliver } from '@/queue/index.js'; +import Logger from '../logger.js'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; +import { User } from '@/models/entities/user.js'; +import { Followings, Users, Instances } from '@/models/index.js'; +import { instanceChart, perUserFollowingChart } from '@/services/chart/index.js'; const logger = new Logger('following/delete'); diff --git a/src/services/following/requests/accept-all.ts b/src/services/following/requests/accept-all.ts index 5fc70fcf1b..8025a134f3 100644 --- a/src/services/following/requests/accept-all.ts +++ b/src/services/following/requests/accept-all.ts @@ -1,6 +1,6 @@ -import accept from './accept'; -import { User } from '../../../models/entities/user'; -import { FollowRequests, Users } from '../../../models'; +import accept from './accept.js'; +import { User } from '@/models/entities/user.js'; +import { FollowRequests, Users } from '@/models/index.js'; /** * 指定したユーザー宛てのフォローリクエストをすべて承認 diff --git a/src/services/following/requests/accept.ts b/src/services/following/requests/accept.ts index 4277a1a1e9..ff4d0ff998 100644 --- a/src/services/following/requests/accept.ts +++ b/src/services/following/requests/accept.ts @@ -1,12 +1,12 @@ -import { renderActivity } from '../../../remote/activitypub/renderer'; -import renderFollow from '../../../remote/activitypub/renderer/follow'; -import renderAccept from '../../../remote/activitypub/renderer/accept'; -import { deliver } from '../../../queue'; -import { publishMainStream } from '../../stream'; -import { insertFollowingDoc } from '../create'; -import { User, ILocalUser } from '../../../models/entities/user'; -import { FollowRequests, Users } from '../../../models'; -import { IdentifiableError } from '@/misc/identifiable-error'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderFollow from '@/remote/activitypub/renderer/follow.js'; +import renderAccept from '@/remote/activitypub/renderer/accept.js'; +import { deliver } from '@/queue/index.js'; +import { publishMainStream } from '@/services/stream.js'; +import { insertFollowingDoc } from '../create.js'; +import { User, ILocalUser } from '@/models/entities/user.js'; +import { FollowRequests, Users } from '@/models/index.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, follower: User) { const request = await FollowRequests.findOne({ diff --git a/src/services/following/requests/cancel.ts b/src/services/following/requests/cancel.ts index 53c20088ca..3f60fefd10 100644 --- a/src/services/following/requests/cancel.ts +++ b/src/services/following/requests/cancel.ts @@ -1,11 +1,11 @@ -import { renderActivity } from '../../../remote/activitypub/renderer'; -import renderFollow from '../../../remote/activitypub/renderer/follow'; -import renderUndo from '../../../remote/activitypub/renderer/undo'; -import { deliver } from '../../../queue'; -import { publishMainStream } from '../../stream'; -import { IdentifiableError } from '@/misc/identifiable-error'; -import { User, ILocalUser } from '../../../models/entities/user'; -import { Users, FollowRequests } from '../../../models'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderFollow from '@/remote/activitypub/renderer/follow.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import { deliver } from '@/queue/index.js'; +import { publishMainStream } from '@/services/stream.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { User, ILocalUser } from '@/models/entities/user.js'; +import { Users, FollowRequests } from '@/models/index.js'; export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox'] }, follower: { id: User['id']; host: User['host']; uri: User['host'] }) { if (Users.isRemoteUser(followee)) { diff --git a/src/services/following/requests/create.ts b/src/services/following/requests/create.ts index 584591b003..8f26a66119 100644 --- a/src/services/following/requests/create.ts +++ b/src/services/following/requests/create.ts @@ -1,11 +1,11 @@ -import { publishMainStream } from '../../stream'; -import { renderActivity } from '../../../remote/activitypub/renderer'; -import renderFollow from '../../../remote/activitypub/renderer/follow'; -import { deliver } from '../../../queue'; -import { User } from '../../../models/entities/user'; -import { Blockings, FollowRequests, Users } from '../../../models'; -import { genId } from '@/misc/gen-id'; -import { createNotification } from '../../create-notification'; +import { publishMainStream } from '@/services/stream.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderFollow from '@/remote/activitypub/renderer/follow.js'; +import { deliver } from '@/queue/index.js'; +import { User } from '@/models/entities/user.js'; +import { Blockings, FollowRequests, Users } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { createNotification } from '../../create-notification.js'; export default async function(follower: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, requestId?: string) { if (follower.id === followee.id) return; diff --git a/src/services/following/requests/reject.ts b/src/services/following/requests/reject.ts index 45effc5802..e180f1dc4a 100644 --- a/src/services/following/requests/reject.ts +++ b/src/services/following/requests/reject.ts @@ -1,11 +1,11 @@ -import { renderActivity } from '../../../remote/activitypub/renderer'; -import renderFollow from '../../../remote/activitypub/renderer/follow'; -import renderReject from '../../../remote/activitypub/renderer/reject'; -import { deliver } from '../../../queue'; -import { publishMainStream, publishUserEvent } from '../../stream'; -import { User, ILocalUser } from '../../../models/entities/user'; -import { Users, FollowRequests, Followings } from '../../../models'; -import { decrementFollowing } from '../delete'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderFollow from '@/remote/activitypub/renderer/follow.js'; +import renderReject from '@/remote/activitypub/renderer/reject.js'; +import { deliver } from '@/queue/index.js'; +import { publishMainStream, publishUserEvent } from '@/services/stream.js'; +import { User, ILocalUser } from '@/models/entities/user.js'; +import { Users, FollowRequests, Followings } from '@/models/index.js'; +import { decrementFollowing } from '../delete.js'; export default async function(followee: { id: User['id']; host: User['host']; uri: User['host'] }, follower: User) { if (Users.isRemoteUser(follower) && Users.isLocalUser(followee)) { diff --git a/src/services/i/pin.ts b/src/services/i/pin.ts index e3a73b5b98..da95b60707 100644 --- a/src/services/i/pin.ts +++ b/src/services/i/pin.ts @@ -1,15 +1,15 @@ -import config from '@/config'; -import renderAdd from '../../remote/activitypub/renderer/add'; -import renderRemove from '../../remote/activitypub/renderer/remove'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import { IdentifiableError } from '@/misc/identifiable-error'; -import { User } from '../../models/entities/user'; -import { Note } from '../../models/entities/note'; -import { Notes, UserNotePinings, Users } from '../../models'; -import { UserNotePining } from '../../models/entities/user-note-pining'; -import { genId } from '@/misc/gen-id'; -import { deliverToFollowers } from '../../remote/activitypub/deliver-manager'; -import { deliverToRelays } from '../relay'; +import config from '@/config/index.js'; +import renderAdd from '@/remote/activitypub/renderer/add.js'; +import renderRemove from '@/remote/activitypub/renderer/remove.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { User } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { Notes, UserNotePinings, Users } from '@/models/index.js'; +import { UserNotePining } from '@/models/entities/user-note-pining.js'; +import { genId } from '@/misc/gen-id.js'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; +import { deliverToRelays } from '../relay.js'; /** * 指定した投稿をピン留めします diff --git a/src/services/i/update.ts b/src/services/i/update.ts index 8d40b08a85..1fbaf40df1 100644 --- a/src/services/i/update.ts +++ b/src/services/i/update.ts @@ -1,10 +1,10 @@ -import renderUpdate from '../../remote/activitypub/renderer/update'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import { Users } from '../../models'; -import { User } from '../../models/entities/user'; -import { renderPerson } from '../../remote/activitypub/renderer/person'; -import { deliverToFollowers } from '../../remote/activitypub/deliver-manager'; -import { deliverToRelays } from '../relay'; +import renderUpdate from '@/remote/activitypub/renderer/update.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { Users } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; +import { renderPerson } from '@/remote/activitypub/renderer/person.js'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; +import { deliverToRelays } from '../relay.js'; export async function publishToFollowers(userId: User['id']) { const user = await Users.findOne(userId); diff --git a/src/services/insert-moderation-log.ts b/src/services/insert-moderation-log.ts index 8ba64fa34b..1d8fe9a9d7 100644 --- a/src/services/insert-moderation-log.ts +++ b/src/services/insert-moderation-log.ts @@ -1,6 +1,6 @@ -import { ModerationLogs } from '../models'; -import { genId } from '@/misc/gen-id'; -import { User } from '@/models/entities/user'; +import { ModerationLogs } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { User } from '@/models/entities/user.js'; export async function insertModerationLog(moderator: { id: User['id'] }, type: string, info?: Record) { await ModerationLogs.insert({ diff --git a/src/services/instance-actor.ts b/src/services/instance-actor.ts index 9b9c746061..6a592363ed 100644 --- a/src/services/instance-actor.ts +++ b/src/services/instance-actor.ts @@ -1,7 +1,7 @@ -import { createSystemUser } from './create-system-user'; -import { ILocalUser } from '../models/entities/user'; -import { Users } from '../models'; -import { Cache } from '@/misc/cache'; +import { createSystemUser } from './create-system-user.js'; +import { ILocalUser } from '@/models/entities/user.js'; +import { Users } from '@/models/index.js'; +import { Cache } from '@/misc/cache.js'; const ACTOR_USERNAME = 'instance.actor' as const; diff --git a/src/services/logger.ts b/src/services/logger.ts index de62b3aca9..ac74c13af9 100644 --- a/src/services/logger.ts +++ b/src/services/logger.ts @@ -2,13 +2,13 @@ import * as cluster from 'cluster'; import * as os from 'os'; import * as chalk from 'chalk'; import * as dateformat from 'dateformat'; -import { program } from '../argv'; +import { program } from '../argv.js'; import { getRepository } from 'typeorm'; -import { Log } from '../models/entities/log'; -import { genId } from '@/misc/gen-id'; -import config from '@/config'; +import { Log } from '@/models/entities/log.js'; +import { genId } from '@/misc/gen-id.js'; +import config from '@/config/index.js'; -const SyslogPro = require('syslog-pro'); +import SyslogPro from 'syslog-pro'; type Domain = { name: string; diff --git a/src/services/messages/create.ts b/src/services/messages/create.ts index f84729cdeb..c6430f07be 100644 --- a/src/services/messages/create.ts +++ b/src/services/messages/create.ts @@ -1,17 +1,17 @@ -import { User } from '../../models/entities/user'; -import { UserGroup } from '../../models/entities/user-group'; -import { DriveFile } from '../../models/entities/drive-file'; -import { MessagingMessages, UserGroupJoinings, Mutings, Users } from '../../models'; -import { genId } from '@/misc/gen-id'; -import { MessagingMessage } from '../../models/entities/messaging-message'; -import { publishMessagingStream, publishMessagingIndexStream, publishMainStream, publishGroupMessagingStream } from '../stream'; -import pushNotification from '../push-notification'; +import { User } from '@/models/entities/user.js'; +import { UserGroup } from '@/models/entities/user-group.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { MessagingMessages, UserGroupJoinings, Mutings, Users } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { MessagingMessage } from '@/models/entities/messaging-message.js'; +import { publishMessagingStream, publishMessagingIndexStream, publishMainStream, publishGroupMessagingStream } from '@/services/stream.js'; +import pushNotification from '../push-notification.js'; import { Not } from 'typeorm'; -import { Note } from '../../models/entities/note'; -import renderNote from '../../remote/activitypub/renderer/note'; -import renderCreate from '../../remote/activitypub/renderer/create'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import { deliver } from '../../queue'; +import { Note } from '@/models/entities/note.js'; +import renderNote from '@/remote/activitypub/renderer/note.js'; +import renderCreate from '@/remote/activitypub/renderer/create.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { deliver } from '@/queue/index.js'; export async function createMessage(user: { id: User['id']; host: User['host']; }, recipientUser: User | undefined, recipientGroup: UserGroup | undefined, text: string | undefined, file: DriveFile | null, uri?: string) { const message = { diff --git a/src/services/messages/delete.ts b/src/services/messages/delete.ts index 522815e554..82eb6cb21c 100644 --- a/src/services/messages/delete.ts +++ b/src/services/messages/delete.ts @@ -1,11 +1,11 @@ -import config from '@/config'; -import { MessagingMessages, Users } from '../../models'; -import { MessagingMessage } from '../../models/entities/messaging-message'; -import { publishGroupMessagingStream, publishMessagingStream } from '../stream'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderDelete from '../../remote/activitypub/renderer/delete'; -import renderTombstone from '../../remote/activitypub/renderer/tombstone'; -import { deliver } from '../../queue'; +import config from '@/config/index.js'; +import { MessagingMessages, Users } from '@/models/index.js'; +import { MessagingMessage } from '@/models/entities/messaging-message.js'; +import { publishGroupMessagingStream, publishMessagingStream } from '@/services/stream.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderDelete from '@/remote/activitypub/renderer/delete.js'; +import renderTombstone from '@/remote/activitypub/renderer/tombstone.js'; +import { deliver } from '@/queue/index.js'; export async function deleteMessage(message: MessagingMessage) { await MessagingMessages.delete(message.id); diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 13d612cf80..d89663c784 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -1,39 +1,39 @@ import * as mfm from 'mfm-js'; -import es from '../../db/elasticsearch'; -import { publishMainStream, publishNotesStream } from '../stream'; -import DeliverManager from '../../remote/activitypub/deliver-manager'; -import renderNote from '../../remote/activitypub/renderer/note'; -import renderCreate from '../../remote/activitypub/renderer/create'; -import renderAnnounce from '../../remote/activitypub/renderer/announce'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import { resolveUser } from '../../remote/resolve-user'; -import config from '@/config'; -import { updateHashtags } from '../update-hashtag'; -import { concat } from '../../prelude/array'; -import insertNoteUnread from './unread'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; -import { extractMentions } from '@/misc/extract-mentions'; -import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm'; -import { extractHashtags } from '@/misc/extract-hashtags'; -import { Note, IMentionedRemoteUsers } from '../../models/entities/note'; -import { Mutings, Users, NoteWatchings, Notes, Instances, UserProfiles, Antennas, Followings, MutedNotes, Channels, ChannelFollowings, Blockings } from '../../models'; -import { DriveFile } from '../../models/entities/drive-file'; -import { App } from '../../models/entities/app'; +import es from '../../db/elasticsearch.js'; +import { publishMainStream, publishNotesStream } from '@/services/stream.js'; +import DeliverManager from '@/remote/activitypub/deliver-manager.js'; +import renderNote from '@/remote/activitypub/renderer/note.js'; +import renderCreate from '@/remote/activitypub/renderer/create.js'; +import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { resolveUser } from '@/remote/resolve-user.js'; +import config from '@/config/index.js'; +import { updateHashtags } from '../update-hashtag.js'; +import { concat } from '../../prelude/array.js'; +import insertNoteUnread from './unread.js'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; +import { extractMentions } from '@/misc/extract-mentions.js'; +import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; +import { extractHashtags } from '@/misc/extract-hashtags.js'; +import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; +import { Mutings, Users, NoteWatchings, Notes, Instances, UserProfiles, Antennas, Followings, MutedNotes, Channels, ChannelFollowings, Blockings } from '@/models/index.js'; +import { DriveFile } from '@/models/entities/drive-file.js'; +import { App } from '@/models/entities/app.js'; import { Not, getConnection, In } from 'typeorm'; -import { User, ILocalUser, IRemoteUser } from '../../models/entities/user'; -import { genId } from '@/misc/gen-id'; -import { notesChart, perUserNotesChart, activeUsersChart, instanceChart } from '../chart'; -import { Poll, IPoll } from '../../models/entities/poll'; -import { createNotification } from '../create-notification'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; -import { checkHitAntenna } from '@/misc/check-hit-antenna'; -import { checkWordMute } from '@/misc/check-word-mute'; -import { addNoteToAntenna } from '../add-note-to-antenna'; -import { countSameRenotes } from '@/misc/count-same-renotes'; -import { deliverToRelays } from '../relay'; -import { Channel } from '../../models/entities/channel'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; -import { getAntennas } from '@/misc/antenna-cache'; +import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; +import { genId } from '@/misc/gen-id.js'; +import { notesChart, perUserNotesChart, activeUsersChart, instanceChart } from '@/services/chart/index.js'; +import { Poll, IPoll } from '@/models/entities/poll.js'; +import { createNotification } from '../create-notification.js'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; +import { checkHitAntenna } from '@/misc/check-hit-antenna.js'; +import { checkWordMute } from '@/misc/check-word-mute.js'; +import { addNoteToAntenna } from '../add-note-to-antenna.js'; +import { countSameRenotes } from '@/misc/count-same-renotes.js'; +import { deliverToRelays } from '../relay.js'; +import { Channel } from '@/models/entities/channel.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import { getAntennas } from '@/misc/antenna-cache.js'; type NotificationType = 'reply' | 'renote' | 'quote' | 'mention'; diff --git a/src/services/note/delete.ts b/src/services/note/delete.ts index a7ac86e106..353cd88034 100644 --- a/src/services/note/delete.ts +++ b/src/services/note/delete.ts @@ -1,18 +1,18 @@ -import { publishNoteStream } from '../stream'; -import renderDelete from '../../remote/activitypub/renderer/delete'; -import renderAnnounce from '../../remote/activitypub/renderer/announce'; -import renderUndo from '../../remote/activitypub/renderer/undo'; -import { renderActivity } from '../../remote/activitypub/renderer'; -import renderTombstone from '../../remote/activitypub/renderer/tombstone'; -import config from '@/config'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; -import { User, ILocalUser, IRemoteUser } from '../../models/entities/user'; -import { Note, IMentionedRemoteUsers } from '../../models/entities/note'; -import { Notes, Users, Instances } from '../../models'; -import { notesChart, perUserNotesChart, instanceChart } from '../chart'; -import { deliverToFollowers, deliverToUser } from '../../remote/activitypub/deliver-manager'; -import { countSameRenotes } from '@/misc/count-same-renotes'; -import { deliverToRelays } from '../relay'; +import { publishNoteStream } from '@/services/stream.js'; +import renderDelete from '@/remote/activitypub/renderer/delete.js'; +import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderTombstone from '@/remote/activitypub/renderer/tombstone.js'; +import config from '@/config/index.js'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; +import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; +import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; +import { Notes, Users, Instances } from '@/models/index.js'; +import { notesChart, perUserNotesChart, instanceChart } from '@/services/chart/index.js'; +import { deliverToFollowers, deliverToUser } from '@/remote/activitypub/deliver-manager.js'; +import { countSameRenotes } from '@/misc/count-same-renotes.js'; +import { deliverToRelays } from '../relay.js'; import { Brackets, In } from 'typeorm'; /** diff --git a/src/services/note/polls/update.ts b/src/services/note/polls/update.ts index a33efab668..88baf16b64 100644 --- a/src/services/note/polls/update.ts +++ b/src/services/note/polls/update.ts @@ -1,10 +1,10 @@ -import renderUpdate from '../../../remote/activitypub/renderer/update'; -import { renderActivity } from '../../../remote/activitypub/renderer'; -import renderNote from '../../../remote/activitypub/renderer/note'; -import { Users, Notes } from '../../../models'; -import { Note } from '../../../models/entities/note'; -import { deliverToFollowers } from '../../../remote/activitypub/deliver-manager'; -import { deliverToRelays } from '../../relay'; +import renderUpdate from '@/remote/activitypub/renderer/update.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import renderNote from '@/remote/activitypub/renderer/note.js'; +import { Users, Notes } from '@/models/index.js'; +import { Note } from '@/models/entities/note.js'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; +import { deliverToRelays } from '../../relay.js'; export async function deliverQuestionUpdate(noteId: Note['id']) { const note = await Notes.findOne(noteId); diff --git a/src/services/note/polls/vote.ts b/src/services/note/polls/vote.ts index d3cf9f2117..36e06cb6a2 100644 --- a/src/services/note/polls/vote.ts +++ b/src/services/note/polls/vote.ts @@ -1,10 +1,10 @@ -import { publishNoteStream } from '../../stream'; -import { User } from '../../../models/entities/user'; -import { Note } from '../../../models/entities/note'; -import { PollVotes, NoteWatchings, Polls, Blockings } from '../../../models'; +import { publishNoteStream } from '@/services/stream.js'; +import { User } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { PollVotes, NoteWatchings, Polls, Blockings } from '@/models/index.js'; import { Not } from 'typeorm'; -import { genId } from '@/misc/gen-id'; -import { createNotification } from '../../create-notification'; +import { genId } from '@/misc/gen-id.js'; +import { createNotification } from '../../create-notification.js'; export default async function(user: User, note: Note, choice: number) { const poll = await Polls.findOne(note.id); diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index b8a8d172f1..f2dd273c42 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -1,19 +1,19 @@ -import { publishNoteStream } from '../../stream'; -import { renderLike } from '../../../remote/activitypub/renderer/like'; -import DeliverManager from '../../../remote/activitypub/deliver-manager'; -import { renderActivity } from '../../../remote/activitypub/renderer'; -import { toDbReaction, decodeReaction } from '@/misc/reaction-lib'; -import { User, IRemoteUser } from '../../../models/entities/user'; -import { Note } from '../../../models/entities/note'; -import { NoteReactions, Users, NoteWatchings, Notes, Emojis, Blockings } from '../../../models'; +import { publishNoteStream } from '@/services/stream.js'; +import { renderLike } from '@/remote/activitypub/renderer/like.js'; +import DeliverManager from '@/remote/activitypub/deliver-manager.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { toDbReaction, decodeReaction } from '@/misc/reaction-lib.js'; +import { User, IRemoteUser } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { NoteReactions, Users, NoteWatchings, Notes, Emojis, Blockings } from '@/models/index.js'; import { Not } from 'typeorm'; -import { perUserReactionsChart } from '../../chart'; -import { genId } from '@/misc/gen-id'; -import { createNotification } from '../../create-notification'; -import deleteReaction from './delete'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; -import { NoteReaction } from '../../../models/entities/note-reaction'; -import { IdentifiableError } from '@/misc/identifiable-error'; +import { perUserReactionsChart } from '@/services/chart/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { createNotification } from '../../create-notification.js'; +import deleteReaction from './delete.js'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; +import { NoteReaction } from '@/models/entities/note-reaction.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; export default async (user: { id: User['id']; host: User['host']; }, note: Note, reaction?: string) => { // Check blocking diff --git a/src/services/note/reaction/delete.ts b/src/services/note/reaction/delete.ts index 712031fa88..86e7b640ee 100644 --- a/src/services/note/reaction/delete.ts +++ b/src/services/note/reaction/delete.ts @@ -1,13 +1,13 @@ -import { publishNoteStream } from '../../stream'; -import { renderLike } from '../../../remote/activitypub/renderer/like'; -import renderUndo from '../../../remote/activitypub/renderer/undo'; -import { renderActivity } from '../../../remote/activitypub/renderer'; -import DeliverManager from '../../../remote/activitypub/deliver-manager'; -import { IdentifiableError } from '@/misc/identifiable-error'; -import { User, IRemoteUser } from '../../../models/entities/user'; -import { Note } from '../../../models/entities/note'; -import { NoteReactions, Users, Notes } from '../../../models'; -import { decodeReaction } from '@/misc/reaction-lib'; +import { publishNoteStream } from '@/services/stream.js'; +import { renderLike } from '@/remote/activitypub/renderer/like.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import DeliverManager from '@/remote/activitypub/deliver-manager.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { User, IRemoteUser } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { NoteReactions, Users, Notes } from '@/models/index.js'; +import { decodeReaction } from '@/misc/reaction-lib.js'; export default async (user: { id: User['id']; host: User['host']; }, note: Note) => { // if already unreacted diff --git a/src/services/note/read.ts b/src/services/note/read.ts index a661c0a9d0..ac450af78b 100644 --- a/src/services/note/read.ts +++ b/src/services/note/read.ts @@ -1,13 +1,13 @@ -import { publishMainStream } from '../stream'; -import { Note } from '../../models/entities/note'; -import { User } from '../../models/entities/user'; -import { NoteUnreads, AntennaNotes, Users, Followings, ChannelFollowings } from '../../models'; +import { publishMainStream } from '@/services/stream.js'; +import { Note } from '@/models/entities/note.js'; +import { User } from '@/models/entities/user.js'; +import { NoteUnreads, AntennaNotes, Users, Followings, ChannelFollowings } from '@/models/index.js'; import { Not, IsNull, In } from 'typeorm'; -import { Channel } from '../../models/entities/channel'; -import { checkHitAntenna } from '@/misc/check-hit-antenna'; -import { getAntennas } from '@/misc/antenna-cache'; -import { PackedNote } from '../../models/repositories/note'; -import { readNotificationByQuery } from '@/server/api/common/read-notification'; +import { Channel } from '@/models/entities/channel.js'; +import { checkHitAntenna } from '@/misc/check-hit-antenna.js'; +import { getAntennas } from '@/misc/antenna-cache.js'; +import { PackedNote } from '@/models/repositories/note.js'; +import { readNotificationByQuery } from '@/server/api/common/read-notification.js'; /** * Mark notes as read diff --git a/src/services/note/unread.ts b/src/services/note/unread.ts index 5cfba0f342..b68ff7974f 100644 --- a/src/services/note/unread.ts +++ b/src/services/note/unread.ts @@ -1,8 +1,8 @@ -import { Note } from '../../models/entities/note'; -import { publishMainStream } from '../stream'; -import { User } from '../../models/entities/user'; -import { Mutings, NoteUnreads } from '../../models'; -import { genId } from '@/misc/gen-id'; +import { Note } from '@/models/entities/note.js'; +import { publishMainStream } from '@/services/stream.js'; +import { User } from '@/models/entities/user.js'; +import { Mutings, NoteUnreads } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; export default async function(userId: User['id'], note: Note, params: { // NOTE: isSpecifiedがtrueならisMentionedは必ずfalse diff --git a/src/services/note/unwatch.ts b/src/services/note/unwatch.ts index 047ac343be..32da2cf148 100644 --- a/src/services/note/unwatch.ts +++ b/src/services/note/unwatch.ts @@ -1,6 +1,6 @@ -import { User } from '../../models/entities/user'; -import { NoteWatchings } from '../../models'; -import { Note } from '../../models/entities/note'; +import { User } from '@/models/entities/user.js'; +import { NoteWatchings } from '@/models/index.js'; +import { Note } from '@/models/entities/note.js'; export default async (me: User['id'], note: Note) => { await NoteWatchings.delete({ diff --git a/src/services/note/watch.ts b/src/services/note/watch.ts index e333f04286..12d97c8458 100644 --- a/src/services/note/watch.ts +++ b/src/services/note/watch.ts @@ -1,8 +1,8 @@ -import { User } from '../../models/entities/user'; -import { Note } from '../../models/entities/note'; -import { NoteWatchings } from '../../models'; -import { genId } from '@/misc/gen-id'; -import { NoteWatching } from '../../models/entities/note-watching'; +import { User } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { NoteWatchings } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { NoteWatching } from '@/models/entities/note-watching.js'; export default async (me: User['id'], note: Note) => { // 自分の投稿はwatchできない diff --git a/src/services/push-notification.ts b/src/services/push-notification.ts index 6c0b77c31f..bedfa0533d 100644 --- a/src/services/push-notification.ts +++ b/src/services/push-notification.ts @@ -1,9 +1,9 @@ import * as push from 'web-push'; -import config from '@/config'; -import { SwSubscriptions } from '../models'; -import { fetchMeta } from '@/misc/fetch-meta'; -import { PackedNotification } from '../models/repositories/notification'; -import { PackedMessagingMessage } from '../models/repositories/messaging-message'; +import config from '@/config/index.js'; +import { SwSubscriptions } from '@/models/index.js'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import { PackedNotification } from '../models/repositories/notification.js'; +import { PackedMessagingMessage } from '../models/repositories/messaging-message.js'; type notificationType = 'notification' | 'unreadMessagingMessage'; type notificationBody = PackedNotification | PackedMessagingMessage; diff --git a/src/services/register-or-fetch-instance-doc.ts b/src/services/register-or-fetch-instance-doc.ts index 2edf85fd9f..0bbc9ab275 100644 --- a/src/services/register-or-fetch-instance-doc.ts +++ b/src/services/register-or-fetch-instance-doc.ts @@ -1,9 +1,9 @@ -import { Instance } from '../models/entities/instance'; -import { Instances } from '../models'; -import { federationChart } from './chart'; -import { genId } from '@/misc/gen-id'; -import { toPuny } from '@/misc/convert-host'; -import { Cache } from '@/misc/cache'; +import { Instance } from '@/models/entities/instance.js'; +import { Instances } from '@/models/index.js'; +import { federationChart } from '@/services/chart/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { toPuny } from '@/misc/convert-host.js'; +import { Cache } from '@/misc/cache.js'; const cache = new Cache(1000 * 60 * 60); diff --git a/src/services/relay.ts b/src/services/relay.ts index a2cc711bd3..8e0fa12fb3 100644 --- a/src/services/relay.ts +++ b/src/services/relay.ts @@ -1,11 +1,11 @@ -import { createSystemUser } from './create-system-user'; -import { renderFollowRelay } from '../remote/activitypub/renderer/follow-relay'; -import { renderActivity, attachLdSignature } from '../remote/activitypub/renderer'; -import renderUndo from '../remote/activitypub/renderer/undo'; -import { deliver } from '../queue'; -import { ILocalUser, User } from '../models/entities/user'; -import { Users, Relays } from '../models'; -import { genId } from '@/misc/gen-id'; +import { createSystemUser } from './create-system-user.js'; +import { renderFollowRelay } from '@/remote/activitypub/renderer/follow-relay.js'; +import { renderActivity, attachLdSignature } from '@/remote/activitypub/renderer/index.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import { deliver } from '@/queue/index.js'; +import { ILocalUser, User } from '@/models/entities/user.js'; +import { Users, Relays } from '@/models/index.js'; +import { genId } from '@/misc/gen-id.js'; const ACTOR_USERNAME = 'relay.actor' as const; diff --git a/src/services/send-email-notification.ts b/src/services/send-email-notification.ts index ad17429516..18f5b76074 100644 --- a/src/services/send-email-notification.ts +++ b/src/services/send-email-notification.ts @@ -1,9 +1,9 @@ -import { UserProfiles } from '../models'; -import { User } from '../models/entities/user'; -import { sendEmail } from './send-email'; -import * as locales from '../../locales/'; -import { I18n } from '@/misc/i18n'; -import { getAcct } from '@/misc/acct'; +import { UserProfiles } from '@/models/index.js'; +import { User } from '@/models/entities/user.js'; +import { sendEmail } from './send-email.js'; +import * as locales from '../../locales/index.js'; +import { I18n } from '@/misc/i18n.js'; +import { getAcct } from '@/misc/acct.js'; // TODO: locale ファイルをクライアント用とサーバー用で分けたい diff --git a/src/services/send-email.ts b/src/services/send-email.ts index 4784ba5510..135fb3d329 100644 --- a/src/services/send-email.ts +++ b/src/services/send-email.ts @@ -1,7 +1,7 @@ import * as nodemailer from 'nodemailer'; -import { fetchMeta } from '@/misc/fetch-meta'; -import Logger from './logger'; -import config from '@/config'; +import { fetchMeta } from '@/misc/fetch-meta.js'; +import Logger from './logger.js'; +import config from '@/config/index.js'; export const logger = new Logger('email'); diff --git a/src/services/stream.ts b/src/services/stream.ts index 6258dc5a7d..e334944533 100644 --- a/src/services/stream.ts +++ b/src/services/stream.ts @@ -1,12 +1,12 @@ -import { redisClient } from '../db/redis'; -import { User } from '../models/entities/user'; -import { Note } from '../models/entities/note'; -import { UserList } from '../models/entities/user-list'; -import { ReversiGame } from '../models/entities/games/reversi/game'; -import { UserGroup } from '../models/entities/user-group'; -import config from '@/config'; -import { Antenna } from '../models/entities/antenna'; -import { Channel } from '../models/entities/channel'; +import { redisClient } from '../db/redis.js'; +import { User } from '@/models/entities/user.js'; +import { Note } from '@/models/entities/note.js'; +import { UserList } from '@/models/entities/user-list.js'; +import { ReversiGame } from '@/models/entities/games/reversi/game.js'; +import { UserGroup } from '@/models/entities/user-group.js'; +import config from '@/config/index.js'; +import { Antenna } from '@/models/entities/antenna.js'; +import { Channel } from '@/models/entities/channel.js'; class Publisher { private publish = (channel: string, type: string | null, value?: any): void => { diff --git a/src/services/suspend-user.ts b/src/services/suspend-user.ts index c868c01305..5ec639b1b8 100644 --- a/src/services/suspend-user.ts +++ b/src/services/suspend-user.ts @@ -1,9 +1,9 @@ -import renderDelete from '../remote/activitypub/renderer/delete'; -import { renderActivity } from '../remote/activitypub/renderer'; -import { deliver } from '../queue'; -import config from '@/config'; -import { User } from '../models/entities/user'; -import { Users, Followings } from '../models'; +import renderDelete from '@/remote/activitypub/renderer/delete.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { deliver } from '@/queue/index.js'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; +import { Users, Followings } from '@/models/index.js'; import { Not, IsNull } from 'typeorm'; export async function doPostSuspend(user: { id: User['id']; host: User['host'] }) { diff --git a/src/services/unsuspend-user.ts b/src/services/unsuspend-user.ts index 5bc4bba423..3728e05392 100644 --- a/src/services/unsuspend-user.ts +++ b/src/services/unsuspend-user.ts @@ -1,10 +1,10 @@ -import renderDelete from '../remote/activitypub/renderer/delete'; -import renderUndo from '../remote/activitypub/renderer/undo'; -import { renderActivity } from '../remote/activitypub/renderer'; -import { deliver } from '../queue'; -import config from '@/config'; -import { User } from '../models/entities/user'; -import { Users, Followings } from '../models'; +import renderDelete from '@/remote/activitypub/renderer/delete.js'; +import renderUndo from '@/remote/activitypub/renderer/undo.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index.js'; +import { deliver } from '@/queue/index.js'; +import config from '@/config/index.js'; +import { User } from '@/models/entities/user.js'; +import { Users, Followings } from '@/models/index.js'; import { Not, IsNull } from 'typeorm'; export async function doPostUnsuspend(user: User) { diff --git a/src/services/update-hashtag.ts b/src/services/update-hashtag.ts index 6b7208f005..b6fb38bc5a 100644 --- a/src/services/update-hashtag.ts +++ b/src/services/update-hashtag.ts @@ -1,9 +1,9 @@ -import { User } from '../models/entities/user'; -import { Hashtags, Users } from '../models'; -import { hashtagChart } from './chart'; -import { genId } from '@/misc/gen-id'; -import { Hashtag } from '../models/entities/hashtag'; -import { normalizeForSearch } from '@/misc/normalize-for-search'; +import { User } from '@/models/entities/user.js'; +import { Hashtags, Users } from '@/models/index.js'; +import { hashtagChart } from '@/services/chart/index.js'; +import { genId } from '@/misc/gen-id.js'; +import { Hashtag } from '@/models/entities/hashtag.js'; +import { normalizeForSearch } from '@/misc/normalize-for-search.js'; export async function updateHashtags(user: { id: User['id']; host: User['host']; }, tags: string[]) { for (const tag of tags) { diff --git a/src/services/user-list/push.ts b/src/services/user-list/push.ts index 3dd9a8576b..01e9243c12 100644 --- a/src/services/user-list/push.ts +++ b/src/services/user-list/push.ts @@ -1,11 +1,11 @@ -import { publishUserListStream } from '../stream'; -import { User } from '../../models/entities/user'; -import { UserList } from '../../models/entities/user-list'; -import { UserListJoinings, Users } from '../../models'; -import { UserListJoining } from '../../models/entities/user-list-joining'; -import { genId } from '@/misc/gen-id'; -import { fetchProxyAccount } from '@/misc/fetch-proxy-account'; -import createFollowing from '../following/create'; +import { publishUserListStream } from '@/services/stream.js'; +import { User } from '@/models/entities/user.js'; +import { UserList } from '@/models/entities/user-list.js'; +import { UserListJoinings, Users } from '@/models/index.js'; +import { UserListJoining } from '@/models/entities/user-list-joining.js'; +import { genId } from '@/misc/gen-id.js'; +import { fetchProxyAccount } from '@/misc/fetch-proxy-account.js'; +import createFollowing from '../following/create.js'; export async function pushUserToUserList(target: User, list: UserList) { await UserListJoinings.insert({ 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 { 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 { 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 { 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} diff --git a/src/tsconfig.json b/src/tsconfig.json index 9389008eef..4a03a17432 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -12,6 +12,7 @@ "target": "es2017", "module": "commonjs", "moduleResolution": "node", + "allowSyntheticDefaultImports": true, "removeComments": false, "noLib": false, "strict": true, diff --git a/test/tsconfig.json b/test/tsconfig.json index 31a537805a..9f9e724ea2 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -12,6 +12,7 @@ "target": "es2017", "module": "commonjs", "moduleResolution": "node", + "allowSyntheticDefaultImports": true, "removeComments": false, "noLib": false, "strict": true, From 42cc93dd0f189995f29fc87d2734fc809105a7cf Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 21:55:45 +0900 Subject: [PATCH 09/32] =?UTF-8?q?fix:=20mocha=E3=81=8C=E5=8B=95=E3=81=8B?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=9F=E3=82=81=E6=8B=A1=E5=BC=B5=E5=AD=90?= =?UTF-8?q?=E3=81=AA=E3=81=97=E3=81=AB=E6=88=BB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/argv.ts | 2 +- src/boot/index.ts | 8 +- src/boot/master.ts | 14 +- src/boot/worker.ts | 2 +- src/config/index.ts | 2 +- src/config/load.ts | 2 +- src/daemons/janitor.ts | 2 +- src/daemons/queue-stats.ts | 2 +- src/db/elasticsearch.ts | 2 +- src/db/logger.ts | 2 +- src/db/postgre.ts | 134 +++++++++--------- src/db/redis.ts | 2 +- src/index.ts | 2 +- src/mfm/to-html.ts | 8 +- src/misc/antenna-cache.ts | 6 +- src/misc/app-lock.ts | 2 +- src/misc/captcha.ts | 4 +- src/misc/check-hit-antenna.ts | 14 +- src/misc/check-word-mute.ts | 4 +- src/misc/convert-host.ts | 2 +- src/misc/count-same-renotes.ts | 2 +- src/misc/detect-url-mime.ts | 6 +- src/misc/download-text-file.ts | 6 +- src/misc/download-url.ts | 6 +- src/misc/extract-custom-emojis-from-mfm.ts | 2 +- src/misc/extract-hashtags.ts | 2 +- src/misc/fetch-meta.ts | 2 +- src/misc/fetch-proxy-account.ts | 6 +- src/misc/fetch.ts | 2 +- src/misc/gen-id.ts | 10 +- src/misc/get-user-name.ts | 2 +- src/misc/is-quote.ts | 2 +- src/misc/keypair-store.ts | 8 +- src/misc/populate-emojis.ts | 16 +-- src/misc/reaction-lib.ts | 8 +- src/misc/show-machine-info.ts | 2 +- src/models/entities/abuse-user-report.ts | 4 +- src/models/entities/access-token.ts | 6 +- src/models/entities/ad.ts | 2 +- src/models/entities/announcement-read.ts | 6 +- src/models/entities/announcement.ts | 2 +- src/models/entities/antenna-note.ts | 6 +- src/models/entities/antenna.ts | 8 +- src/models/entities/app.ts | 4 +- src/models/entities/attestation-challenge.ts | 4 +- src/models/entities/auth-session.ts | 6 +- src/models/entities/blocking.ts | 4 +- src/models/entities/channel-following.ts | 6 +- src/models/entities/channel-note-pining.ts | 6 +- src/models/entities/channel.ts | 6 +- src/models/entities/clip-note.ts | 6 +- src/models/entities/clip.ts | 4 +- src/models/entities/drive-file.ts | 6 +- src/models/entities/drive-folder.ts | 4 +- src/models/entities/emoji.ts | 2 +- src/models/entities/follow-request.ts | 4 +- src/models/entities/following.ts | 4 +- src/models/entities/gallery-like.ts | 6 +- src/models/entities/gallery-post.ts | 6 +- src/models/entities/games/reversi/game.ts | 4 +- src/models/entities/games/reversi/matching.ts | 4 +- src/models/entities/hashtag.ts | 4 +- src/models/entities/instance.ts | 2 +- src/models/entities/log.ts | 2 +- src/models/entities/messaging-message.ts | 8 +- src/models/entities/meta.ts | 6 +- src/models/entities/moderation-log.ts | 4 +- src/models/entities/muted-note.ts | 8 +- src/models/entities/muting.ts | 4 +- src/models/entities/note-favorite.ts | 6 +- src/models/entities/note-reaction.ts | 6 +- src/models/entities/note-unread.ts | 8 +- src/models/entities/note-watching.ts | 6 +- src/models/entities/note.ts | 10 +- src/models/entities/notification.ts | 14 +- src/models/entities/page-like.ts | 6 +- src/models/entities/page.ts | 6 +- src/models/entities/password-reset-request.ts | 4 +- src/models/entities/poll-vote.ts | 6 +- src/models/entities/poll.ts | 8 +- src/models/entities/promo-note.ts | 6 +- src/models/entities/promo-read.ts | 6 +- src/models/entities/registration-tickets.ts | 2 +- src/models/entities/registry-item.ts | 4 +- src/models/entities/relay.ts | 2 +- src/models/entities/signin.ts | 4 +- src/models/entities/sw-subscription.ts | 4 +- src/models/entities/user-group-invitation.ts | 6 +- src/models/entities/user-group-joining.ts | 6 +- src/models/entities/user-group.ts | 4 +- src/models/entities/user-keypair.ts | 4 +- src/models/entities/user-list-joining.ts | 6 +- src/models/entities/user-list.ts | 4 +- src/models/entities/user-note-pining.ts | 6 +- src/models/entities/user-profile.ts | 8 +- src/models/entities/user-publickey.ts | 4 +- src/models/entities/user-security-key.ts | 4 +- src/models/entities/user.ts | 4 +- src/models/index.ts | 126 ++++++++-------- src/models/repositories/abuse-user-report.ts | 6 +- src/models/repositories/antenna.ts | 6 +- src/models/repositories/app.ts | 6 +- src/models/repositories/auth-session.ts | 8 +- src/models/repositories/blocking.ts | 10 +- src/models/repositories/channel.ts | 8 +- src/models/repositories/clip.ts | 8 +- src/models/repositories/drive-file.ts | 20 +-- src/models/repositories/drive-folder.ts | 8 +- src/models/repositories/emoji.ts | 2 +- .../repositories/federation-instance.ts | 2 +- src/models/repositories/follow-request.ts | 6 +- src/models/repositories/following.ts | 10 +- src/models/repositories/gallery-like.ts | 4 +- src/models/repositories/gallery-post.ts | 10 +- src/models/repositories/games/reversi/game.ts | 6 +- .../repositories/games/reversi/matching.ts | 8 +- src/models/repositories/hashtag.ts | 4 +- src/models/repositories/messaging-message.ts | 8 +- src/models/repositories/moderation-logs.ts | 6 +- src/models/repositories/muting.ts | 10 +- src/models/repositories/note-favorite.ts | 6 +- src/models/repositories/note-reaction.ts | 10 +- src/models/repositories/note.ts | 18 +-- src/models/repositories/notification.ts | 16 +-- src/models/repositories/page-like.ts | 6 +- src/models/repositories/page.ts | 12 +- src/models/repositories/relay.ts | 2 +- src/models/repositories/signin.ts | 2 +- .../repositories/user-group-invitation.ts | 4 +- src/models/repositories/user-group.ts | 6 +- src/models/repositories/user-list.ts | 6 +- src/models/repositories/user.ts | 16 +-- src/prelude/array.ts | 2 +- src/queue/index.ts | 24 ++-- src/queue/initialize.ts | 2 +- src/queue/logger.ts | 2 +- src/queue/processors/db/delete-drive-files.ts | 8 +- src/queue/processors/db/export-blocking.ts | 10 +- src/queue/processors/db/export-following.ts | 10 +- src/queue/processors/db/export-mute.ts | 10 +- src/queue/processors/db/export-notes.ts | 12 +- src/queue/processors/db/export-user-lists.ts | 10 +- src/queue/processors/db/import-following.ts | 16 +-- src/queue/processors/db/import-user-lists.ts | 18 +-- src/queue/processors/db/index.ts | 18 +-- src/queue/processors/deliver.ts | 22 +-- src/queue/processors/inbox.ts | 26 ++-- .../object-storage/clean-remote-files.ts | 6 +- .../processors/object-storage/delete-file.ts | 4 +- src/queue/processors/object-storage/index.ts | 6 +- src/queue/queues.ts | 6 +- src/queue/types.ts | 6 +- src/remote/activitypub/audience.ts | 10 +- src/remote/activitypub/db-resolver.ts | 16 +-- src/remote/activitypub/deliver-manager.ts | 6 +- .../activitypub/kernel/accept/follow.ts | 10 +- src/remote/activitypub/kernel/accept/index.ts | 10 +- src/remote/activitypub/kernel/add/index.ts | 8 +- .../activitypub/kernel/announce/index.ts | 10 +- .../activitypub/kernel/announce/note.ts | 20 +-- src/remote/activitypub/kernel/block/index.ts | 8 +- src/remote/activitypub/kernel/create/index.ts | 12 +- src/remote/activitypub/kernel/create/note.ts | 12 +- src/remote/activitypub/kernel/delete/index.ts | 8 +- src/remote/activitypub/kernel/delete/note.ts | 12 +- src/remote/activitypub/kernel/flag/index.ts | 10 +- src/remote/activitypub/kernel/follow.ts | 8 +- src/remote/activitypub/kernel/index.ts | 38 ++--- src/remote/activitypub/kernel/like.ts | 8 +- src/remote/activitypub/kernel/read.ts | 10 +- .../activitypub/kernel/reject/follow.ts | 10 +- src/remote/activitypub/kernel/reject/index.ts | 10 +- src/remote/activitypub/kernel/remove/index.ts | 8 +- .../activitypub/kernel/undo/announce.ts | 8 +- src/remote/activitypub/kernel/undo/block.ts | 8 +- src/remote/activitypub/kernel/undo/follow.ts | 12 +- src/remote/activitypub/kernel/undo/index.ts | 16 +-- src/remote/activitypub/kernel/undo/like.ts | 8 +- src/remote/activitypub/kernel/update/index.ts | 12 +- src/remote/activitypub/logger.ts | 2 +- src/remote/activitypub/misc/get-note-html.ts | 4 +- src/remote/activitypub/misc/html-to-mfm.ts | 6 +- src/remote/activitypub/misc/ld-signature.ts | 4 +- src/remote/activitypub/models/image.ts | 14 +- src/remote/activitypub/models/mention.ts | 10 +- src/remote/activitypub/models/note.ts | 52 +++---- src/remote/activitypub/models/person.ts | 50 +++---- src/remote/activitypub/models/question.ts | 12 +- src/remote/activitypub/models/tag.ts | 4 +- src/remote/activitypub/perform.ts | 6 +- src/remote/activitypub/renderer/accept.ts | 4 +- src/remote/activitypub/renderer/add.ts | 4 +- src/remote/activitypub/renderer/announce.ts | 4 +- src/remote/activitypub/renderer/block.ts | 4 +- src/remote/activitypub/renderer/create.ts | 4 +- src/remote/activitypub/renderer/delete.ts | 4 +- src/remote/activitypub/renderer/document.ts | 4 +- src/remote/activitypub/renderer/emoji.ts | 4 +- .../activitypub/renderer/follow-relay.ts | 6 +- .../activitypub/renderer/follow-user.ts | 6 +- src/remote/activitypub/renderer/follow.ts | 6 +- src/remote/activitypub/renderer/hashtag.ts | 2 +- src/remote/activitypub/renderer/image.ts | 4 +- src/remote/activitypub/renderer/index.ts | 10 +- src/remote/activitypub/renderer/key.ts | 6 +- src/remote/activitypub/renderer/like.ts | 10 +- src/remote/activitypub/renderer/mention.ts | 6 +- src/remote/activitypub/renderer/note.ts | 22 +-- src/remote/activitypub/renderer/person.ts | 22 +-- src/remote/activitypub/renderer/question.ts | 8 +- src/remote/activitypub/renderer/read.ts | 6 +- src/remote/activitypub/renderer/reject.ts | 4 +- src/remote/activitypub/renderer/remove.ts | 4 +- src/remote/activitypub/renderer/undo.ts | 4 +- src/remote/activitypub/renderer/update.ts | 4 +- src/remote/activitypub/renderer/vote.ts | 10 +- src/remote/activitypub/request.ts | 8 +- src/remote/activitypub/resolver.ts | 12 +- src/remote/logger.ts | 2 +- src/remote/resolve-user.ts | 14 +- src/remote/webfinger.ts | 4 +- src/server/activitypub.ts | 30 ++-- src/server/activitypub/featured.ts | 12 +- src/server/activitypub/followers.ts | 18 +-- src/server/activitypub/following.ts | 20 +-- src/server/activitypub/outbox.ts | 28 ++-- src/server/api/2fa.ts | 2 +- src/server/api/api-handler.ts | 8 +- src/server/api/authenticate.ts | 8 +- src/server/api/call.ts | 12 +- src/server/api/common/generate-block-query.ts | 4 +- .../api/common/generate-channel-query.ts | 4 +- .../api/common/generate-muted-note-query.ts | 4 +- .../api/common/generate-muted-user-query.ts | 4 +- .../api/common/generate-native-user-token.ts | 2 +- .../api/common/generate-replies-query.ts | 2 +- .../api/common/generate-visibility-query.ts | 4 +- src/server/api/common/getters.ts | 8 +- src/server/api/common/inject-featured.ts | 10 +- src/server/api/common/inject-promo.ts | 6 +- .../api/common/read-messaging-message.ts | 26 ++-- src/server/api/common/read-notification.ts | 8 +- src/server/api/common/signin.ts | 10 +- src/server/api/common/signup.ts | 18 +-- src/server/api/define.ts | 10 +- src/server/api/endpoints.ts | 2 +- .../api/endpoints/admin/abuse-user-reports.ts | 8 +- .../api/endpoints/admin/accounts/create.ts | 6 +- src/server/api/endpoints/admin/ad/create.ts | 6 +- src/server/api/endpoints/admin/ad/delete.ts | 8 +- src/server/api/endpoints/admin/ad/list.ts | 8 +- src/server/api/endpoints/admin/ad/update.ts | 8 +- .../endpoints/admin/announcements/create.ts | 6 +- .../endpoints/admin/announcements/delete.ts | 8 +- .../api/endpoints/admin/announcements/list.ts | 8 +- .../endpoints/admin/announcements/update.ts | 8 +- .../admin/delete-all-files-of-a-user.ts | 8 +- src/server/api/endpoints/admin/delete-logs.ts | 4 +- .../admin/drive/clean-remote-files.ts | 4 +- .../api/endpoints/admin/drive/cleanup.ts | 6 +- src/server/api/endpoints/admin/drive/files.ts | 8 +- .../api/endpoints/admin/drive/show-file.ts | 8 +- src/server/api/endpoints/admin/emoji/add.ts | 14 +- src/server/api/endpoints/admin/emoji/copy.ts | 16 +-- .../api/endpoints/admin/emoji/list-remote.ts | 10 +- src/server/api/endpoints/admin/emoji/list.ts | 10 +- .../api/endpoints/admin/emoji/remove.ts | 10 +- .../api/endpoints/admin/emoji/update.ts | 8 +- .../admin/federation/delete-all-files.ts | 6 +- .../refresh-remote-instance-metadata.ts | 8 +- .../admin/federation/remove-all-following.ts | 6 +- .../admin/federation/update-instance.ts | 6 +- .../api/endpoints/admin/get-index-stats.ts | 2 +- .../api/endpoints/admin/get-table-stats.ts | 2 +- src/server/api/endpoints/admin/invite.ts | 6 +- src/server/api/endpoints/admin/logs.ts | 4 +- .../api/endpoints/admin/moderators/add.ts | 6 +- .../api/endpoints/admin/moderators/remove.ts | 6 +- .../api/endpoints/admin/promo/create.ts | 10 +- src/server/api/endpoints/admin/queue/clear.ts | 6 +- .../endpoints/admin/queue/deliver-delayed.ts | 4 +- .../endpoints/admin/queue/inbox-delayed.ts | 4 +- src/server/api/endpoints/admin/queue/jobs.ts | 4 +- src/server/api/endpoints/admin/queue/stats.ts | 4 +- src/server/api/endpoints/admin/relays/add.ts | 6 +- src/server/api/endpoints/admin/relays/list.ts | 4 +- .../api/endpoints/admin/relays/remove.ts | 4 +- .../api/endpoints/admin/reset-password.ts | 6 +- .../admin/resolve-abuse-user-report.ts | 6 +- .../api/endpoints/admin/resync-chart.ts | 6 +- src/server/api/endpoints/admin/send-email.ts | 4 +- src/server/api/endpoints/admin/server-info.ts | 4 +- .../endpoints/admin/show-moderation-logs.ts | 8 +- src/server/api/endpoints/admin/show-user.ts | 6 +- src/server/api/endpoints/admin/show-users.ts | 4 +- .../api/endpoints/admin/silence-user.ts | 8 +- .../api/endpoints/admin/suspend-user.ts | 16 +-- .../api/endpoints/admin/unsilence-user.ts | 8 +- .../api/endpoints/admin/unsuspend-user.ts | 10 +- src/server/api/endpoints/admin/update-meta.ts | 10 +- src/server/api/endpoints/admin/vacuum.ts | 4 +- src/server/api/endpoints/announcements.ts | 8 +- src/server/api/endpoints/antennas/create.ts | 12 +- src/server/api/endpoints/antennas/delete.ts | 10 +- src/server/api/endpoints/antennas/list.ts | 4 +- src/server/api/endpoints/antennas/notes.ts | 16 +-- src/server/api/endpoints/antennas/show.ts | 8 +- src/server/api/endpoints/antennas/update.ts | 10 +- src/server/api/endpoints/ap/get.ts | 6 +- src/server/api/endpoints/ap/show.ts | 24 ++-- src/server/api/endpoints/app/create.ts | 10 +- src/server/api/endpoints/app/show.ts | 8 +- src/server/api/endpoints/auth/accept.ts | 10 +- .../api/endpoints/auth/session/generate.ts | 10 +- src/server/api/endpoints/auth/session/show.ts | 6 +- .../api/endpoints/auth/session/userkey.ts | 6 +- src/server/api/endpoints/blocking/create.ts | 12 +- src/server/api/endpoints/blocking/delete.ts | 12 +- src/server/api/endpoints/blocking/list.ts | 8 +- src/server/api/endpoints/channels/create.ts | 12 +- src/server/api/endpoints/channels/featured.ts | 4 +- src/server/api/endpoints/channels/follow.ts | 12 +- src/server/api/endpoints/channels/followed.ts | 8 +- src/server/api/endpoints/channels/owned.ts | 8 +- src/server/api/endpoints/channels/show.ts | 8 +- src/server/api/endpoints/channels/timeline.ts | 12 +- src/server/api/endpoints/channels/unfollow.ts | 10 +- src/server/api/endpoints/channels/update.ts | 8 +- .../api/endpoints/charts/active-users.ts | 6 +- src/server/api/endpoints/charts/drive.ts | 6 +- src/server/api/endpoints/charts/federation.ts | 6 +- src/server/api/endpoints/charts/hashtag.ts | 6 +- src/server/api/endpoints/charts/instance.ts | 6 +- src/server/api/endpoints/charts/network.ts | 6 +- src/server/api/endpoints/charts/notes.ts | 6 +- src/server/api/endpoints/charts/user/drive.ts | 8 +- .../api/endpoints/charts/user/following.ts | 8 +- src/server/api/endpoints/charts/user/notes.ts | 8 +- .../api/endpoints/charts/user/reactions.ts | 8 +- src/server/api/endpoints/charts/users.ts | 6 +- src/server/api/endpoints/clips/add-note.ts | 12 +- src/server/api/endpoints/clips/create.ts | 6 +- src/server/api/endpoints/clips/delete.ts | 8 +- src/server/api/endpoints/clips/list.ts | 4 +- src/server/api/endpoints/clips/notes.ts | 16 +-- src/server/api/endpoints/clips/show.ts | 8 +- src/server/api/endpoints/clips/update.ts | 8 +- src/server/api/endpoints/drive.ts | 6 +- src/server/api/endpoints/drive/files.ts | 8 +- .../endpoints/drive/files/attached-notes.ts | 8 +- .../endpoints/drive/files/check-existence.ts | 4 +- .../api/endpoints/drive/files/create.ts | 12 +- .../api/endpoints/drive/files/delete.ts | 12 +- .../api/endpoints/drive/files/find-by-hash.ts | 4 +- src/server/api/endpoints/drive/files/find.ts | 6 +- src/server/api/endpoints/drive/files/show.ts | 10 +- .../api/endpoints/drive/files/update.ts | 10 +- .../endpoints/drive/files/upload-from-url.ts | 10 +- src/server/api/endpoints/drive/folders.ts | 8 +- .../api/endpoints/drive/folders/create.ts | 12 +- .../api/endpoints/drive/folders/delete.ts | 10 +- .../api/endpoints/drive/folders/find.ts | 6 +- .../api/endpoints/drive/folders/show.ts | 8 +- .../api/endpoints/drive/folders/update.ts | 10 +- src/server/api/endpoints/drive/stream.ts | 8 +- src/server/api/endpoints/endpoint.ts | 4 +- src/server/api/endpoints/endpoints.ts | 4 +- src/server/api/endpoints/federation/dns.ts | 6 +- .../api/endpoints/federation/followers.ts | 8 +- .../api/endpoints/federation/following.ts | 8 +- .../api/endpoints/federation/instances.ts | 8 +- .../api/endpoints/federation/show-instance.ts | 6 +- .../federation/update-remote-user.ts | 8 +- src/server/api/endpoints/federation/users.ts | 8 +- src/server/api/endpoints/following/create.ts | 12 +- src/server/api/endpoints/following/delete.ts | 12 +- .../endpoints/following/requests/accept.ts | 10 +- .../endpoints/following/requests/cancel.ts | 12 +- .../api/endpoints/following/requests/list.ts | 4 +- .../endpoints/following/requests/reject.ts | 10 +- src/server/api/endpoints/gallery/featured.ts | 4 +- src/server/api/endpoints/gallery/popular.ts | 4 +- src/server/api/endpoints/gallery/posts.ts | 8 +- .../api/endpoints/gallery/posts/create.ts | 14 +- .../api/endpoints/gallery/posts/delete.ts | 8 +- .../api/endpoints/gallery/posts/like.ts | 10 +- .../api/endpoints/gallery/posts/show.ts | 8 +- .../api/endpoints/gallery/posts/unlike.ts | 8 +- .../api/endpoints/gallery/posts/update.ts | 12 +- .../api/endpoints/games/reversi/games.ts | 8 +- .../api/endpoints/games/reversi/games/show.ts | 10 +- .../games/reversi/games/surrender.ts | 10 +- .../endpoints/games/reversi/invitations.ts | 4 +- .../api/endpoints/games/reversi/match.ts | 20 +-- .../endpoints/games/reversi/match/cancel.ts | 4 +- .../api/endpoints/get-online-users-count.ts | 6 +- src/server/api/endpoints/hashtags/list.ts | 4 +- src/server/api/endpoints/hashtags/search.ts | 4 +- src/server/api/endpoints/hashtags/show.ts | 8 +- src/server/api/endpoints/hashtags/trend.ts | 12 +- src/server/api/endpoints/hashtags/users.ts | 6 +- src/server/api/endpoints/i.ts | 4 +- src/server/api/endpoints/i/2fa/done.ts | 4 +- src/server/api/endpoints/i/2fa/key-done.ts | 10 +- .../api/endpoints/i/2fa/password-less.ts | 4 +- .../api/endpoints/i/2fa/register-key.ts | 8 +- src/server/api/endpoints/i/2fa/register.ts | 6 +- src/server/api/endpoints/i/2fa/remove-key.ts | 6 +- src/server/api/endpoints/i/2fa/unregister.ts | 4 +- src/server/api/endpoints/i/apps.ts | 4 +- src/server/api/endpoints/i/authorized-apps.ts | 4 +- src/server/api/endpoints/i/change-password.ts | 4 +- src/server/api/endpoints/i/delete-account.ts | 8 +- src/server/api/endpoints/i/export-blocking.ts | 4 +- .../api/endpoints/i/export-following.ts | 4 +- src/server/api/endpoints/i/export-mute.ts | 4 +- src/server/api/endpoints/i/export-notes.ts | 4 +- .../api/endpoints/i/export-user-lists.ts | 4 +- src/server/api/endpoints/i/favorites.ts | 8 +- src/server/api/endpoints/i/gallery/likes.ts | 8 +- src/server/api/endpoints/i/gallery/posts.ts | 8 +- .../endpoints/i/get-word-muted-notes-count.ts | 4 +- .../api/endpoints/i/import-following.ts | 10 +- .../api/endpoints/i/import-user-lists.ts | 10 +- src/server/api/endpoints/i/notifications.ts | 14 +- src/server/api/endpoints/i/page-likes.ts | 8 +- src/server/api/endpoints/i/pages.ts | 8 +- src/server/api/endpoints/i/pin.ts | 10 +- .../i/read-all-messaging-messages.ts | 6 +- .../api/endpoints/i/read-all-unread-notes.ts | 6 +- .../api/endpoints/i/read-announcement.ts | 12 +- .../api/endpoints/i/regenerate-token.ts | 8 +- .../api/endpoints/i/registry/get-all.ts | 4 +- .../api/endpoints/i/registry/get-detail.ts | 6 +- src/server/api/endpoints/i/registry/get.ts | 6 +- .../endpoints/i/registry/keys-with-type.ts | 4 +- src/server/api/endpoints/i/registry/keys.ts | 4 +- src/server/api/endpoints/i/registry/remove.ts | 6 +- src/server/api/endpoints/i/registry/scopes.ts | 4 +- src/server/api/endpoints/i/registry/set.ts | 8 +- src/server/api/endpoints/i/revoke-token.ts | 8 +- src/server/api/endpoints/i/signin-history.ts | 8 +- src/server/api/endpoints/i/unpin.ts | 10 +- src/server/api/endpoints/i/update-email.ts | 12 +- src/server/api/endpoints/i/update.ts | 28 ++-- .../api/endpoints/i/user-group-invites.ts | 8 +- src/server/api/endpoints/messaging/history.ts | 6 +- .../api/endpoints/messaging/messages.ts | 14 +- .../endpoints/messaging/messages/create.ts | 16 +-- .../endpoints/messaging/messages/delete.ts | 10 +- .../api/endpoints/messaging/messages/read.ts | 10 +- src/server/api/endpoints/meta.ts | 10 +- src/server/api/endpoints/miauth/gen-token.ts | 8 +- src/server/api/endpoints/mute/create.ts | 16 +-- src/server/api/endpoints/mute/delete.ts | 12 +- src/server/api/endpoints/mute/list.ts | 8 +- src/server/api/endpoints/my/apps.ts | 4 +- src/server/api/endpoints/notes.ts | 8 +- src/server/api/endpoints/notes/children.ts | 14 +- src/server/api/endpoints/notes/clips.ts | 10 +- .../api/endpoints/notes/conversation.ts | 12 +- src/server/api/endpoints/notes/create.ts | 24 ++-- src/server/api/endpoints/notes/delete.ts | 12 +- .../api/endpoints/notes/favorites/create.ts | 12 +- .../api/endpoints/notes/favorites/delete.ts | 10 +- src/server/api/endpoints/notes/featured.ts | 8 +- .../api/endpoints/notes/global-timeline.ts | 22 +-- .../api/endpoints/notes/hybrid-timeline.ts | 26 ++-- .../api/endpoints/notes/local-timeline.ts | 26 ++-- src/server/api/endpoints/notes/mentions.ts | 16 +-- .../endpoints/notes/polls/recommendation.ts | 4 +- src/server/api/endpoints/notes/polls/vote.ts | 26 ++-- src/server/api/endpoints/notes/reactions.ts | 12 +- .../api/endpoints/notes/reactions/create.ts | 10 +- .../api/endpoints/notes/reactions/delete.ts | 10 +- src/server/api/endpoints/notes/renotes.ts | 18 +-- src/server/api/endpoints/notes/replies.ts | 14 +- .../api/endpoints/notes/search-by-tag.ts | 18 +-- src/server/api/endpoints/notes/search.ts | 18 +-- src/server/api/endpoints/notes/show.ts | 10 +- src/server/api/endpoints/notes/state.ts | 6 +- src/server/api/endpoints/notes/timeline.ts | 22 +-- src/server/api/endpoints/notes/translate.ts | 14 +- src/server/api/endpoints/notes/unrenote.ts | 12 +- .../api/endpoints/notes/user-list-timeline.ts | 14 +- .../api/endpoints/notes/watching/create.ts | 10 +- .../api/endpoints/notes/watching/delete.ts | 10 +- .../api/endpoints/notifications/create.ts | 4 +- .../notifications/mark-all-as-read.ts | 6 +- .../api/endpoints/notifications/read.ts | 12 +- src/server/api/endpoints/page-push.ts | 10 +- src/server/api/endpoints/pages/create.ts | 12 +- src/server/api/endpoints/pages/delete.ts | 8 +- src/server/api/endpoints/pages/featured.ts | 4 +- src/server/api/endpoints/pages/like.ts | 10 +- src/server/api/endpoints/pages/show.ts | 10 +- src/server/api/endpoints/pages/unlike.ts | 8 +- src/server/api/endpoints/pages/update.ts | 8 +- src/server/api/endpoints/ping.ts | 2 +- src/server/api/endpoints/pinned-users.ts | 10 +- src/server/api/endpoints/promo/read.ts | 12 +- .../api/endpoints/request-reset-password.ts | 14 +- src/server/api/endpoints/reset-db.ts | 6 +- src/server/api/endpoints/reset-password.ts | 8 +- src/server/api/endpoints/room/show.ts | 10 +- src/server/api/endpoints/room/update.ts | 6 +- src/server/api/endpoints/server-info.ts | 2 +- src/server/api/endpoints/stats.ts | 6 +- src/server/api/endpoints/sw/register.ts | 8 +- .../api/endpoints/username/available.ts | 4 +- src/server/api/endpoints/users.ts | 8 +- src/server/api/endpoints/users/clips.ts | 8 +- src/server/api/endpoints/users/followers.ts | 12 +- src/server/api/endpoints/users/following.ts | 12 +- .../api/endpoints/users/gallery/posts.ts | 8 +- .../users/get-frequently-replied-users.ts | 12 +- .../api/endpoints/users/groups/create.ts | 10 +- .../api/endpoints/users/groups/delete.ts | 8 +- .../users/groups/invitations/accept.ts | 12 +- .../users/groups/invitations/reject.ts | 8 +- .../api/endpoints/users/groups/invite.ts | 16 +-- .../api/endpoints/users/groups/joined.ts | 4 +- .../api/endpoints/users/groups/owned.ts | 4 +- src/server/api/endpoints/users/groups/pull.ts | 10 +- src/server/api/endpoints/users/groups/show.ts | 8 +- .../api/endpoints/users/groups/transfer.ts | 10 +- .../api/endpoints/users/groups/update.ts | 8 +- .../api/endpoints/users/lists/create.ts | 8 +- .../api/endpoints/users/lists/delete.ts | 8 +- src/server/api/endpoints/users/lists/list.ts | 4 +- src/server/api/endpoints/users/lists/pull.ts | 12 +- src/server/api/endpoints/users/lists/push.ts | 12 +- src/server/api/endpoints/users/lists/show.ts | 8 +- .../api/endpoints/users/lists/update.ts | 8 +- src/server/api/endpoints/users/notes.ts | 18 +-- src/server/api/endpoints/users/pages.ts | 8 +- .../api/endpoints/users/recommendation.ts | 8 +- src/server/api/endpoints/users/relation.ts | 6 +- .../api/endpoints/users/report-abuse.ts | 14 +- .../users/search-by-username-and-host.ts | 4 +- src/server/api/endpoints/users/search.ts | 6 +- src/server/api/endpoints/users/show.ts | 14 +- src/server/api/endpoints/users/stats.ts | 8 +- src/server/api/index.ts | 16 +-- src/server/api/limiter.ts | 10 +- src/server/api/logger.ts | 2 +- src/server/api/openapi/description.ts | 6 +- src/server/api/openapi/gen-spec.ts | 10 +- src/server/api/openapi/schemas.ts | 46 +++--- src/server/api/private/signin.ts | 12 +- src/server/api/private/signup.ts | 8 +- src/server/api/service/discord.ts | 16 +-- src/server/api/service/github.ts | 16 +-- src/server/api/service/twitter.ts | 14 +- src/server/api/stream/channels/admin.ts | 2 +- src/server/api/stream/channels/antenna.ts | 8 +- src/server/api/stream/channels/channel.ts | 12 +- src/server/api/stream/channels/drive.ts | 2 +- .../api/stream/channels/games/reversi-game.ts | 14 +- .../api/stream/channels/games/reversi.ts | 6 +- .../api/stream/channels/global-timeline.ts | 14 +- src/server/api/stream/channels/hashtag.ts | 12 +- .../api/stream/channels/home-timeline.ts | 12 +- .../api/stream/channels/hybrid-timeline.ts | 16 +-- src/server/api/stream/channels/index.ts | 34 ++--- .../api/stream/channels/local-timeline.ts | 16 +-- src/server/api/stream/channels/main.ts | 4 +- .../api/stream/channels/messaging-index.ts | 2 +- src/server/api/stream/channels/messaging.ts | 8 +- src/server/api/stream/channels/queue-stats.ts | 2 +- .../api/stream/channels/server-stats.ts | 2 +- src/server/api/stream/channels/user-list.ts | 12 +- src/server/api/stream/index.ts | 28 ++-- src/server/api/streaming.ts | 8 +- src/server/file/index.ts | 2 +- src/server/file/send-drive-file.ts | 16 +-- src/server/index.ts | 26 ++-- src/server/nodeinfo.ts | 10 +- src/server/proxy/index.ts | 2 +- src/server/proxy/proxy-media.ts | 10 +- src/server/web/feed.ts | 6 +- src/server/web/index.ts | 18 +-- src/server/web/manifest.ts | 2 +- src/server/web/url-preview.ts | 10 +- src/server/well-known.ts | 12 +- src/services/add-note-to-antenna.ts | 14 +- src/services/blocking/create.ts | 22 +-- src/services/blocking/delete.ts | 14 +- .../chart/charts/classes/active-users.ts | 10 +- src/services/chart/charts/classes/drive.ts | 10 +- .../chart/charts/classes/federation.ts | 8 +- src/services/chart/charts/classes/hashtag.ts | 10 +- src/services/chart/charts/classes/instance.ts | 14 +- src/services/chart/charts/classes/network.ts | 6 +- src/services/chart/charts/classes/notes.ts | 10 +- .../chart/charts/classes/per-user-drive.ts | 10 +- .../charts/classes/per-user-following.ts | 10 +- .../chart/charts/classes/per-user-notes.ts | 12 +- .../charts/classes/per-user-reactions.ts | 12 +- .../chart/charts/classes/test-grouped.ts | 6 +- .../chart/charts/classes/test-unique.ts | 6 +- src/services/chart/charts/classes/test.ts | 6 +- src/services/chart/charts/classes/users.ts | 10 +- src/services/chart/core.ts | 8 +- src/services/chart/entities.ts | 2 +- src/services/chart/index.ts | 26 ++-- src/services/create-notification.ts | 14 +- src/services/create-system-user.ts | 14 +- src/services/drive/add-file.ts | 32 ++--- src/services/drive/delete-file.ts | 28 ++-- .../drive/generate-video-thumbnail.ts | 2 +- src/services/drive/internal-storage.ts | 2 +- src/services/drive/logger.ts | 2 +- src/services/drive/s3.ts | 4 +- src/services/drive/upload-from-url.ts | 16 +-- src/services/fetch-instance-metadata.ts | 10 +- src/services/following/create.ts | 32 ++--- src/services/following/delete.ts | 20 +-- src/services/following/requests/accept-all.ts | 6 +- src/services/following/requests/accept.ts | 18 +-- src/services/following/requests/cancel.ts | 16 +-- src/services/following/requests/create.ts | 16 +-- src/services/following/requests/reject.ts | 16 +-- src/services/i/pin.ts | 24 ++-- src/services/i/update.ts | 14 +- src/services/insert-moderation-log.ts | 6 +- src/services/instance-actor.ts | 8 +- src/services/logger.ts | 8 +- src/services/messages/create.ts | 26 ++-- src/services/messages/delete.ts | 16 +-- src/services/note/create.ts | 68 ++++----- src/services/note/delete.ts | 30 ++-- src/services/note/polls/update.ts | 14 +- src/services/note/polls/vote.ts | 12 +- src/services/note/reaction/create.ts | 30 ++-- src/services/note/reaction/delete.ts | 20 +-- src/services/note/read.ts | 18 +-- src/services/note/unread.ts | 10 +- src/services/note/unwatch.ts | 6 +- src/services/note/watch.ts | 10 +- src/services/push-notification.ts | 10 +- .../register-or-fetch-instance-doc.ts | 12 +- src/services/relay.ts | 16 +-- src/services/send-email-notification.ts | 12 +- src/services/send-email.ts | 6 +- src/services/stream.ts | 18 +-- src/services/suspend-user.ts | 12 +- src/services/unsuspend-user.ts | 14 +- src/services/update-hashtag.ts | 12 +- src/services/user-list/push.ts | 16 +-- src/tools/accept-migration.ts | 2 +- src/tools/add-emoji.ts | 4 +- src/tools/demote-admin.ts | 4 +- src/tools/mark-admin.ts | 4 +- src/tools/refresh-question.ts | 2 +- src/tools/resync-remote-user.ts | 4 +- src/tools/show-signin-history.ts | 2 +- 657 files changed, 3085 insertions(+), 3085 deletions(-) diff --git a/src/argv.ts b/src/argv.ts index 5d1aeb70a0..106ecf2675 100644 --- a/src/argv.ts +++ b/src/argv.ts @@ -1,5 +1,5 @@ import { Command } from 'commander'; -import config from '@/config/index.js'; +import config from '@/config/index'; const program = new Command(); diff --git a/src/boot/index.ts b/src/boot/index.ts index 091793e530..20c53a366c 100644 --- a/src/boot/index.ts +++ b/src/boot/index.ts @@ -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); diff --git a/src/boot/master.ts b/src/boot/master.ts index 98da016f44..4cd91dc66a 100644 --- a/src/boot/master.ts +++ b/src/boot/master.ts @@ -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'); diff --git a/src/boot/worker.ts b/src/boot/worker.ts index 881e6c723d..362fa3f26b 100644 --- a/src/boot/worker.ts +++ b/src/boot/worker.ts @@ -1,5 +1,5 @@ import * as cluster from 'cluster'; -import { initDb } from '../db/postgre.js'; +import { initDb } from '../db/postgre'; /** * Init worker process diff --git a/src/config/index.ts b/src/config/index.ts index 3e53b00036..7bfdca4612 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,3 +1,3 @@ -import load from './load.js'; +import load from './load'; export default load(); diff --git a/src/config/load.ts b/src/config/load.ts index 920efad4d6..6a1cf60a41 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -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); diff --git a/src/daemons/janitor.ts b/src/daemons/janitor.ts index 2bffbc55d1..72568cfe18 100644 --- a/src/daemons/janitor.ts +++ b/src/daemons/janitor.ts @@ -1,7 +1,7 @@ // TODO: 消したい const interval = 30 * 60 * 1000; -import { AttestationChallenges } from '@/models/index.js'; +import { AttestationChallenges } from '@/models/index'; import { LessThan } from 'typeorm'; /** diff --git a/src/daemons/queue-stats.ts b/src/daemons/queue-stats.ts index 945bb1bd02..77f09b18d6 100644 --- a/src/daemons/queue-stats.ts +++ b/src/daemons/queue-stats.ts @@ -1,5 +1,5 @@ import Xev from 'xev'; -import { deliverQueue, inboxQueue } from '../queue/queues.js'; +import { deliverQueue, inboxQueue } from '../queue/queues'; const ev = new Xev(); diff --git a/src/db/elasticsearch.ts b/src/db/elasticsearch.ts index b21685069c..c99183007a 100644 --- a/src/db/elasticsearch.ts +++ b/src/db/elasticsearch.ts @@ -1,5 +1,5 @@ import * as elasticsearch from '@elastic/elasticsearch'; -import config from '@/config/index.js'; +import config from '@/config/index'; const index = { settings: { diff --git a/src/db/logger.ts b/src/db/logger.ts index 22f4c6b1b0..62f90555a0 100644 --- a/src/db/logger.ts +++ b/src/db/logger.ts @@ -1,3 +1,3 @@ -import Logger from '@/services/logger.js'; +import Logger from '@/services/logger'; export const dbLogger = new Logger('db'); diff --git a/src/db/postgre.ts b/src/db/postgre.ts index 881f1e4da3..c963242488 100644 --- a/src/db/postgre.ts +++ b/src/db/postgre.ts @@ -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); diff --git a/src/db/redis.ts b/src/db/redis.ts index 97500e02b3..7e0ee1e3ce 100644 --- a/src/db/redis.ts +++ b/src/db/redis.ts @@ -1,5 +1,5 @@ import * as redis from 'redis'; -import config from '@/config/index.js'; +import config from '@/config/index'; export function createConnection() { return redis.createClient( diff --git a/src/index.ts b/src/index.ts index 7c131b2618..db1b53f51b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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(); diff --git a/src/mfm/to-html.ts b/src/mfm/to-html.ts index 6ce7d35efa..6dbcc17d29 100644 --- a/src/mfm/to-html.ts +++ b/src/mfm/to-html.ts @@ -1,9 +1,9 @@ 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) { 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 { // 指定したユーザーの指定したノートのリノートがいくつあるか数える 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 { 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(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(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 = { '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'); diff --git a/src/models/entities/abuse-user-report.ts b/src/models/entities/abuse-user-report.ts index cb13921222..c0cff139f6 100644 --- a/src/models/entities/abuse-user-report.ts +++ b/src/models/entities/abuse-user-report.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class AbuseUserReport { diff --git a/src/models/entities/access-token.ts b/src/models/entities/access-token.ts index c2d034af87..5f41b3c1fc 100644 --- a/src/models/entities/access-token.ts +++ b/src/models/entities/access-token.ts @@ -1,7 +1,7 @@ import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm'; -import { User } from './user.js'; -import { App } from './app.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { App } from './app'; +import { id } from '../id'; @Entity() export class AccessToken { diff --git a/src/models/entities/ad.ts b/src/models/entities/ad.ts index 1b0cfa06d3..b2fc04c4f0 100644 --- a/src/models/entities/ad.ts +++ b/src/models/entities/ad.ts @@ -1,5 +1,5 @@ import { Entity, Index, Column, PrimaryColumn } from 'typeorm'; -import { id } from '../id.js'; +import { id } from '../id'; @Entity() export class Ad { diff --git a/src/models/entities/announcement-read.ts b/src/models/entities/announcement-read.ts index 56ee2e6905..892beb826f 100644 --- a/src/models/entities/announcement-read.ts +++ b/src/models/entities/announcement-read.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { Announcement } from './announcement.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { Announcement } from './announcement'; +import { id } from '../id'; @Entity() @Index(['userId', 'announcementId'], { unique: true }) diff --git a/src/models/entities/announcement.ts b/src/models/entities/announcement.ts index 1569ca89c7..06d379c229 100644 --- a/src/models/entities/announcement.ts +++ b/src/models/entities/announcement.ts @@ -1,5 +1,5 @@ import { Entity, Index, Column, PrimaryColumn } from 'typeorm'; -import { id } from '../id.js'; +import { id } from '../id'; @Entity() export class Announcement { diff --git a/src/models/entities/antenna-note.ts b/src/models/entities/antenna-note.ts index ecf2973919..9b911524ef 100644 --- a/src/models/entities/antenna-note.ts +++ b/src/models/entities/antenna-note.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm'; -import { Note } from './note.js'; -import { Antenna } from './antenna.js'; -import { id } from '../id.js'; +import { Note } from './note'; +import { Antenna } from './antenna'; +import { id } from '../id'; @Entity() @Index(['noteId', 'antennaId'], { unique: true }) diff --git a/src/models/entities/antenna.ts b/src/models/entities/antenna.ts index 5dc814e1d5..bcfe09a829 100644 --- a/src/models/entities/antenna.ts +++ b/src/models/entities/antenna.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { UserList } from './user-list.js'; -import { UserGroupJoining } from './user-group-joining.js'; +import { User } from './user'; +import { id } from '../id'; +import { UserList } from './user-list'; +import { UserGroupJoining } from './user-group-joining'; @Entity() export class Antenna { diff --git a/src/models/entities/app.ts b/src/models/entities/app.ts index c3a6a0a107..ea87546311 100644 --- a/src/models/entities/app.ts +++ b/src/models/entities/app.ts @@ -1,6 +1,6 @@ import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class App { diff --git a/src/models/entities/attestation-challenge.ts b/src/models/entities/attestation-challenge.ts index 26a212e0c6..942747c02f 100644 --- a/src/models/entities/attestation-challenge.ts +++ b/src/models/entities/attestation-challenge.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class AttestationChallenge { diff --git a/src/models/entities/auth-session.ts b/src/models/entities/auth-session.ts index f0480abcc6..4eec27e3f6 100644 --- a/src/models/entities/auth-session.ts +++ b/src/models/entities/auth-session.ts @@ -1,7 +1,7 @@ import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm'; -import { User } from './user.js'; -import { App } from './app.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { App } from './app'; +import { id } from '../id'; @Entity() export class AuthSession { diff --git a/src/models/entities/blocking.ts b/src/models/entities/blocking.ts index 2fff80cfc1..48487cb086 100644 --- a/src/models/entities/blocking.ts +++ b/src/models/entities/blocking.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() @Index(['blockerId', 'blockeeId'], { unique: true }) diff --git a/src/models/entities/channel-following.ts b/src/models/entities/channel-following.ts index 6e5c9cba04..fca801e5ab 100644 --- a/src/models/entities/channel-following.ts +++ b/src/models/entities/channel-following.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { Channel } from './channel.js'; +import { User } from './user'; +import { id } from '../id'; +import { Channel } from './channel'; @Entity() @Index(['followerId', 'followeeId'], { unique: true }) diff --git a/src/models/entities/channel-note-pining.ts b/src/models/entities/channel-note-pining.ts index 751af4a183..26a7eb501f 100644 --- a/src/models/entities/channel-note-pining.ts +++ b/src/models/entities/channel-note-pining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note.js'; -import { Channel } from './channel.js'; -import { id } from '../id.js'; +import { Note } from './note'; +import { Channel } from './channel'; +import { id } from '../id'; @Entity() @Index(['channelId', 'noteId'], { unique: true }) diff --git a/src/models/entities/channel.ts b/src/models/entities/channel.ts index adf937c0b4..f2d713612d 100644 --- a/src/models/entities/channel.ts +++ b/src/models/entities/channel.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { DriveFile } from './drive-file.js'; +import { User } from './user'; +import { id } from '../id'; +import { DriveFile } from './drive-file'; @Entity() export class Channel { diff --git a/src/models/entities/clip-note.ts b/src/models/entities/clip-note.ts index 41d92b0c74..7d96b2ef7a 100644 --- a/src/models/entities/clip-note.ts +++ b/src/models/entities/clip-note.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm'; -import { Note } from './note.js'; -import { Clip } from './clip.js'; -import { id } from '../id.js'; +import { Note } from './note'; +import { Clip } from './clip'; +import { id } from '../id'; @Entity() @Index(['noteId', 'clipId'], { unique: true }) diff --git a/src/models/entities/clip.ts b/src/models/entities/clip.ts index 1cdf4c52eb..66b5b8847e 100644 --- a/src/models/entities/clip.ts +++ b/src/models/entities/clip.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class Clip { diff --git a/src/models/entities/drive-file.ts b/src/models/entities/drive-file.ts index 41d68a1334..698dfac222 100644 --- a/src/models/entities/drive-file.ts +++ b/src/models/entities/drive-file.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { DriveFolder } from './drive-folder.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { DriveFolder } from './drive-folder'; +import { id } from '../id'; @Entity() @Index(['userId', 'folderId', 'id']) diff --git a/src/models/entities/drive-folder.ts b/src/models/entities/drive-folder.ts index f137dd5c6a..a80d075855 100644 --- a/src/models/entities/drive-folder.ts +++ b/src/models/entities/drive-folder.ts @@ -1,6 +1,6 @@ import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class DriveFolder { diff --git a/src/models/entities/emoji.ts b/src/models/entities/emoji.ts index 3da4c6b416..d6080ae099 100644 --- a/src/models/entities/emoji.ts +++ b/src/models/entities/emoji.ts @@ -1,5 +1,5 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; -import { id } from '../id.js'; +import { id } from '../id'; @Entity() @Index(['name', 'host'], { unique: true }) diff --git a/src/models/entities/follow-request.ts b/src/models/entities/follow-request.ts index e661c9933a..22ec263962 100644 --- a/src/models/entities/follow-request.ts +++ b/src/models/entities/follow-request.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() @Index(['followerId', 'followeeId'], { unique: true }) diff --git a/src/models/entities/following.ts b/src/models/entities/following.ts index 5f9b548dab..ee3286a1a1 100644 --- a/src/models/entities/following.ts +++ b/src/models/entities/following.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() @Index(['followerId', 'followeeId'], { unique: true }) diff --git a/src/models/entities/gallery-like.ts b/src/models/entities/gallery-like.ts index f1610b8aae..7d084a2275 100644 --- a/src/models/entities/gallery-like.ts +++ b/src/models/entities/gallery-like.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { GalleryPost } from './gallery-post.js'; +import { User } from './user'; +import { id } from '../id'; +import { GalleryPost } from './gallery-post'; @Entity() @Index(['userId', 'postId'], { unique: true }) diff --git a/src/models/entities/gallery-post.ts b/src/models/entities/gallery-post.ts index cc4ed640a4..f59cd671f3 100644 --- a/src/models/entities/gallery-post.ts +++ b/src/models/entities/gallery-post.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { DriveFile } from './drive-file.js'; +import { User } from './user'; +import { id } from '../id'; +import { DriveFile } from './drive-file'; @Entity() export class GalleryPost { diff --git a/src/models/entities/games/reversi/game.ts b/src/models/entities/games/reversi/game.ts index b63c72e9fb..9deacaf5c6 100644 --- a/src/models/entities/games/reversi/game.ts +++ b/src/models/entities/games/reversi/game.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from '../../user.js'; -import { id } from '../../../id.js'; +import { User } from '../../user'; +import { id } from '../../../id'; @Entity() export class ReversiGame { diff --git a/src/models/entities/games/reversi/matching.ts b/src/models/entities/games/reversi/matching.ts index 690a080b2b..477a29316e 100644 --- a/src/models/entities/games/reversi/matching.ts +++ b/src/models/entities/games/reversi/matching.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from '../../user.js'; -import { id } from '../../../id.js'; +import { User } from '../../user'; +import { id } from '../../../id'; @Entity() export class ReversiMatching { diff --git a/src/models/entities/hashtag.ts b/src/models/entities/hashtag.ts index b99ac80b58..842cdaa562 100644 --- a/src/models/entities/hashtag.ts +++ b/src/models/entities/hashtag.ts @@ -1,6 +1,6 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class Hashtag { diff --git a/src/models/entities/instance.ts b/src/models/entities/instance.ts index f4637096fa..7c8719e06a 100644 --- a/src/models/entities/instance.ts +++ b/src/models/entities/instance.ts @@ -1,5 +1,5 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { id } from '../id.js'; +import { id } from '../id'; @Entity() export class Instance { diff --git a/src/models/entities/log.ts b/src/models/entities/log.ts index 17c5cba7d6..182a9fbed8 100644 --- a/src/models/entities/log.ts +++ b/src/models/entities/log.ts @@ -1,5 +1,5 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; -import { id } from '../id.js'; +import { id } from '../id'; @Entity() export class Log { diff --git a/src/models/entities/messaging-message.ts b/src/models/entities/messaging-message.ts index 04a1637f44..ac0764674c 100644 --- a/src/models/entities/messaging-message.ts +++ b/src/models/entities/messaging-message.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { DriveFile } from './drive-file.js'; -import { id } from '../id.js'; -import { UserGroup } from './user-group.js'; +import { User } from './user'; +import { DriveFile } from './drive-file'; +import { id } from '../id'; +import { UserGroup } from './user-group'; @Entity() export class MessagingMessage { diff --git a/src/models/entities/meta.ts b/src/models/entities/meta.ts index a03891622d..2a0632c87c 100644 --- a/src/models/entities/meta.ts +++ b/src/models/entities/meta.ts @@ -1,7 +1,7 @@ import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { Clip } from './clip.js'; +import { User } from './user'; +import { id } from '../id'; +import { Clip } from './clip'; @Entity() export class Meta { diff --git a/src/models/entities/moderation-log.ts b/src/models/entities/moderation-log.ts index d96b63f523..33d3d683ae 100644 --- a/src/models/entities/moderation-log.ts +++ b/src/models/entities/moderation-log.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class ModerationLog { diff --git a/src/models/entities/muted-note.ts b/src/models/entities/muted-note.ts index 07763b2dbf..521876688c 100644 --- a/src/models/entities/muted-note.ts +++ b/src/models/entities/muted-note.ts @@ -1,8 +1,8 @@ import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm'; -import { Note } from './note.js'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { mutedNoteReasons } from '../../types.js'; +import { Note } from './note'; +import { User } from './user'; +import { id } from '../id'; +import { mutedNoteReasons } from '../../types'; @Entity() @Index(['noteId', 'userId'], { unique: true }) diff --git a/src/models/entities/muting.ts b/src/models/entities/muting.ts index 9c9134949f..0084213bcc 100644 --- a/src/models/entities/muting.ts +++ b/src/models/entities/muting.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() @Index(['muterId', 'muteeId'], { unique: true }) diff --git a/src/models/entities/note-favorite.ts b/src/models/entities/note-favorite.ts index 54792d225b..0713c3ae56 100644 --- a/src/models/entities/note-favorite.ts +++ b/src/models/entities/note-favorite.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note.js'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { Note } from './note'; +import { User } from './user'; +import { id } from '../id'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note-reaction.ts b/src/models/entities/note-reaction.ts index 5bca5c3d36..674dc3639e 100644 --- a/src/models/entities/note-reaction.ts +++ b/src/models/entities/note-reaction.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { Note } from './note.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { Note } from './note'; +import { id } from '../id'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note-unread.ts b/src/models/entities/note-unread.ts index 5a88c7f7d5..57dda4fafd 100644 --- a/src/models/entities/note-unread.ts +++ b/src/models/entities/note-unread.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { Note } from './note.js'; -import { id } from '../id.js'; -import { Channel } from './channel.js'; +import { User } from './user'; +import { Note } from './note'; +import { id } from '../id'; +import { Channel } from './channel'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note-watching.ts b/src/models/entities/note-watching.ts index 458fac3a40..741a1c0c8b 100644 --- a/src/models/entities/note-watching.ts +++ b/src/models/entities/note-watching.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { Note } from './note.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { Note } from './note'; +import { id } from '../id'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/note.ts b/src/models/entities/note.ts index 74d69de13c..9a85532637 100644 --- a/src/models/entities/note.ts +++ b/src/models/entities/note.ts @@ -1,9 +1,9 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { DriveFile } from './drive-file.js'; -import { id } from '../id.js'; -import { noteVisibilities } from '../../types.js'; -import { Channel } from './channel.js'; +import { User } from './user'; +import { DriveFile } from './drive-file'; +import { id } from '../id'; +import { noteVisibilities } from '../../types'; +import { Channel } from './channel'; @Entity() @Index('IDX_NOTE_TAGS', { synchronize: false }) diff --git a/src/models/entities/notification.ts b/src/models/entities/notification.ts index 1114910a80..988fdb341f 100644 --- a/src/models/entities/notification.ts +++ b/src/models/entities/notification.ts @@ -1,11 +1,11 @@ import { Entity, Index, JoinColumn, ManyToOne, Column, PrimaryColumn } from 'typeorm'; -import { User } from './user.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 { notificationTypes } from '../../types.js'; +import { User } from './user'; +import { id } from '../id'; +import { Note } from './note'; +import { FollowRequest } from './follow-request'; +import { UserGroupInvitation } from './user-group-invitation'; +import { AccessToken } from './access-token'; +import { notificationTypes } from '../../types'; @Entity() export class Notification { diff --git a/src/models/entities/page-like.ts b/src/models/entities/page-like.ts index 49f3f0ef52..ca84ece8fd 100644 --- a/src/models/entities/page-like.ts +++ b/src/models/entities/page-like.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { Page } from './page.js'; +import { User } from './user'; +import { id } from '../id'; +import { Page } from './page'; @Entity() @Index(['userId', 'pageId'], { unique: true }) diff --git a/src/models/entities/page.ts b/src/models/entities/page.ts index 7bc35aa69a..ed0411a3d0 100644 --- a/src/models/entities/page.ts +++ b/src/models/entities/page.ts @@ -1,7 +1,7 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; -import { DriveFile } from './drive-file.js'; +import { User } from './user'; +import { id } from '../id'; +import { DriveFile } from './drive-file'; @Entity() @Index(['userId', 'name'], { unique: true }) diff --git a/src/models/entities/password-reset-request.ts b/src/models/entities/password-reset-request.ts index 95ba14db18..6d41d38a93 100644 --- a/src/models/entities/password-reset-request.ts +++ b/src/models/entities/password-reset-request.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typeorm'; -import { id } from '../id.js'; -import { User } from './user.js'; +import { id } from '../id'; +import { User } from './user'; @Entity() export class PasswordResetRequest { diff --git a/src/models/entities/poll-vote.ts b/src/models/entities/poll-vote.ts index f8b5ad7d81..709376f909 100644 --- a/src/models/entities/poll-vote.ts +++ b/src/models/entities/poll-vote.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { Note } from './note.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { Note } from './note'; +import { id } from '../id'; @Entity() @Index(['userId', 'noteId', 'choice'], { unique: true }) diff --git a/src/models/entities/poll.ts b/src/models/entities/poll.ts index a201b1198b..e3bbb1c3f2 100644 --- a/src/models/entities/poll.ts +++ b/src/models/entities/poll.ts @@ -1,8 +1,8 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm'; -import { id } from '../id.js'; -import { Note } from './note.js'; -import { User } from './user.js'; -import { noteVisibilities } from '../../types.js'; +import { id } from '../id'; +import { Note } from './note'; +import { User } from './user'; +import { noteVisibilities } from '../../types'; @Entity() export class Poll { diff --git a/src/models/entities/promo-note.ts b/src/models/entities/promo-note.ts index d21b2adac3..474f1cb235 100644 --- a/src/models/entities/promo-note.ts +++ b/src/models/entities/promo-note.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm'; -import { Note } from './note.js'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { Note } from './note'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class PromoNote { diff --git a/src/models/entities/promo-read.ts b/src/models/entities/promo-read.ts index d949061b99..2e0977b6b5 100644 --- a/src/models/entities/promo-read.ts +++ b/src/models/entities/promo-read.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note.js'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { Note } from './note'; +import { User } from './user'; +import { id } from '../id'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/registration-tickets.ts b/src/models/entities/registration-tickets.ts index 139e40f85e..d962f78a78 100644 --- a/src/models/entities/registration-tickets.ts +++ b/src/models/entities/registration-tickets.ts @@ -1,5 +1,5 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; -import { id } from '../id.js'; +import { id } from '../id'; @Entity() export class RegistrationTicket { diff --git a/src/models/entities/registry-item.ts b/src/models/entities/registry-item.ts index f1904e6120..54d2ef2082 100644 --- a/src/models/entities/registry-item.ts +++ b/src/models/entities/registry-item.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; // TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい @Entity() diff --git a/src/models/entities/relay.ts b/src/models/entities/relay.ts index 94d1929574..4c82ccb125 100644 --- a/src/models/entities/relay.ts +++ b/src/models/entities/relay.ts @@ -1,5 +1,5 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; -import { id } from '../id.js'; +import { id } from '../id'; @Entity() export class Relay { diff --git a/src/models/entities/signin.ts b/src/models/entities/signin.ts index 1db5c48ca1..7e047084b1 100644 --- a/src/models/entities/signin.ts +++ b/src/models/entities/signin.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class Signin { diff --git a/src/models/entities/sw-subscription.ts b/src/models/entities/sw-subscription.ts index 254dd70b4f..7c3f6f0a6c 100644 --- a/src/models/entities/sw-subscription.ts +++ b/src/models/entities/sw-subscription.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class SwSubscription { diff --git a/src/models/entities/user-group-invitation.ts b/src/models/entities/user-group-invitation.ts index 9e71c78e1d..6fe8f20134 100644 --- a/src/models/entities/user-group-invitation.ts +++ b/src/models/entities/user-group-invitation.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { UserGroup } from './user-group.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { UserGroup } from './user-group'; +import { id } from '../id'; @Entity() @Index(['userId', 'userGroupId'], { unique: true }) diff --git a/src/models/entities/user-group-joining.ts b/src/models/entities/user-group-joining.ts index fbed44c79f..e09c3230f1 100644 --- a/src/models/entities/user-group-joining.ts +++ b/src/models/entities/user-group-joining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { UserGroup } from './user-group.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { UserGroup } from './user-group'; +import { id } from '../id'; @Entity() @Index(['userId', 'userGroupId'], { unique: true }) diff --git a/src/models/entities/user-group.ts b/src/models/entities/user-group.ts index ae4cd5485f..f4bac03223 100644 --- a/src/models/entities/user-group.ts +++ b/src/models/entities/user-group.ts @@ -1,6 +1,6 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class UserGroup { diff --git a/src/models/entities/user-keypair.ts b/src/models/entities/user-keypair.ts index 026f823f7b..603321d758 100644 --- a/src/models/entities/user-keypair.ts +++ b/src/models/entities/user-keypair.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class UserKeypair { diff --git a/src/models/entities/user-list-joining.ts b/src/models/entities/user-list-joining.ts index 91cff3cd54..bb7dc40b95 100644 --- a/src/models/entities/user-list-joining.ts +++ b/src/models/entities/user-list-joining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { UserList } from './user-list.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { UserList } from './user-list'; +import { id } from '../id'; @Entity() @Index(['userId', 'userListId'], { unique: true }) diff --git a/src/models/entities/user-list.ts b/src/models/entities/user-list.ts index 51031e3c1f..35a83ef8c3 100644 --- a/src/models/entities/user-list.ts +++ b/src/models/entities/user-list.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class UserList { diff --git a/src/models/entities/user-note-pining.ts b/src/models/entities/user-note-pining.ts index 0495c4b2f5..04a6f8f645 100644 --- a/src/models/entities/user-note-pining.ts +++ b/src/models/entities/user-note-pining.ts @@ -1,7 +1,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm'; -import { Note } from './note.js'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { Note } from './note'; +import { User } from './user'; +import { id } from '../id'; @Entity() @Index(['userId', 'noteId'], { unique: true }) diff --git a/src/models/entities/user-profile.ts b/src/models/entities/user-profile.ts index fd05522797..3a9043fac6 100644 --- a/src/models/entities/user-profile.ts +++ b/src/models/entities/user-profile.ts @@ -1,8 +1,8 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm'; -import { id } from '../id.js'; -import { User } from './user.js'; -import { Page } from './page.js'; -import { notificationTypes } from '../../types.js'; +import { id } from '../id'; +import { User } from './user'; +import { Page } from './page'; +import { notificationTypes } from '../../types'; // TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも // ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン diff --git a/src/models/entities/user-publickey.ts b/src/models/entities/user-publickey.ts index adfff74f8a..21edc3e9e2 100644 --- a/src/models/entities/user-publickey.ts +++ b/src/models/entities/user-publickey.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class UserPublickey { diff --git a/src/models/entities/user-security-key.ts b/src/models/entities/user-security-key.ts index ec8ac81c47..d54c728e53 100644 --- a/src/models/entities/user-security-key.ts +++ b/src/models/entities/user-security-key.ts @@ -1,6 +1,6 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm'; -import { User } from './user.js'; -import { id } from '../id.js'; +import { User } from './user'; +import { id } from '../id'; @Entity() export class UserSecurityKey { diff --git a/src/models/entities/user.ts b/src/models/entities/user.ts index 36c5068205..060ec06b9a 100644 --- a/src/models/entities/user.ts +++ b/src/models/entities/user.ts @@ -1,6 +1,6 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm'; -import { DriveFile } from './drive-file.js'; -import { id } from '../id.js'; +import { DriveFile } from './drive-file'; +import { id } from '../id'; @Entity() @Index(['usernameLower', 'host'], { unique: true }) diff --git a/src/models/index.ts b/src/models/index.ts index 51ee88bb7f..9f8bd104e9 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,67 +1,67 @@ import { getRepository, getCustomRepository } from 'typeorm'; -import { Announcement } from './entities/announcement.js'; -import { AnnouncementRead } from './entities/announcement-read.js'; -import { Instance } from './entities/instance.js'; -import { Poll } from './entities/poll.js'; -import { PollVote } from './entities/poll-vote.js'; -import { Meta } from './entities/meta.js'; -import { SwSubscription } from './entities/sw-subscription.js'; -import { NoteWatching } from './entities/note-watching.js'; -import { NoteUnread } from './entities/note-unread.js'; -import { RegistrationTicket } from './entities/registration-tickets.js'; -import { UserRepository } from './repositories/user.js'; -import { NoteRepository } from './repositories/note.js'; -import { DriveFileRepository } from './repositories/drive-file.js'; -import { DriveFolderRepository } from './repositories/drive-folder.js'; -import { Log } from './entities/log.js'; -import { AccessToken } from './entities/access-token.js'; -import { UserNotePining } from './entities/user-note-pining.js'; -import { SigninRepository } from './repositories/signin.js'; -import { MessagingMessageRepository } from './repositories/messaging-message.js'; -import { ReversiGameRepository } from './repositories/games/reversi/game.js'; -import { UserListRepository } from './repositories/user-list.js'; -import { UserListJoining } from './entities/user-list-joining.js'; -import { UserGroupRepository } from './repositories/user-group.js'; -import { UserGroupJoining } from './entities/user-group-joining.js'; -import { UserGroupInvitationRepository } from './repositories/user-group-invitation.js'; -import { FollowRequestRepository } from './repositories/follow-request.js'; -import { MutingRepository } from './repositories/muting.js'; -import { BlockingRepository } from './repositories/blocking.js'; -import { NoteReactionRepository } from './repositories/note-reaction.js'; -import { NotificationRepository } from './repositories/notification.js'; -import { NoteFavoriteRepository } from './repositories/note-favorite.js'; -import { ReversiMatchingRepository } from './repositories/games/reversi/matching.js'; -import { UserPublickey } from './entities/user-publickey.js'; -import { UserKeypair } from './entities/user-keypair.js'; -import { AppRepository } from './repositories/app.js'; -import { FollowingRepository } from './repositories/following.js'; -import { AbuseUserReportRepository } from './repositories/abuse-user-report.js'; -import { AuthSessionRepository } from './repositories/auth-session.js'; -import { UserProfile } from './entities/user-profile.js'; -import { AttestationChallenge } from './entities/attestation-challenge.js'; -import { UserSecurityKey } from './entities/user-security-key.js'; -import { HashtagRepository } from './repositories/hashtag.js'; -import { PageRepository } from './repositories/page.js'; -import { PageLikeRepository } from './repositories/page-like.js'; -import { GalleryPostRepository } from './repositories/gallery-post.js'; -import { GalleryLikeRepository } from './repositories/gallery-like.js'; -import { ModerationLogRepository } from './repositories/moderation-logs.js'; -import { UsedUsername } from './entities/used-username.js'; -import { ClipRepository } from './repositories/clip.js'; -import { ClipNote } from './entities/clip-note.js'; -import { AntennaRepository } from './repositories/antenna.js'; -import { AntennaNote } from './entities/antenna-note.js'; -import { PromoNote } from './entities/promo-note.js'; -import { PromoRead } from './entities/promo-read.js'; -import { EmojiRepository } from './repositories/emoji.js'; -import { RelayRepository } from './repositories/relay.js'; -import { ChannelRepository } from './repositories/channel.js'; -import { MutedNote } from './entities/muted-note.js'; -import { ChannelFollowing } from './entities/channel-following.js'; -import { ChannelNotePining } from './entities/channel-note-pining.js'; -import { RegistryItem } from './entities/registry-item.js'; -import { Ad } from './entities/ad.js'; -import { PasswordResetRequest } from './entities/password-reset-request.js'; +import { Announcement } from './entities/announcement'; +import { AnnouncementRead } from './entities/announcement-read'; +import { Instance } from './entities/instance'; +import { Poll } from './entities/poll'; +import { PollVote } from './entities/poll-vote'; +import { Meta } from './entities/meta'; +import { SwSubscription } from './entities/sw-subscription'; +import { NoteWatching } from './entities/note-watching'; +import { NoteUnread } from './entities/note-unread'; +import { RegistrationTicket } from './entities/registration-tickets'; +import { UserRepository } from './repositories/user'; +import { NoteRepository } from './repositories/note'; +import { DriveFileRepository } from './repositories/drive-file'; +import { DriveFolderRepository } from './repositories/drive-folder'; +import { Log } from './entities/log'; +import { AccessToken } from './entities/access-token'; +import { UserNotePining } from './entities/user-note-pining'; +import { SigninRepository } from './repositories/signin'; +import { MessagingMessageRepository } from './repositories/messaging-message'; +import { ReversiGameRepository } from './repositories/games/reversi/game'; +import { UserListRepository } from './repositories/user-list'; +import { UserListJoining } from './entities/user-list-joining'; +import { UserGroupRepository } from './repositories/user-group'; +import { UserGroupJoining } from './entities/user-group-joining'; +import { UserGroupInvitationRepository } from './repositories/user-group-invitation'; +import { FollowRequestRepository } from './repositories/follow-request'; +import { MutingRepository } from './repositories/muting'; +import { BlockingRepository } from './repositories/blocking'; +import { NoteReactionRepository } from './repositories/note-reaction'; +import { NotificationRepository } from './repositories/notification'; +import { NoteFavoriteRepository } from './repositories/note-favorite'; +import { ReversiMatchingRepository } from './repositories/games/reversi/matching'; +import { UserPublickey } from './entities/user-publickey'; +import { UserKeypair } from './entities/user-keypair'; +import { AppRepository } from './repositories/app'; +import { FollowingRepository } from './repositories/following'; +import { AbuseUserReportRepository } from './repositories/abuse-user-report'; +import { AuthSessionRepository } from './repositories/auth-session'; +import { UserProfile } from './entities/user-profile'; +import { AttestationChallenge } from './entities/attestation-challenge'; +import { UserSecurityKey } from './entities/user-security-key'; +import { HashtagRepository } from './repositories/hashtag'; +import { PageRepository } from './repositories/page'; +import { PageLikeRepository } from './repositories/page-like'; +import { GalleryPostRepository } from './repositories/gallery-post'; +import { GalleryLikeRepository } from './repositories/gallery-like'; +import { ModerationLogRepository } from './repositories/moderation-logs'; +import { UsedUsername } from './entities/used-username'; +import { ClipRepository } from './repositories/clip'; +import { ClipNote } from './entities/clip-note'; +import { AntennaRepository } from './repositories/antenna'; +import { AntennaNote } from './entities/antenna-note'; +import { PromoNote } from './entities/promo-note'; +import { PromoRead } from './entities/promo-read'; +import { EmojiRepository } from './repositories/emoji'; +import { RelayRepository } from './repositories/relay'; +import { ChannelRepository } from './repositories/channel'; +import { MutedNote } from './entities/muted-note'; +import { ChannelFollowing } from './entities/channel-following'; +import { ChannelNotePining } from './entities/channel-note-pining'; +import { RegistryItem } from './entities/registry-item'; +import { Ad } from './entities/ad'; +import { PasswordResetRequest } from './entities/password-reset-request'; export const Announcements = getRepository(Announcement); export const AnnouncementReads = getRepository(AnnouncementRead); diff --git a/src/models/repositories/abuse-user-report.ts b/src/models/repositories/abuse-user-report.ts index 16a121576f..a8c6344966 100644 --- a/src/models/repositories/abuse-user-report.ts +++ b/src/models/repositories/abuse-user-report.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '../index.js'; -import { AbuseUserReport } from '../entities/abuse-user-report.js'; -import { awaitAll } from '../../prelude/await-all.js'; +import { Users } from '../index'; +import { AbuseUserReport } from '../entities/abuse-user-report'; +import { awaitAll } from '../../prelude/await-all'; @EntityRepository(AbuseUserReport) export class AbuseUserReportRepository extends Repository { diff --git a/src/models/repositories/antenna.ts b/src/models/repositories/antenna.ts index 5117bcb033..afda5ccaaa 100644 --- a/src/models/repositories/antenna.ts +++ b/src/models/repositories/antenna.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Antenna } from '../entities/antenna.js'; -import { SchemaType } from '@/misc/schema.js'; -import { AntennaNotes, UserGroupJoinings } from '../index.js'; +import { Antenna } from '../entities/antenna'; +import { SchemaType } from '@/misc/schema'; +import { AntennaNotes, UserGroupJoinings } from '../index'; export type PackedAntenna = SchemaType; diff --git a/src/models/repositories/app.ts b/src/models/repositories/app.ts index 3c96909ddd..698191de7e 100644 --- a/src/models/repositories/app.ts +++ b/src/models/repositories/app.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { App } from '../entities/app.js'; -import { AccessTokens } from '../index.js'; -import { SchemaType } from '@/misc/schema.js'; +import { App } from '../entities/app'; +import { AccessTokens } from '../index'; +import { SchemaType } from '@/misc/schema'; export type PackedApp = SchemaType; diff --git a/src/models/repositories/auth-session.ts b/src/models/repositories/auth-session.ts index 0eac1348c7..aa1cddebcf 100644 --- a/src/models/repositories/auth-session.ts +++ b/src/models/repositories/auth-session.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Apps } from '../index.js'; -import { AuthSession } from '../entities/auth-session.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { User } from '../entities/user.js'; +import { Apps } from '../index'; +import { AuthSession } from '../entities/auth-session'; +import { awaitAll } from '../../prelude/await-all'; +import { User } from '../entities/user'; @EntityRepository(AuthSession) export class AuthSessionRepository extends Repository { diff --git a/src/models/repositories/blocking.ts b/src/models/repositories/blocking.ts index 41b9ed5ab9..3349a54ae9 100644 --- a/src/models/repositories/blocking.ts +++ b/src/models/repositories/blocking.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '../index.js'; -import { Blocking } from '../entities/blocking.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { SchemaType } from '@/misc/schema.js'; -import { User } from '../entities/user.js'; +import { Users } from '../index'; +import { Blocking } from '../entities/blocking'; +import { awaitAll } from '../../prelude/await-all'; +import { SchemaType } from '@/misc/schema'; +import { User } from '../entities/user'; export type PackedBlocking = SchemaType; diff --git a/src/models/repositories/channel.ts b/src/models/repositories/channel.ts index c889fc164b..1b1a30e7a2 100644 --- a/src/models/repositories/channel.ts +++ b/src/models/repositories/channel.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Channel } from '../entities/channel.js'; -import { SchemaType } from '@/misc/schema.js'; -import { DriveFiles, ChannelFollowings, NoteUnreads } from '../index.js'; -import { User } from '../entities/user.js'; +import { Channel } from '../entities/channel'; +import { SchemaType } from '@/misc/schema'; +import { DriveFiles, ChannelFollowings, NoteUnreads } from '../index'; +import { User } from '../entities/user'; export type PackedChannel = SchemaType; diff --git a/src/models/repositories/clip.ts b/src/models/repositories/clip.ts index 3fae8a7aee..608101d34b 100644 --- a/src/models/repositories/clip.ts +++ b/src/models/repositories/clip.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Clip } from '../entities/clip.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Users } from '../index.js'; -import { awaitAll } from '../../prelude/await-all.js'; +import { Clip } from '../entities/clip'; +import { SchemaType } from '@/misc/schema'; +import { Users } from '../index'; +import { awaitAll } from '../../prelude/await-all'; export type PackedClip = SchemaType; diff --git a/src/models/repositories/drive-file.ts b/src/models/repositories/drive-file.ts index 3edd9dd66a..eecb477ac0 100644 --- a/src/models/repositories/drive-file.ts +++ b/src/models/repositories/drive-file.ts @@ -1,14 +1,14 @@ import { EntityRepository, Repository } from 'typeorm'; -import { DriveFile } from '../entities/drive-file.js'; -import { Users, DriveFolders } from '../index.js'; -import { User } from '../entities/user.js'; -import { toPuny } from '@/misc/convert-host.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { SchemaType } from '@/misc/schema.js'; -import config from '@/config/index.js'; -import { query, appendQuery } from '../../prelude/url.js'; -import { Meta } from '../entities/meta.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; +import { DriveFile } from '../entities/drive-file'; +import { Users, DriveFolders } from '../index'; +import { User } from '../entities/user'; +import { toPuny } from '@/misc/convert-host'; +import { awaitAll } from '../../prelude/await-all'; +import { SchemaType } from '@/misc/schema'; +import config from '@/config/index'; +import { query, appendQuery } from '../../prelude/url'; +import { Meta } from '../entities/meta'; +import { fetchMeta } from '@/misc/fetch-meta'; export type PackedDriveFile = SchemaType; diff --git a/src/models/repositories/drive-folder.ts b/src/models/repositories/drive-folder.ts index e78c50149c..de286ba218 100644 --- a/src/models/repositories/drive-folder.ts +++ b/src/models/repositories/drive-folder.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { DriveFolders, DriveFiles } from '../index.js'; -import { DriveFolder } from '../entities/drive-folder.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { SchemaType } from '@/misc/schema.js'; +import { DriveFolders, DriveFiles } from '../index'; +import { DriveFolder } from '../entities/drive-folder'; +import { awaitAll } from '../../prelude/await-all'; +import { SchemaType } from '@/misc/schema'; export type PackedDriveFolder = SchemaType; diff --git a/src/models/repositories/emoji.ts b/src/models/repositories/emoji.ts index ecef68325a..3490a6ac86 100644 --- a/src/models/repositories/emoji.ts +++ b/src/models/repositories/emoji.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Emoji } from '../entities/emoji.js'; +import { Emoji } from '../entities/emoji'; @EntityRepository(Emoji) export class EmojiRepository extends Repository { diff --git a/src/models/repositories/federation-instance.ts b/src/models/repositories/federation-instance.ts index ad14cfc962..4b70971ecf 100644 --- a/src/models/repositories/federation-instance.ts +++ b/src/models/repositories/federation-instance.ts @@ -1,4 +1,4 @@ -import config from '@/config/index.js'; +import config from '@/config/index'; export const packedFederationInstanceSchema = { type: 'object' as const, diff --git a/src/models/repositories/follow-request.ts b/src/models/repositories/follow-request.ts index 6fe86972e5..253e03ca7b 100644 --- a/src/models/repositories/follow-request.ts +++ b/src/models/repositories/follow-request.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { FollowRequest } from '../entities/follow-request.js'; -import { Users } from '../index.js'; -import { User } from '../entities/user.js'; +import { FollowRequest } from '../entities/follow-request'; +import { Users } from '../index'; +import { User } from '../entities/user'; @EntityRepository(FollowRequest) export class FollowRequestRepository extends Repository { diff --git a/src/models/repositories/following.ts b/src/models/repositories/following.ts index 0cc3626c26..dbbb0e6c75 100644 --- a/src/models/repositories/following.ts +++ b/src/models/repositories/following.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '../index.js'; -import { Following } from '../entities/following.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { SchemaType } from '@/misc/schema.js'; -import { User } from '../entities/user.js'; +import { Users } from '../index'; +import { Following } from '../entities/following'; +import { awaitAll } from '../../prelude/await-all'; +import { SchemaType } from '@/misc/schema'; +import { User } from '../entities/user'; type LocalFollowerFollowing = Following & { followerHost: null; diff --git a/src/models/repositories/gallery-like.ts b/src/models/repositories/gallery-like.ts index 550405d659..d0de01d8fd 100644 --- a/src/models/repositories/gallery-like.ts +++ b/src/models/repositories/gallery-like.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm'; -import { GalleryLike } from '../entities/gallery-like.js'; -import { GalleryPosts } from '../index.js'; +import { GalleryLike } from '../entities/gallery-like'; +import { GalleryPosts } from '../index'; @EntityRepository(GalleryLike) export class GalleryLikeRepository extends Repository { diff --git a/src/models/repositories/gallery-post.ts b/src/models/repositories/gallery-post.ts index b2c989481a..fe44d7c93e 100644 --- a/src/models/repositories/gallery-post.ts +++ b/src/models/repositories/gallery-post.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { GalleryPost } from '../entities/gallery-post.js'; -import { SchemaType } from '../../misc/schema.js'; -import { Users, DriveFiles, GalleryLikes } from '../index.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { User } from '../entities/user.js'; +import { GalleryPost } from '../entities/gallery-post'; +import { SchemaType } from '../../misc/schema'; +import { Users, DriveFiles, GalleryLikes } from '../index'; +import { awaitAll } from '../../prelude/await-all'; +import { User } from '../entities/user'; export type PackedGalleryPost = SchemaType; diff --git a/src/models/repositories/games/reversi/game.ts b/src/models/repositories/games/reversi/game.ts index 0a1d67f960..021eba1da3 100644 --- a/src/models/repositories/games/reversi/game.ts +++ b/src/models/repositories/games/reversi/game.ts @@ -1,7 +1,7 @@ -import { User } from '@/models/entities/user.js'; +import { User } from '@/models/entities/user'; import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '../../../index.js'; -import { ReversiGame } from '../../../entities/games/reversi/game.js'; +import { Users } from '../../../index'; +import { ReversiGame } from '../../../entities/games/reversi/game'; @EntityRepository(ReversiGame) export class ReversiGameRepository extends Repository { diff --git a/src/models/repositories/games/reversi/matching.ts b/src/models/repositories/games/reversi/matching.ts index 942194410b..f8ee646cb7 100644 --- a/src/models/repositories/games/reversi/matching.ts +++ b/src/models/repositories/games/reversi/matching.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { ReversiMatching } from '../../../entities/games/reversi/matching.js'; -import { Users } from '../../../index.js'; -import { awaitAll } from '../../../../prelude/await-all.js'; -import { User } from '@/models/entities/user.js'; +import { ReversiMatching } from '../../../entities/games/reversi/matching'; +import { Users } from '../../../index'; +import { awaitAll } from '../../../../prelude/await-all'; +import { User } from '@/models/entities/user'; @EntityRepository(ReversiMatching) export class ReversiMatchingRepository extends Repository { diff --git a/src/models/repositories/hashtag.ts b/src/models/repositories/hashtag.ts index f16e2dcd86..3fee2f771d 100644 --- a/src/models/repositories/hashtag.ts +++ b/src/models/repositories/hashtag.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Hashtag } from '../entities/hashtag.js'; -import { SchemaType } from '@/misc/schema.js'; +import { Hashtag } from '../entities/hashtag'; +import { SchemaType } from '@/misc/schema'; export type PackedHashtag = SchemaType; diff --git a/src/models/repositories/messaging-message.ts b/src/models/repositories/messaging-message.ts index 1413105c55..47f6d4227a 100644 --- a/src/models/repositories/messaging-message.ts +++ b/src/models/repositories/messaging-message.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { MessagingMessage } from '../entities/messaging-message.js'; -import { Users, DriveFiles, UserGroups } from '../index.js'; -import { SchemaType } from '@/misc/schema.js'; -import { User } from '../entities/user.js'; +import { MessagingMessage } from '../entities/messaging-message'; +import { Users, DriveFiles, UserGroups } from '../index'; +import { SchemaType } from '@/misc/schema'; +import { User } from '../entities/user'; export type PackedMessagingMessage = SchemaType; diff --git a/src/models/repositories/moderation-logs.ts b/src/models/repositories/moderation-logs.ts index ea074a4532..4e9ef1b31b 100644 --- a/src/models/repositories/moderation-logs.ts +++ b/src/models/repositories/moderation-logs.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '../index.js'; -import { ModerationLog } from '../entities/moderation-log.js'; -import { awaitAll } from '../../prelude/await-all.js'; +import { Users } from '../index'; +import { ModerationLog } from '../entities/moderation-log'; +import { awaitAll } from '../../prelude/await-all'; @EntityRepository(ModerationLog) export class ModerationLogRepository extends Repository { diff --git a/src/models/repositories/muting.ts b/src/models/repositories/muting.ts index 78dfa29215..806a7accd2 100644 --- a/src/models/repositories/muting.ts +++ b/src/models/repositories/muting.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Users } from '../index.js'; -import { Muting } from '../entities/muting.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { SchemaType } from '@/misc/schema.js'; -import { User } from '../entities/user.js'; +import { Users } from '../index'; +import { Muting } from '../entities/muting'; +import { awaitAll } from '../../prelude/await-all'; +import { SchemaType } from '@/misc/schema'; +import { User } from '../entities/user'; export type PackedMuting = SchemaType; diff --git a/src/models/repositories/note-favorite.ts b/src/models/repositories/note-favorite.ts index a192bbbc07..624e125ddf 100644 --- a/src/models/repositories/note-favorite.ts +++ b/src/models/repositories/note-favorite.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { NoteFavorite } from '../entities/note-favorite.js'; -import { Notes } from '../index.js'; -import { User } from '../entities/user.js'; +import { NoteFavorite } from '../entities/note-favorite'; +import { Notes } from '../index'; +import { User } from '../entities/user'; @EntityRepository(NoteFavorite) export class NoteFavoriteRepository extends Repository { diff --git a/src/models/repositories/note-reaction.ts b/src/models/repositories/note-reaction.ts index 6c72008d24..6671b0cd75 100644 --- a/src/models/repositories/note-reaction.ts +++ b/src/models/repositories/note-reaction.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { NoteReaction } from '../entities/note-reaction.js'; -import { Users } from '../index.js'; -import { SchemaType } from '@/misc/schema.js'; -import { convertLegacyReaction } from '@/misc/reaction-lib.js'; -import { User } from '../entities/user.js'; +import { NoteReaction } from '../entities/note-reaction'; +import { Users } from '../index'; +import { SchemaType } from '@/misc/schema'; +import { convertLegacyReaction } from '@/misc/reaction-lib'; +import { User } from '../entities/user'; export type PackedNoteReaction = SchemaType; diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index 60a5e1ab3d..f178c091f1 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -1,14 +1,14 @@ import { EntityRepository, Repository, In } from 'typeorm'; import * as mfm from 'mfm-js'; -import { Note } from '../entities/note.js'; -import { User } from '../entities/user.js'; -import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index.js'; -import { SchemaType } from '@/misc/schema.js'; -import { nyaize } from '@/misc/nyaize.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib.js'; -import { NoteReaction } from '../entities/note-reaction.js'; -import { aggregateNoteEmojis, populateEmojis, prefetchEmojis } from '@/misc/populate-emojis.js'; +import { Note } from '../entities/note'; +import { User } from '../entities/user'; +import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index'; +import { SchemaType } from '@/misc/schema'; +import { nyaize } from '@/misc/nyaize'; +import { awaitAll } from '../../prelude/await-all'; +import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib'; +import { NoteReaction } from '../entities/note-reaction'; +import { aggregateNoteEmojis, populateEmojis, prefetchEmojis } from '@/misc/populate-emojis'; export type PackedNote = SchemaType; diff --git a/src/models/repositories/notification.ts b/src/models/repositories/notification.ts index 8199534e34..2b2ae22602 100644 --- a/src/models/repositories/notification.ts +++ b/src/models/repositories/notification.ts @@ -1,12 +1,12 @@ import { EntityRepository, In, Repository } from 'typeorm'; -import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '../index.js'; -import { Notification } from '../entities/notification.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Note } from '../entities/note.js'; -import { NoteReaction } from '../entities/note-reaction.js'; -import { User } from '../entities/user.js'; -import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis.js'; +import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '../index'; +import { Notification } from '../entities/notification'; +import { awaitAll } from '../../prelude/await-all'; +import { SchemaType } from '@/misc/schema'; +import { Note } from '../entities/note'; +import { NoteReaction } from '../entities/note-reaction'; +import { User } from '../entities/user'; +import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis'; export type PackedNotification = SchemaType; diff --git a/src/models/repositories/page-like.ts b/src/models/repositories/page-like.ts index 81147a9ee0..2f9977de93 100644 --- a/src/models/repositories/page-like.ts +++ b/src/models/repositories/page-like.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { PageLike } from '../entities/page-like.js'; -import { Pages } from '../index.js'; -import { User } from '../entities/user.js'; +import { PageLike } from '../entities/page-like'; +import { Pages } from '../index'; +import { User } from '../entities/user'; @EntityRepository(PageLike) export class PageLikeRepository extends Repository { diff --git a/src/models/repositories/page.ts b/src/models/repositories/page.ts index 45f8c81786..cac1a9545f 100644 --- a/src/models/repositories/page.ts +++ b/src/models/repositories/page.ts @@ -1,10 +1,10 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Page } from '../entities/page.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Users, DriveFiles, PageLikes } from '../index.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { DriveFile } from '../entities/drive-file.js'; -import { User } from '../entities/user.js'; +import { Page } from '../entities/page'; +import { SchemaType } from '@/misc/schema'; +import { Users, DriveFiles, PageLikes } from '../index'; +import { awaitAll } from '../../prelude/await-all'; +import { DriveFile } from '../entities/drive-file'; +import { User } from '../entities/user'; export type PackedPage = SchemaType; diff --git a/src/models/repositories/relay.ts b/src/models/repositories/relay.ts index c1b04a8ea0..601bb5eb39 100644 --- a/src/models/repositories/relay.ts +++ b/src/models/repositories/relay.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Relay } from '../entities/relay.js'; +import { Relay } from '../entities/relay'; @EntityRepository(Relay) export class RelayRepository extends Repository { diff --git a/src/models/repositories/signin.ts b/src/models/repositories/signin.ts index 8490ac6a59..f5b90c0e9e 100644 --- a/src/models/repositories/signin.ts +++ b/src/models/repositories/signin.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Signin } from '../entities/signin.js'; +import { Signin } from '../entities/signin'; @EntityRepository(Signin) export class SigninRepository extends Repository { diff --git a/src/models/repositories/user-group-invitation.ts b/src/models/repositories/user-group-invitation.ts index 6552f23d96..fb34dc9c29 100644 --- a/src/models/repositories/user-group-invitation.ts +++ b/src/models/repositories/user-group-invitation.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserGroupInvitation } from '../entities/user-group-invitation.js'; -import { UserGroups } from '../index.js'; +import { UserGroupInvitation } from '../entities/user-group-invitation'; +import { UserGroups } from '../index'; @EntityRepository(UserGroupInvitation) export class UserGroupInvitationRepository extends Repository { diff --git a/src/models/repositories/user-group.ts b/src/models/repositories/user-group.ts index 6a2cd2caa2..ad144290ab 100644 --- a/src/models/repositories/user-group.ts +++ b/src/models/repositories/user-group.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserGroup } from '../entities/user-group.js'; -import { UserGroupJoinings } from '../index.js'; -import { SchemaType } from '@/misc/schema.js'; +import { UserGroup } from '../entities/user-group'; +import { UserGroupJoinings } from '../index'; +import { SchemaType } from '@/misc/schema'; export type PackedUserGroup = SchemaType; diff --git a/src/models/repositories/user-list.ts b/src/models/repositories/user-list.ts index 6027e346a2..38b8c2f1b7 100644 --- a/src/models/repositories/user-list.ts +++ b/src/models/repositories/user-list.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserList } from '../entities/user-list.js'; -import { UserListJoinings } from '../index.js'; -import { SchemaType } from '@/misc/schema.js'; +import { UserList } from '../entities/user-list'; +import { UserListJoinings } from '../index'; +import { SchemaType } from '@/misc/schema'; export type PackedUserList = SchemaType; diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index 494ab3c979..a4e5a43a00 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; import { EntityRepository, Repository, In, Not } from 'typeorm'; -import { User, ILocalUser, IRemoteUser } from '../entities/user.js'; -import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index.js'; -import config from '@/config/index.js'; -import { SchemaType } from '@/misc/schema.js'; -import { awaitAll } from '../../prelude/await-all.js'; -import { populateEmojis } from '@/misc/populate-emojis.js'; -import { getAntennas } from '@/misc/antenna-cache.js'; -import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const.js'; +import { User, ILocalUser, IRemoteUser } from '../entities/user'; +import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index'; +import config from '@/config/index'; +import { SchemaType } from '@/misc/schema'; +import { awaitAll } from '../../prelude/await-all'; +import { populateEmojis } from '@/misc/populate-emojis'; +import { getAntennas } from '@/misc/antenna-cache'; +import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const'; export type PackedUser = SchemaType; diff --git a/src/prelude/array.ts b/src/prelude/array.ts index 3846c31af2..d63f0475d0 100644 --- a/src/prelude/array.ts +++ b/src/prelude/array.ts @@ -1,4 +1,4 @@ -import { EndoRelation, Predicate } from './relation.js'; +import { EndoRelation, Predicate } from './relation'; /** * Count the number of elements that satisfy the predicate diff --git a/src/queue/index.ts b/src/queue/index.ts index 7b6824f803..2facd9c8e1 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -1,18 +1,18 @@ import * as httpSignature from 'http-signature'; -import config from '@/config/index.js'; -import { program } from '../argv.js'; +import config from '@/config/index'; +import { program } from '../argv'; -import processDeliver from './processors/deliver.js'; -import processInbox from './processors/inbox.js'; -import processDb from './processors/db/index.js'; -import procesObjectStorage from './processors/object-storage/index.js'; -import { queueLogger } from './logger.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { getJobInfo } from './get-job-info.js'; -import { dbQueue, deliverQueue, inboxQueue, objectStorageQueue } from './queues.js'; -import { ThinUser } from './types.js'; -import { IActivity } from '@/remote/activitypub/type.js'; +import processDeliver from './processors/deliver'; +import processInbox from './processors/inbox'; +import processDb from './processors/db/index'; +import procesObjectStorage from './processors/object-storage/index'; +import { queueLogger } from './logger'; +import { DriveFile } from '@/models/entities/drive-file'; +import { getJobInfo } from './get-job-info'; +import { dbQueue, deliverQueue, inboxQueue, objectStorageQueue } from './queues'; +import { ThinUser } from './types'; +import { IActivity } from '@/remote/activitypub/type'; function renderError(e: Error): any { return { diff --git a/src/queue/initialize.ts b/src/queue/initialize.ts index bed368967b..5fe5a9f6f3 100644 --- a/src/queue/initialize.ts +++ b/src/queue/initialize.ts @@ -1,5 +1,5 @@ import * as Bull from 'bull'; -import config from '@/config/index.js'; +import config from '@/config/index'; export function initialize(name: string, limitPerSec = -1) { return new Bull(name, { diff --git a/src/queue/logger.ts b/src/queue/logger.ts index 2843a3c263..f789b9d079 100644 --- a/src/queue/logger.ts +++ b/src/queue/logger.ts @@ -1,3 +1,3 @@ -import Logger from '@/services/logger.js'; +import Logger from '@/services/logger'; export const queueLogger = new Logger('queue', 'orange'); diff --git a/src/queue/processors/db/delete-drive-files.ts b/src/queue/processors/db/delete-drive-files.ts index 1d3876ac15..8a28468b0d 100644 --- a/src/queue/processors/db/delete-drive-files.ts +++ b/src/queue/processors/db/delete-drive-files.ts @@ -1,10 +1,10 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger.js'; -import { deleteFileSync } from '@/services/drive/delete-file.js'; -import { Users, DriveFiles } from '@/models/index.js'; +import { queueLogger } from '../../logger'; +import { deleteFileSync } from '@/services/drive/delete-file'; +import { Users, DriveFiles } from '@/models/index'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types.js'; +import { DbUserJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('delete-drive-files'); diff --git a/src/queue/processors/db/export-blocking.ts b/src/queue/processors/db/export-blocking.ts index 41344826e8..a0fc385006 100644 --- a/src/queue/processors/db/export-blocking.ts +++ b/src/queue/processors/db/export-blocking.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger.js'; -import addFile from '@/services/drive/add-file.js'; +import { queueLogger } from '../../logger'; +import addFile from '@/services/drive/add-file'; import dateFormat from 'dateformat'; -import { getFullApAccount } from '@/misc/convert-host.js'; -import { Users, Blockings } from '@/models/index.js'; +import { getFullApAccount } from '@/misc/convert-host'; +import { Users, Blockings } from '@/models/index'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types.js'; +import { DbUserJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('export-blocking'); diff --git a/src/queue/processors/db/export-following.ts b/src/queue/processors/db/export-following.ts index c299479afd..3612150363 100644 --- a/src/queue/processors/db/export-following.ts +++ b/src/queue/processors/db/export-following.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger.js'; -import addFile from '@/services/drive/add-file.js'; +import { queueLogger } from '../../logger'; +import addFile from '@/services/drive/add-file'; import dateFormat from 'dateformat'; -import { getFullApAccount } from '@/misc/convert-host.js'; -import { Users, Followings } from '@/models/index.js'; +import { getFullApAccount } from '@/misc/convert-host'; +import { Users, Followings } from '@/models/index'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types.js'; +import { DbUserJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('export-following'); diff --git a/src/queue/processors/db/export-mute.ts b/src/queue/processors/db/export-mute.ts index 8a16ab0b1e..70b2272cdb 100644 --- a/src/queue/processors/db/export-mute.ts +++ b/src/queue/processors/db/export-mute.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger.js'; -import addFile from '@/services/drive/add-file.js'; +import { queueLogger } from '../../logger'; +import addFile from '@/services/drive/add-file'; import dateFormat from 'dateformat'; -import { getFullApAccount } from '@/misc/convert-host.js'; -import { Users, Mutings } from '@/models/index.js'; +import { getFullApAccount } from '@/misc/convert-host'; +import { Users, Mutings } from '@/models/index'; import { MoreThan } from 'typeorm'; -import { DbUserJobData } from '@/queue/types.js'; +import { DbUserJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('export-mute'); diff --git a/src/queue/processors/db/export-notes.ts b/src/queue/processors/db/export-notes.ts index 9a2f71b9cc..3f146aff1b 100644 --- a/src/queue/processors/db/export-notes.ts +++ b/src/queue/processors/db/export-notes.ts @@ -2,14 +2,14 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger.js'; -import addFile from '@/services/drive/add-file.js'; +import { queueLogger } from '../../logger'; +import addFile from '@/services/drive/add-file'; import dateFormat from 'dateformat'; -import { Users, Notes, Polls } from '@/models/index.js'; +import { Users, Notes, Polls } from '@/models/index'; import { MoreThan } from 'typeorm'; -import { Note } from '@/models/entities/note.js'; -import { Poll } from '@/models/entities/poll.js'; -import { DbUserJobData } from '@/queue/types.js'; +import { Note } from '@/models/entities/note'; +import { Poll } from '@/models/entities/poll'; +import { DbUserJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('export-notes'); diff --git a/src/queue/processors/db/export-user-lists.ts b/src/queue/processors/db/export-user-lists.ts index 6b54638f08..89bbd5af18 100644 --- a/src/queue/processors/db/export-user-lists.ts +++ b/src/queue/processors/db/export-user-lists.ts @@ -2,13 +2,13 @@ import * as Bull from 'bull'; import * as tmp from 'tmp'; import * as fs from 'fs'; -import { queueLogger } from '../../logger.js'; -import addFile from '@/services/drive/add-file.js'; +import { queueLogger } from '../../logger'; +import addFile from '@/services/drive/add-file'; import dateFormat from 'dateformat'; -import { getFullApAccount } from '@/misc/convert-host.js'; -import { Users, UserLists, UserListJoinings } from '@/models/index.js'; +import { getFullApAccount } from '@/misc/convert-host'; +import { Users, UserLists, UserListJoinings } from '@/models/index'; import { In } from 'typeorm'; -import { DbUserJobData } from '@/queue/types.js'; +import { DbUserJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('export-user-lists'); diff --git a/src/queue/processors/db/import-following.ts b/src/queue/processors/db/import-following.ts index bc8166c72c..3d7b7ea404 100644 --- a/src/queue/processors/db/import-following.ts +++ b/src/queue/processors/db/import-following.ts @@ -1,13 +1,13 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger.js'; -import follow from '@/services/following/create.js'; -import { parseAcct } from '@/misc/acct.js'; -import { resolveUser } from '@/remote/resolve-user.js'; -import { downloadTextFile } from '@/misc/download-text-file.js'; -import { isSelfHost, toPuny } from '@/misc/convert-host.js'; -import { Users, DriveFiles } from '@/models/index.js'; -import { DbUserImportJobData } from '@/queue/types.js'; +import { queueLogger } from '../../logger'; +import follow from '@/services/following/create'; +import { parseAcct } from '@/misc/acct'; +import { resolveUser } from '@/remote/resolve-user'; +import { downloadTextFile } from '@/misc/download-text-file'; +import { isSelfHost, toPuny } from '@/misc/convert-host'; +import { Users, DriveFiles } from '@/models/index'; +import { DbUserImportJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('import-following'); diff --git a/src/queue/processors/db/import-user-lists.ts b/src/queue/processors/db/import-user-lists.ts index 6748e748ec..3b8c13262a 100644 --- a/src/queue/processors/db/import-user-lists.ts +++ b/src/queue/processors/db/import-user-lists.ts @@ -1,14 +1,14 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger.js'; -import { parseAcct } from '@/misc/acct.js'; -import { resolveUser } from '@/remote/resolve-user.js'; -import { pushUserToUserList } from '@/services/user-list/push.js'; -import { downloadTextFile } from '@/misc/download-text-file.js'; -import { isSelfHost, toPuny } from '@/misc/convert-host.js'; -import { DriveFiles, Users, UserLists, UserListJoinings } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { DbUserImportJobData } from '@/queue/types.js'; +import { queueLogger } from '../../logger'; +import { parseAcct } from '@/misc/acct'; +import { resolveUser } from '@/remote/resolve-user'; +import { pushUserToUserList } from '@/services/user-list/push'; +import { downloadTextFile } from '@/misc/download-text-file'; +import { isSelfHost, toPuny } from '@/misc/convert-host'; +import { DriveFiles, Users, UserLists, UserListJoinings } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { DbUserImportJobData } from '@/queue/types'; const logger = queueLogger.createSubLogger('import-user-lists'); diff --git a/src/queue/processors/db/index.ts b/src/queue/processors/db/index.ts index 0936daf7aa..b56b7bfa2c 100644 --- a/src/queue/processors/db/index.ts +++ b/src/queue/processors/db/index.ts @@ -1,13 +1,13 @@ import * as Bull from 'bull'; -import { DbJobData } from '@/queue/types.js'; -import { deleteDriveFiles } from './delete-drive-files.js'; -import { exportNotes } from './export-notes.js'; -import { exportFollowing } from './export-following.js'; -import { exportMute } from './export-mute.js'; -import { exportBlocking } from './export-blocking.js'; -import { exportUserLists } from './export-user-lists.js'; -import { importFollowing } from './import-following.js'; -import { importUserLists } from './import-user-lists.js'; +import { DbJobData } from '@/queue/types'; +import { deleteDriveFiles } from './delete-drive-files'; +import { exportNotes } from './export-notes'; +import { exportFollowing } from './export-following'; +import { exportMute } from './export-mute'; +import { exportBlocking } from './export-blocking'; +import { exportUserLists } from './export-user-lists'; +import { importFollowing } from './import-following'; +import { importUserLists } from './import-user-lists'; const jobs = { deleteDriveFiles, diff --git a/src/queue/processors/deliver.ts b/src/queue/processors/deliver.ts index aeb7fc5f92..373e57cbd5 100644 --- a/src/queue/processors/deliver.ts +++ b/src/queue/processors/deliver.ts @@ -1,16 +1,16 @@ import { URL } from 'url'; import * as Bull from 'bull'; -import request from '@/remote/activitypub/request.js'; -import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; -import Logger from '@/services/logger.js'; -import { Instances } from '@/models/index.js'; -import { instanceChart } from '@/services/chart/index.js'; -import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { toPuny } from '@/misc/convert-host.js'; -import { Cache } from '@/misc/cache.js'; -import { Instance } from '@/models/entities/instance.js'; -import { DeliverJobData } from '../types.js'; +import request from '@/remote/activitypub/request'; +import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc'; +import Logger from '@/services/logger'; +import { Instances } from '@/models/index'; +import { instanceChart } from '@/services/chart/index'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { toPuny } from '@/misc/convert-host'; +import { Cache } from '@/misc/cache'; +import { Instance } from '@/models/entities/instance'; +import { DeliverJobData } from '../types'; const logger = new Logger('deliver'); diff --git a/src/queue/processors/inbox.ts b/src/queue/processors/inbox.ts index b13828096d..e2c271cdf8 100644 --- a/src/queue/processors/inbox.ts +++ b/src/queue/processors/inbox.ts @@ -1,19 +1,19 @@ import { URL } from 'url'; import * as Bull from 'bull'; import * as httpSignature from 'http-signature'; -import perform from '@/remote/activitypub/perform.js'; -import Logger from '@/services/logger.js'; -import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; -import { Instances } from '@/models/index.js'; -import { instanceChart } from '@/services/chart/index.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { toPuny, extractDbHost } from '@/misc/convert-host.js'; -import { getApId } from '@/remote/activitypub/type.js'; -import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; -import { InboxJobData } from '../types.js'; -import DbResolver from '@/remote/activitypub/db-resolver.js'; -import { resolvePerson } from '@/remote/activitypub/models/person.js'; -import { LdSignature } from '@/remote/activitypub/misc/ld-signature.js'; +import perform from '@/remote/activitypub/perform'; +import Logger from '@/services/logger'; +import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc'; +import { Instances } from '@/models/index'; +import { instanceChart } from '@/services/chart/index'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { toPuny, extractDbHost } from '@/misc/convert-host'; +import { getApId } from '@/remote/activitypub/type'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata'; +import { InboxJobData } from '../types'; +import DbResolver from '@/remote/activitypub/db-resolver'; +import { resolvePerson } from '@/remote/activitypub/models/person'; +import { LdSignature } from '@/remote/activitypub/misc/ld-signature'; const logger = new Logger('inbox'); diff --git a/src/queue/processors/object-storage/clean-remote-files.ts b/src/queue/processors/object-storage/clean-remote-files.ts index 96cb912c1c..3b2e4ea939 100644 --- a/src/queue/processors/object-storage/clean-remote-files.ts +++ b/src/queue/processors/object-storage/clean-remote-files.ts @@ -1,8 +1,8 @@ import * as Bull from 'bull'; -import { queueLogger } from '../../logger.js'; -import { deleteFileSync } from '@/services/drive/delete-file.js'; -import { DriveFiles } from '@/models/index.js'; +import { queueLogger } from '../../logger'; +import { deleteFileSync } from '@/services/drive/delete-file'; +import { DriveFiles } from '@/models/index'; import { MoreThan, Not, IsNull } from 'typeorm'; const logger = queueLogger.createSubLogger('clean-remote-files'); diff --git a/src/queue/processors/object-storage/delete-file.ts b/src/queue/processors/object-storage/delete-file.ts index 08f2977816..ed22968a27 100644 --- a/src/queue/processors/object-storage/delete-file.ts +++ b/src/queue/processors/object-storage/delete-file.ts @@ -1,6 +1,6 @@ -import { ObjectStorageFileJobData } from '@/queue/types.js'; +import { ObjectStorageFileJobData } from '@/queue/types'; import * as Bull from 'bull'; -import { deleteObjectStorageFile } from '@/services/drive/delete-file.js'; +import { deleteObjectStorageFile } from '@/services/drive/delete-file'; export default async (job: Bull.Job) => { const key: string = job.data.key; diff --git a/src/queue/processors/object-storage/index.ts b/src/queue/processors/object-storage/index.ts index b00d493719..0d9570e179 100644 --- a/src/queue/processors/object-storage/index.ts +++ b/src/queue/processors/object-storage/index.ts @@ -1,7 +1,7 @@ import * as Bull from 'bull'; -import { ObjectStorageJobData } from '@/queue/types.js'; -import deleteFile from './delete-file.js'; -import cleanRemoteFiles from './clean-remote-files.js'; +import { ObjectStorageJobData } from '@/queue/types'; +import deleteFile from './delete-file'; +import cleanRemoteFiles from './clean-remote-files'; const jobs = { deleteFile, diff --git a/src/queue/queues.ts b/src/queue/queues.ts index a3084ae4f6..d8c09ef86e 100644 --- a/src/queue/queues.ts +++ b/src/queue/queues.ts @@ -1,6 +1,6 @@ -import config from '@/config/index.js'; -import { initialize as initializeQueue } from './initialize.js'; -import { DeliverJobData, InboxJobData, DbJobData, ObjectStorageJobData } from './types.js'; +import config from '@/config/index'; +import { initialize as initializeQueue } from './initialize'; +import { DeliverJobData, InboxJobData, DbJobData, ObjectStorageJobData } from './types'; export const deliverQueue = initializeQueue('deliver', config.deliverJobPerSec || 128); export const inboxQueue = initializeQueue('inbox', config.inboxJobPerSec || 16); diff --git a/src/queue/types.ts b/src/queue/types.ts index 79067ca05f..a782fc6b97 100644 --- a/src/queue/types.ts +++ b/src/queue/types.ts @@ -1,6 +1,6 @@ -import { DriveFile } from '@/models/entities/drive-file.js'; -import { User } from '@/models/entities/user.js'; -import { IActivity } from '@/remote/activitypub/type.js'; +import { DriveFile } from '@/models/entities/drive-file'; +import { User } from '@/models/entities/user'; +import { IActivity } from '@/remote/activitypub/type'; import * as httpSignature from 'http-signature'; export type DeliverJobData = { diff --git a/src/remote/activitypub/audience.ts b/src/remote/activitypub/audience.ts index 1ced62e50a..7feef5ee7a 100644 --- a/src/remote/activitypub/audience.ts +++ b/src/remote/activitypub/audience.ts @@ -1,9 +1,9 @@ -import { ApObject, getApIds } from './type.js'; -import Resolver from './resolver.js'; -import { resolvePerson } from './models/person.js'; -import { unique, concat } from '../../prelude/array.js'; +import { ApObject, getApIds } from './type'; +import Resolver from './resolver'; +import { resolvePerson } from './models/person'; +import { unique, concat } from '../../prelude/array'; import * as promiseLimit from 'promise-limit'; -import { User, IRemoteUser } from '@/models/entities/user.js'; +import { User, IRemoteUser } from '@/models/entities/user'; type Visibility = 'public' | 'home' | 'followers' | 'specified'; diff --git a/src/remote/activitypub/db-resolver.ts b/src/remote/activitypub/db-resolver.ts index b73ac1e52a..289b6f0ee8 100644 --- a/src/remote/activitypub/db-resolver.ts +++ b/src/remote/activitypub/db-resolver.ts @@ -1,11 +1,11 @@ -import config from '@/config/index.js'; -import { Note } from '@/models/entities/note.js'; -import { User, IRemoteUser } from '@/models/entities/user.js'; -import { UserPublickey } from '@/models/entities/user-publickey.js'; -import { MessagingMessage } from '@/models/entities/messaging-message.js'; -import { Notes, Users, UserPublickeys, MessagingMessages } from '@/models/index.js'; -import { IObject, getApId } from './type.js'; -import { resolvePerson } from './models/person.js'; +import config from '@/config/index'; +import { Note } from '@/models/entities/note'; +import { User, IRemoteUser } from '@/models/entities/user'; +import { UserPublickey } from '@/models/entities/user-publickey'; +import { MessagingMessage } from '@/models/entities/messaging-message'; +import { Notes, Users, UserPublickeys, MessagingMessages } from '@/models/index'; +import { IObject, getApId } from './type'; +import { resolvePerson } from './models/person'; import escapeRegexp = require('escape-regexp'); export default class DbResolver { diff --git a/src/remote/activitypub/deliver-manager.ts b/src/remote/activitypub/deliver-manager.ts index b4b2df6ee4..d37f97a447 100644 --- a/src/remote/activitypub/deliver-manager.ts +++ b/src/remote/activitypub/deliver-manager.ts @@ -1,6 +1,6 @@ -import { Users, Followings } from '@/models/index.js'; -import { ILocalUser, IRemoteUser, User } from '@/models/entities/user.js'; -import { deliver } from '@/queue/index.js'; +import { Users, Followings } from '@/models/index'; +import { ILocalUser, IRemoteUser, User } from '@/models/entities/user'; +import { deliver } from '@/queue/index'; //#region types interface IRecipe { diff --git a/src/remote/activitypub/kernel/accept/follow.ts b/src/remote/activitypub/kernel/accept/follow.ts index 393516addf..1afb733ab5 100644 --- a/src/remote/activitypub/kernel/accept/follow.ts +++ b/src/remote/activitypub/kernel/accept/follow.ts @@ -1,8 +1,8 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import accept from '@/services/following/requests/accept.js'; -import { IFollow } from '../../type.js'; -import DbResolver from '../../db-resolver.js'; -import { relayAccepted } from '@/services/relay.js'; +import { IRemoteUser } from '@/models/entities/user'; +import accept from '@/services/following/requests/accept'; +import { IFollow } from '../../type'; +import DbResolver from '../../db-resolver'; +import { relayAccepted } from '@/services/relay'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { // ※ activityはこっちから投げたフォローリクエストなので、activity.actorは存在するローカルユーザーである必要がある diff --git a/src/remote/activitypub/kernel/accept/index.ts b/src/remote/activitypub/kernel/accept/index.ts index 354bd4f6e1..5c6f81b2e3 100644 --- a/src/remote/activitypub/kernel/accept/index.ts +++ b/src/remote/activitypub/kernel/accept/index.ts @@ -1,8 +1,8 @@ -import Resolver from '../../resolver.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import acceptFollow from './follow.js'; -import { IAccept, isFollow, getApType } from '../../type.js'; -import { apLogger } from '../../logger.js'; +import Resolver from '../../resolver'; +import { IRemoteUser } from '@/models/entities/user'; +import acceptFollow from './follow'; +import { IAccept, isFollow, getApType } from '../../type'; +import { apLogger } from '../../logger'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/add/index.ts b/src/remote/activitypub/kernel/add/index.ts index 9a2fac1e74..b33be0cc85 100644 --- a/src/remote/activitypub/kernel/add/index.ts +++ b/src/remote/activitypub/kernel/add/index.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import { IAdd } from '../../type.js'; -import { resolveNote } from '../../models/note.js'; -import { addPinned } from '@/services/i/pin.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { IAdd } from '../../type'; +import { resolveNote } from '../../models/note'; +import { addPinned } from '@/services/i/pin'; export default async (actor: IRemoteUser, activity: IAdd): Promise => { if ('actor' in activity && actor.uri !== activity.actor) { diff --git a/src/remote/activitypub/kernel/announce/index.ts b/src/remote/activitypub/kernel/announce/index.ts index 7e2e73bdd5..581357e577 100644 --- a/src/remote/activitypub/kernel/announce/index.ts +++ b/src/remote/activitypub/kernel/announce/index.ts @@ -1,8 +1,8 @@ -import Resolver from '../../resolver.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import announceNote from './note.js'; -import { IAnnounce, getApId } from '../../type.js'; -import { apLogger } from '../../logger.js'; +import Resolver from '../../resolver'; +import { IRemoteUser } from '@/models/entities/user'; +import announceNote from './note'; +import { IAnnounce, getApId } from '../../type'; +import { apLogger } from '../../logger'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/announce/note.ts b/src/remote/activitypub/kernel/announce/note.ts index 9a6402e3b8..b6ec090b99 100644 --- a/src/remote/activitypub/kernel/announce/note.ts +++ b/src/remote/activitypub/kernel/announce/note.ts @@ -1,13 +1,13 @@ -import Resolver from '../../resolver.js'; -import post from '@/services/note/create.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { IAnnounce, getApId } from '../../type.js'; -import { fetchNote, resolveNote } from '../../models/note.js'; -import { apLogger } from '../../logger.js'; -import { extractDbHost } from '@/misc/convert-host.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { getApLock } from '@/misc/app-lock.js'; -import { parseAudience } from '../../audience.js'; +import Resolver from '../../resolver'; +import post from '@/services/note/create'; +import { IRemoteUser } from '@/models/entities/user'; +import { IAnnounce, getApId } from '../../type'; +import { fetchNote, resolveNote } from '../../models/note'; +import { apLogger } from '../../logger'; +import { extractDbHost } from '@/misc/convert-host'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { getApLock } from '@/misc/app-lock'; +import { parseAudience } from '../../audience'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/block/index.ts b/src/remote/activitypub/kernel/block/index.ts index 9e4f1b316e..4fd1e07b9b 100644 --- a/src/remote/activitypub/kernel/block/index.ts +++ b/src/remote/activitypub/kernel/block/index.ts @@ -1,7 +1,7 @@ -import { IBlock } from '../../type.js'; -import block from '@/services/blocking/create.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import DbResolver from '../../db-resolver.js'; +import { IBlock } from '../../type'; +import block from '@/services/blocking/create'; +import { IRemoteUser } from '@/models/entities/user'; +import DbResolver from '../../db-resolver'; export default async (actor: IRemoteUser, activity: IBlock): Promise => { // ※ activity.objectにブロック対象があり、それは存在するローカルユーザーのはず diff --git a/src/remote/activitypub/kernel/create/index.ts b/src/remote/activitypub/kernel/create/index.ts index 4aa10d85df..a44a6ced2b 100644 --- a/src/remote/activitypub/kernel/create/index.ts +++ b/src/remote/activitypub/kernel/create/index.ts @@ -1,9 +1,9 @@ -import Resolver from '../../resolver.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import createNote from './note.js'; -import { ICreate, getApId, isPost, getApType } from '../../type.js'; -import { apLogger } from '../../logger.js'; -import { toArray, concat, unique } from '../../../../prelude/array.js'; +import Resolver from '../../resolver'; +import { IRemoteUser } from '@/models/entities/user'; +import createNote from './note'; +import { ICreate, getApId, isPost, getApType } from '../../type'; +import { apLogger } from '../../logger'; +import { toArray, concat, unique } from '../../../../prelude/array'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/create/note.ts b/src/remote/activitypub/kernel/create/note.ts index b0a7be5ea5..5dda85d0f5 100644 --- a/src/remote/activitypub/kernel/create/note.ts +++ b/src/remote/activitypub/kernel/create/note.ts @@ -1,9 +1,9 @@ -import Resolver from '../../resolver.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { createNote, fetchNote } from '../../models/note.js'; -import { getApId, IObject, ICreate } from '../../type.js'; -import { getApLock } from '@/misc/app-lock.js'; -import { extractDbHost } from '@/misc/convert-host.js'; +import Resolver from '../../resolver'; +import { IRemoteUser } from '@/models/entities/user'; +import { createNote, fetchNote } from '../../models/note'; +import { getApId, IObject, ICreate } from '../../type'; +import { getApLock } from '@/misc/app-lock'; +import { extractDbHost } from '@/misc/convert-host'; /** * 投稿作成アクティビティを捌きます diff --git a/src/remote/activitypub/kernel/delete/index.ts b/src/remote/activitypub/kernel/delete/index.ts index 130b0aeec9..fe919975e7 100644 --- a/src/remote/activitypub/kernel/delete/index.ts +++ b/src/remote/activitypub/kernel/delete/index.ts @@ -1,7 +1,7 @@ -import deleteNote from './note.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type.js'; -import { toSingle } from '../../../../prelude/array.js'; +import deleteNote from './note'; +import { IRemoteUser } from '@/models/entities/user'; +import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type'; +import { toSingle } from '../../../../prelude/array'; /** * 削除アクティビティを捌きます diff --git a/src/remote/activitypub/kernel/delete/note.ts b/src/remote/activitypub/kernel/delete/note.ts index ad5e1a2edc..3875a33d13 100644 --- a/src/remote/activitypub/kernel/delete/note.ts +++ b/src/remote/activitypub/kernel/delete/note.ts @@ -1,9 +1,9 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import deleteNode from '@/services/note/delete.js'; -import { apLogger } from '../../logger.js'; -import DbResolver from '../../db-resolver.js'; -import { getApLock } from '@/misc/app-lock.js'; -import { deleteMessage } from '@/services/messages/delete.js'; +import { IRemoteUser } from '@/models/entities/user'; +import deleteNode from '@/services/note/delete'; +import { apLogger } from '../../logger'; +import DbResolver from '../../db-resolver'; +import { getApLock } from '@/misc/app-lock'; +import { deleteMessage } from '@/services/messages/delete'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/flag/index.ts b/src/remote/activitypub/kernel/flag/index.ts index 62f3ac5ed5..7abfd694cd 100644 --- a/src/remote/activitypub/kernel/flag/index.ts +++ b/src/remote/activitypub/kernel/flag/index.ts @@ -1,9 +1,9 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import config from '@/config/index.js'; -import { IFlag, getApIds } from '../../type.js'; -import { AbuseUserReports, Users } from '@/models/index.js'; +import { IRemoteUser } from '@/models/entities/user'; +import config from '@/config/index'; +import { IFlag, getApIds } from '../../type'; +import { AbuseUserReports, Users } from '@/models/index'; import { In } from 'typeorm'; -import { genId } from '@/misc/gen-id.js'; +import { genId } from '@/misc/gen-id'; export default async (actor: IRemoteUser, activity: IFlag): Promise => { // objectは `(User|Note) | (User|Note)[]` だけど、全パターンDBスキーマと対応させられないので diff --git a/src/remote/activitypub/kernel/follow.ts b/src/remote/activitypub/kernel/follow.ts index 49c1a7ee01..3183207afa 100644 --- a/src/remote/activitypub/kernel/follow.ts +++ b/src/remote/activitypub/kernel/follow.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import follow from '@/services/following/create.js'; -import { IFollow } from '../type.js'; -import DbResolver from '../db-resolver.js'; +import { IRemoteUser } from '@/models/entities/user'; +import follow from '@/services/following/create'; +import { IFollow } from '../type'; +import DbResolver from '../db-resolver'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { const dbResolver = new DbResolver(); diff --git a/src/remote/activitypub/kernel/index.ts b/src/remote/activitypub/kernel/index.ts index fa0df9753f..0bd0814340 100644 --- a/src/remote/activitypub/kernel/index.ts +++ b/src/remote/activitypub/kernel/index.ts @@ -1,22 +1,22 @@ -import { IObject, isCreate, isDelete, isUpdate, isRead, isFollow, isAccept, isReject, isAdd, isRemove, isAnnounce, isLike, isUndo, isBlock, isCollectionOrOrderedCollection, isCollection, isFlag } from '../type.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import create from './create/index.js'; -import performDeleteActivity from './delete/index.js'; -import performUpdateActivity from './update/index.js'; -import { performReadActivity } from './read.js'; -import follow from './follow.js'; -import undo from './undo/index.js'; -import like from './like.js'; -import announce from './announce/index.js'; -import accept from './accept/index.js'; -import reject from './reject/index.js'; -import add from './add/index.js'; -import remove from './remove/index.js'; -import block from './block/index.js'; -import flag from './flag/index.js'; -import { apLogger } from '../logger.js'; -import Resolver from '../resolver.js'; -import { toArray } from '../../../prelude/array.js'; +import { IObject, isCreate, isDelete, isUpdate, isRead, isFollow, isAccept, isReject, isAdd, isRemove, isAnnounce, isLike, isUndo, isBlock, isCollectionOrOrderedCollection, isCollection, isFlag } from '../type'; +import { IRemoteUser } from '@/models/entities/user'; +import create from './create/index'; +import performDeleteActivity from './delete/index'; +import performUpdateActivity from './update/index'; +import { performReadActivity } from './read'; +import follow from './follow'; +import undo from './undo/index'; +import like from './like'; +import announce from './announce/index'; +import accept from './accept/index'; +import reject from './reject/index'; +import add from './add/index'; +import remove from './remove/index'; +import block from './block/index'; +import flag from './flag/index'; +import { apLogger } from '../logger'; +import Resolver from '../resolver'; +import { toArray } from '../../../prelude/array'; export async function performActivity(actor: IRemoteUser, activity: IObject) { if (isCollectionOrOrderedCollection(activity)) { diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index 715cc379b9..58d5aefefc 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import { ILike, getApId } from '../type.js'; -import create from '@/services/note/reaction/create.js'; -import { fetchNote, extractEmojis } from '../models/note.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { ILike, getApId } from '../type'; +import create from '@/services/note/reaction/create'; +import { fetchNote, extractEmojis } from '../models/note'; export default async (actor: IRemoteUser, activity: ILike) => { const targetUri = getApId(activity.object); diff --git a/src/remote/activitypub/kernel/read.ts b/src/remote/activitypub/kernel/read.ts index 93cc36ec46..11a1731869 100644 --- a/src/remote/activitypub/kernel/read.ts +++ b/src/remote/activitypub/kernel/read.ts @@ -1,8 +1,8 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import { IRead, getApId } from '../type.js'; -import { isSelfHost, extractDbHost } from '@/misc/convert-host.js'; -import { MessagingMessages } from '@/models/index.js'; -import { readUserMessagingMessage } from '../../../server/api/common/read-messaging-message.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { IRead, getApId } from '../type'; +import { isSelfHost, extractDbHost } from '@/misc/convert-host'; +import { MessagingMessages } from '@/models/index'; +import { readUserMessagingMessage } from '../../../server/api/common/read-messaging-message'; export const performReadActivity = async (actor: IRemoteUser, activity: IRead): Promise => { const id = await getApId(activity.object); diff --git a/src/remote/activitypub/kernel/reject/follow.ts b/src/remote/activitypub/kernel/reject/follow.ts index 7099864e76..356547440f 100644 --- a/src/remote/activitypub/kernel/reject/follow.ts +++ b/src/remote/activitypub/kernel/reject/follow.ts @@ -1,8 +1,8 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import reject from '@/services/following/requests/reject.js'; -import { IFollow } from '../../type.js'; -import DbResolver from '../../db-resolver.js'; -import { relayRejected } from '@/services/relay.js'; +import { IRemoteUser } from '@/models/entities/user'; +import reject from '@/services/following/requests/reject'; +import { IFollow } from '../../type'; +import DbResolver from '../../db-resolver'; +import { relayRejected } from '@/services/relay'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { // ※ activityはこっちから投げたフォローリクエストなので、activity.actorは存在するローカルユーザーである必要がある diff --git a/src/remote/activitypub/kernel/reject/index.ts b/src/remote/activitypub/kernel/reject/index.ts index ed86a4aa2f..d0de9c329b 100644 --- a/src/remote/activitypub/kernel/reject/index.ts +++ b/src/remote/activitypub/kernel/reject/index.ts @@ -1,8 +1,8 @@ -import Resolver from '../../resolver.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import rejectFollow from './follow.js'; -import { IReject, isFollow, getApType } from '../../type.js'; -import { apLogger } from '../../logger.js'; +import Resolver from '../../resolver'; +import { IRemoteUser } from '@/models/entities/user'; +import rejectFollow from './follow'; +import { IReject, isFollow, getApType } from '../../type'; +import { apLogger } from '../../logger'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/remove/index.ts b/src/remote/activitypub/kernel/remove/index.ts index 7d7b3386c0..d59953e653 100644 --- a/src/remote/activitypub/kernel/remove/index.ts +++ b/src/remote/activitypub/kernel/remove/index.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import { IRemove } from '../../type.js'; -import { resolveNote } from '../../models/note.js'; -import { removePinned } from '@/services/i/pin.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { IRemove } from '../../type'; +import { resolveNote } from '../../models/note'; +import { removePinned } from '@/services/i/pin'; export default async (actor: IRemoteUser, activity: IRemove): Promise => { if ('actor' in activity && actor.uri !== activity.actor) { diff --git a/src/remote/activitypub/kernel/undo/announce.ts b/src/remote/activitypub/kernel/undo/announce.ts index d0c8c7cb66..7bb9d7fcad 100644 --- a/src/remote/activitypub/kernel/undo/announce.ts +++ b/src/remote/activitypub/kernel/undo/announce.ts @@ -1,7 +1,7 @@ -import { Notes } from '@/models/index.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { IAnnounce, getApId } from '../../type.js'; -import deleteNote from '@/services/note/delete.js'; +import { Notes } from '@/models/index'; +import { IRemoteUser } from '@/models/entities/user'; +import { IAnnounce, getApId } from '../../type'; +import deleteNote from '@/services/note/delete'; export const undoAnnounce = async (actor: IRemoteUser, activity: IAnnounce): Promise => { const uri = getApId(activity); diff --git a/src/remote/activitypub/kernel/undo/block.ts b/src/remote/activitypub/kernel/undo/block.ts index 844b067e2b..61940486be 100644 --- a/src/remote/activitypub/kernel/undo/block.ts +++ b/src/remote/activitypub/kernel/undo/block.ts @@ -1,7 +1,7 @@ -import { IBlock } from '../../type.js'; -import unblock from '@/services/blocking/delete.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import DbResolver from '../../db-resolver.js'; +import { IBlock } from '../../type'; +import unblock from '@/services/blocking/delete'; +import { IRemoteUser } from '@/models/entities/user'; +import DbResolver from '../../db-resolver'; export default async (actor: IRemoteUser, activity: IBlock): Promise => { const dbResolver = new DbResolver(); diff --git a/src/remote/activitypub/kernel/undo/follow.ts b/src/remote/activitypub/kernel/undo/follow.ts index cbf9b2e800..d85c7e4a71 100644 --- a/src/remote/activitypub/kernel/undo/follow.ts +++ b/src/remote/activitypub/kernel/undo/follow.ts @@ -1,9 +1,9 @@ -import unfollow from '@/services/following/delete.js'; -import cancelRequest from '@/services/following/requests/cancel.js'; -import { IFollow } from '../../type.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { FollowRequests, Followings } from '@/models/index.js'; -import DbResolver from '../../db-resolver.js'; +import unfollow from '@/services/following/delete'; +import cancelRequest from '@/services/following/requests/cancel'; +import { IFollow } from '../../type'; +import { IRemoteUser } from '@/models/entities/user'; +import { FollowRequests, Followings } from '@/models/index'; +import DbResolver from '../../db-resolver'; export default async (actor: IRemoteUser, activity: IFollow): Promise => { const dbResolver = new DbResolver(); diff --git a/src/remote/activitypub/kernel/undo/index.ts b/src/remote/activitypub/kernel/undo/index.ts index a03a785c0b..14b1add152 100644 --- a/src/remote/activitypub/kernel/undo/index.ts +++ b/src/remote/activitypub/kernel/undo/index.ts @@ -1,11 +1,11 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import { IUndo, isFollow, isBlock, isLike, isAnnounce, getApType } from '../../type.js'; -import unfollow from './follow.js'; -import unblock from './block.js'; -import undoLike from './like.js'; -import { undoAnnounce } from './announce.js'; -import Resolver from '../../resolver.js'; -import { apLogger } from '../../logger.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { IUndo, isFollow, isBlock, isLike, isAnnounce, getApType } from '../../type'; +import unfollow from './follow'; +import unblock from './block'; +import undoLike from './like'; +import { undoAnnounce } from './announce'; +import Resolver from '../../resolver'; +import { apLogger } from '../../logger'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/undo/like.ts b/src/remote/activitypub/kernel/undo/like.ts index 283e556b35..7f821cada0 100644 --- a/src/remote/activitypub/kernel/undo/like.ts +++ b/src/remote/activitypub/kernel/undo/like.ts @@ -1,7 +1,7 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import { ILike, getApId } from '../../type.js'; -import deleteReaction from '@/services/note/reaction/delete.js'; -import { fetchNote } from '../../models/note.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { ILike, getApId } from '../../type'; +import deleteReaction from '@/services/note/reaction/delete'; +import { fetchNote } from '../../models/note'; /** * Process Undo.Like activity diff --git a/src/remote/activitypub/kernel/update/index.ts b/src/remote/activitypub/kernel/update/index.ts index 7888c698e3..52bfc5002e 100644 --- a/src/remote/activitypub/kernel/update/index.ts +++ b/src/remote/activitypub/kernel/update/index.ts @@ -1,9 +1,9 @@ -import { IRemoteUser } from '@/models/entities/user.js'; -import { getApType, IUpdate, isActor } from '../../type.js'; -import { apLogger } from '../../logger.js'; -import { updateQuestion } from '../../models/question.js'; -import Resolver from '../../resolver.js'; -import { updatePerson } from '../../models/person.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { getApType, IUpdate, isActor } from '../../type'; +import { apLogger } from '../../logger'; +import { updateQuestion } from '../../models/question'; +import Resolver from '../../resolver'; +import { updatePerson } from '../../models/person'; /** * Updateアクティビティを捌きます diff --git a/src/remote/activitypub/logger.ts b/src/remote/activitypub/logger.ts index cab51b3bf5..e13add01db 100644 --- a/src/remote/activitypub/logger.ts +++ b/src/remote/activitypub/logger.ts @@ -1,3 +1,3 @@ -import { remoteLogger } from '../logger.js'; +import { remoteLogger } from '../logger'; export const apLogger = remoteLogger.createSubLogger('ap', 'magenta'); diff --git a/src/remote/activitypub/misc/get-note-html.ts b/src/remote/activitypub/misc/get-note-html.ts index 3800b40608..043335a5be 100644 --- a/src/remote/activitypub/misc/get-note-html.ts +++ b/src/remote/activitypub/misc/get-note-html.ts @@ -1,6 +1,6 @@ import * as mfm from 'mfm-js'; -import { Note } from '@/models/entities/note.js'; -import { toHtml } from '../../../mfm/to-html.js'; +import { Note } from '@/models/entities/note'; +import { toHtml } from '../../../mfm/to-html'; export default function(note: Note) { let html = note.text ? toHtml(mfm.parse(note.text), JSON.parse(note.mentionedRemoteUsers)) : null; diff --git a/src/remote/activitypub/misc/html-to-mfm.ts b/src/remote/activitypub/misc/html-to-mfm.ts index bb1ba7925c..5cca04df21 100644 --- a/src/remote/activitypub/misc/html-to-mfm.ts +++ b/src/remote/activitypub/misc/html-to-mfm.ts @@ -1,6 +1,6 @@ -import { IObject } from '../type.js'; -import { extractApHashtagObjects } from '../models/tag.js'; -import { fromHtml } from '../../../mfm/from-html.js'; +import { IObject } from '../type'; +import { extractApHashtagObjects } from '../models/tag'; +import { fromHtml } from '../../../mfm/from-html'; export function htmlToMfm(html: string, tag?: IObject | IObject[]) { const hashtagNames = extractApHashtagObjects(tag).map(x => x.name).filter((x): x is string => x != null); diff --git a/src/remote/activitypub/misc/ld-signature.ts b/src/remote/activitypub/misc/ld-signature.ts index c73cef81e1..dec07ea81b 100644 --- a/src/remote/activitypub/misc/ld-signature.ts +++ b/src/remote/activitypub/misc/ld-signature.ts @@ -1,8 +1,8 @@ import * as crypto from 'crypto'; import * as jsonld from 'jsonld'; -import { CONTEXTS } from './contexts.js'; +import { CONTEXTS } from './contexts'; import fetch from 'node-fetch'; -import { httpAgent, httpsAgent } from '@/misc/fetch.js'; +import { httpAgent, httpsAgent } from '@/misc/fetch'; // RsaSignature2017 based from https://github.com/transmute-industries/RsaSignature2017 diff --git a/src/remote/activitypub/models/image.ts b/src/remote/activitypub/models/image.ts index ea2584407a..cd28d59a16 100644 --- a/src/remote/activitypub/models/image.ts +++ b/src/remote/activitypub/models/image.ts @@ -1,10 +1,10 @@ -import uploadFromUrl from '@/services/drive/upload-from-url.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import Resolver from '../resolver.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { apLogger } from '../logger.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { DriveFiles } from '@/models/index.js'; +import uploadFromUrl from '@/services/drive/upload-from-url'; +import { IRemoteUser } from '@/models/entities/user'; +import Resolver from '../resolver'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { apLogger } from '../logger'; +import { DriveFile } from '@/models/entities/drive-file'; +import { DriveFiles } from '@/models/index'; const logger = apLogger; diff --git a/src/remote/activitypub/models/mention.ts b/src/remote/activitypub/models/mention.ts index e84429815d..0db0324aba 100644 --- a/src/remote/activitypub/models/mention.ts +++ b/src/remote/activitypub/models/mention.ts @@ -1,9 +1,9 @@ -import { toArray, unique } from '../../../prelude/array.js'; -import { IObject, isMention, IApMention } from '../type.js'; -import { resolvePerson } from './person.js'; +import { toArray, unique } from '../../../prelude/array'; +import { IObject, isMention, IApMention } from '../type'; +import { resolvePerson } from './person'; import * as promiseLimit from 'promise-limit'; -import Resolver from '../resolver.js'; -import { User } from '@/models/entities/user.js'; +import Resolver from '../resolver'; +import { User } from '@/models/entities/user'; export async function extractApMentions(tags: IObject | IObject[] | null | undefined) { const hrefs = unique(extractApMentionObjects(tags).map(x => x.href as string)); diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 2a4f51bb3b..d28d642a0a 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -1,31 +1,31 @@ import * as promiseLimit from 'promise-limit'; -import config from '@/config/index.js'; -import Resolver from '../resolver.js'; -import post from '@/services/note/create.js'; -import { resolvePerson, updatePerson } from './person.js'; -import { resolveImage } from './image.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { htmlToMfm } from '../misc/html-to-mfm.js'; -import { extractApHashtags } from './tag.js'; -import { unique, toArray, toSingle } from '../../../prelude/array.js'; -import { extractPollFromQuestion } from './question.js'; -import vote from '@/services/note/polls/vote.js'; -import { apLogger } from '../logger.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { deliverQuestionUpdate } from '@/services/note/polls/update.js'; -import { extractDbHost, toPuny } from '@/misc/convert-host.js'; -import { Emojis, Polls, MessagingMessages } from '@/models/index.js'; -import { Note } from '@/models/entities/note.js'; -import { IObject, getOneApId, getApId, getOneApHrefNullable, validPost, IPost, isEmoji, getApType } from '../type.js'; -import { Emoji } from '@/models/entities/emoji.js'; -import { genId } from '@/misc/gen-id.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { getApLock } from '@/misc/app-lock.js'; -import { createMessage } from '@/services/messages/create.js'; -import { parseAudience } from '../audience.js'; -import { extractApMentions } from './mention.js'; -import DbResolver from '../db-resolver.js'; +import config from '@/config/index'; +import Resolver from '../resolver'; +import post from '@/services/note/create'; +import { resolvePerson, updatePerson } from './person'; +import { resolveImage } from './image'; +import { IRemoteUser } from '@/models/entities/user'; +import { htmlToMfm } from '../misc/html-to-mfm'; +import { extractApHashtags } from './tag'; +import { unique, toArray, toSingle } from '../../../prelude/array'; +import { extractPollFromQuestion } from './question'; +import vote from '@/services/note/polls/vote'; +import { apLogger } from '../logger'; +import { DriveFile } from '@/models/entities/drive-file'; +import { deliverQuestionUpdate } from '@/services/note/polls/update'; +import { extractDbHost, toPuny } from '@/misc/convert-host'; +import { Emojis, Polls, MessagingMessages } from '@/models/index'; +import { Note } from '@/models/entities/note'; +import { IObject, getOneApId, getApId, getOneApHrefNullable, validPost, IPost, isEmoji, getApType } from '../type'; +import { Emoji } from '@/models/entities/emoji'; +import { genId } from '@/misc/gen-id'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { getApLock } from '@/misc/app-lock'; +import { createMessage } from '@/services/messages/create'; +import { parseAudience } from '../audience'; +import { extractApMentions } from './mention'; +import DbResolver from '../db-resolver'; const logger = apLogger; diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 2b7d707ac8..3ae13135e3 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -2,32 +2,32 @@ import { URL } from 'url'; import * as promiseLimit from 'promise-limit'; import $, { Context } from 'cafy'; -import config from '@/config/index.js'; -import Resolver from '../resolver.js'; -import { resolveImage } from './image.js'; -import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue, getApType, isActor } from '../type.js'; -import { fromHtml } from '../../../mfm/from-html.js'; -import { htmlToMfm } from '../misc/html-to-mfm.js'; -import { resolveNote, extractEmojis } from './note.js'; -import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; -import { extractApHashtags } from './tag.js'; -import { apLogger } from '../logger.js'; -import { Note } from '@/models/entities/note.js'; -import { updateUsertags } from '@/services/update-hashtag.js'; -import { Users, Instances, DriveFiles, Followings, UserProfiles, UserPublickeys } from '@/models/index.js'; -import { User, IRemoteUser } from '@/models/entities/user.js'; -import { Emoji } from '@/models/entities/emoji.js'; -import { UserNotePining } from '@/models/entities/user-note-pining.js'; -import { genId } from '@/misc/gen-id.js'; -import { instanceChart, usersChart } from '@/services/chart/index.js'; -import { UserPublickey } from '@/models/entities/user-publickey.js'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; -import { toPuny } from '@/misc/convert-host.js'; -import { UserProfile } from '@/models/entities/user-profile.js'; +import config from '@/config/index'; +import Resolver from '../resolver'; +import { resolveImage } from './image'; +import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue, getApType, isActor } from '../type'; +import { fromHtml } from '../../../mfm/from-html'; +import { htmlToMfm } from '../misc/html-to-mfm'; +import { resolveNote, extractEmojis } from './note'; +import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc'; +import { extractApHashtags } from './tag'; +import { apLogger } from '../logger'; +import { Note } from '@/models/entities/note'; +import { updateUsertags } from '@/services/update-hashtag'; +import { Users, Instances, DriveFiles, Followings, UserProfiles, UserPublickeys } from '@/models/index'; +import { User, IRemoteUser } from '@/models/entities/user'; +import { Emoji } from '@/models/entities/emoji'; +import { UserNotePining } from '@/models/entities/user-note-pining'; +import { genId } from '@/misc/gen-id'; +import { instanceChart, usersChart } from '@/services/chart/index'; +import { UserPublickey } from '@/models/entities/user-publickey'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; +import { toPuny } from '@/misc/convert-host'; +import { UserProfile } from '@/models/entities/user-profile'; import { getConnection } from 'typeorm'; -import { toArray } from '../../../prelude/array.js'; -import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import { toArray } from '../../../prelude/array'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; const logger = apLogger; diff --git a/src/remote/activitypub/models/question.ts b/src/remote/activitypub/models/question.ts index f954a38e8b..79f93c3a30 100644 --- a/src/remote/activitypub/models/question.ts +++ b/src/remote/activitypub/models/question.ts @@ -1,9 +1,9 @@ -import config from '@/config/index.js'; -import Resolver from '../resolver.js'; -import { IObject, IQuestion, isQuestion, } from '../type.js'; -import { apLogger } from '../logger.js'; -import { Notes, Polls } from '@/models/index.js'; -import { IPoll } from '@/models/entities/poll.js'; +import config from '@/config/index'; +import Resolver from '../resolver'; +import { IObject, IQuestion, isQuestion, } from '../type'; +import { apLogger } from '../logger'; +import { Notes, Polls } from '@/models/index'; +import { IPoll } from '@/models/entities/poll'; export async function extractPollFromQuestion(source: string | IObject, resolver?: Resolver): Promise { if (resolver == null) resolver = new Resolver(); diff --git a/src/remote/activitypub/models/tag.ts b/src/remote/activitypub/models/tag.ts index cb8c753365..d25cb463fe 100644 --- a/src/remote/activitypub/models/tag.ts +++ b/src/remote/activitypub/models/tag.ts @@ -1,5 +1,5 @@ -import { toArray } from '../../../prelude/array.js'; -import { IObject, isHashtag, IApHashtag } from '../type.js'; +import { toArray } from '../../../prelude/array'; +import { IObject, isHashtag, IApHashtag } from '../type'; export function extractApHashtags(tags: IObject | IObject[] | null | undefined) { if (tags == null) return []; diff --git a/src/remote/activitypub/perform.ts b/src/remote/activitypub/perform.ts index 3e18815586..01f0e3676e 100644 --- a/src/remote/activitypub/perform.ts +++ b/src/remote/activitypub/perform.ts @@ -1,6 +1,6 @@ -import { IObject } from './type.js'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { performActivity } from './kernel/index.js'; +import { IObject } from './type'; +import { IRemoteUser } from '@/models/entities/user'; +import { performActivity } from './kernel/index'; export default async (actor: IRemoteUser, activity: IObject): Promise => { await performActivity(actor, activity); diff --git a/src/remote/activitypub/renderer/accept.ts b/src/remote/activitypub/renderer/accept.ts index f1037e95f2..f1e61f4c6a 100644 --- a/src/remote/activitypub/renderer/accept.ts +++ b/src/remote/activitypub/renderer/accept.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; export default (object: any, user: { id: User['id']; host: null }) => ({ type: 'Accept', diff --git a/src/remote/activitypub/renderer/add.ts b/src/remote/activitypub/renderer/add.ts index fce541bcdc..21414a9380 100644 --- a/src/remote/activitypub/renderer/add.ts +++ b/src/remote/activitypub/renderer/add.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { ILocalUser } from '@/models/entities/user'; export default (user: ILocalUser, target: any, object: any) => ({ type: 'Add', diff --git a/src/remote/activitypub/renderer/announce.ts b/src/remote/activitypub/renderer/announce.ts index dfbe4714c9..7bf90922be 100644 --- a/src/remote/activitypub/renderer/announce.ts +++ b/src/remote/activitypub/renderer/announce.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { Note } from '@/models/entities/note.js'; +import config from '@/config/index'; +import { Note } from '@/models/entities/note'; export default (object: any, note: Note) => { const attributedTo = `${config.url}/users/${note.userId}`; diff --git a/src/remote/activitypub/renderer/block.ts b/src/remote/activitypub/renderer/block.ts index 4e9102e6f0..bb3d74295a 100644 --- a/src/remote/activitypub/renderer/block.ts +++ b/src/remote/activitypub/renderer/block.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { ILocalUser, IRemoteUser } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { ILocalUser, IRemoteUser } from '@/models/entities/user'; export default (blocker: ILocalUser, blockee: IRemoteUser) => ({ type: 'Block', diff --git a/src/remote/activitypub/renderer/create.ts b/src/remote/activitypub/renderer/create.ts index 103ce4bfd5..04aa993a91 100644 --- a/src/remote/activitypub/renderer/create.ts +++ b/src/remote/activitypub/renderer/create.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { Note } from '@/models/entities/note.js'; +import config from '@/config/index'; +import { Note } from '@/models/entities/note'; export default (object: any, note: Note) => { const activity = { diff --git a/src/remote/activitypub/renderer/delete.ts b/src/remote/activitypub/renderer/delete.ts index 159a486e08..83b27fa866 100644 --- a/src/remote/activitypub/renderer/delete.ts +++ b/src/remote/activitypub/renderer/delete.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; export default (object: any, user: { id: User['id']; host: null }) => ({ type: 'Delete', diff --git a/src/remote/activitypub/renderer/document.ts b/src/remote/activitypub/renderer/document.ts index c973de4c4c..a9d86dea15 100644 --- a/src/remote/activitypub/renderer/document.ts +++ b/src/remote/activitypub/renderer/document.ts @@ -1,5 +1,5 @@ -import { DriveFile } from '@/models/entities/drive-file.js'; -import { DriveFiles } from '@/models/index.js'; +import { DriveFile } from '@/models/entities/drive-file'; +import { DriveFiles } from '@/models/index'; export default (file: DriveFile) => ({ type: 'Document', diff --git a/src/remote/activitypub/renderer/emoji.ts b/src/remote/activitypub/renderer/emoji.ts index a58c0c1ad9..ca514c56b5 100644 --- a/src/remote/activitypub/renderer/emoji.ts +++ b/src/remote/activitypub/renderer/emoji.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { Emoji } from '@/models/entities/emoji.js'; +import config from '@/config/index'; +import { Emoji } from '@/models/entities/emoji'; export default (emoji: Emoji) => ({ id: `${config.url}/emojis/${emoji.name}`, diff --git a/src/remote/activitypub/renderer/follow-relay.ts b/src/remote/activitypub/renderer/follow-relay.ts index 4340b70537..984c3c7639 100644 --- a/src/remote/activitypub/renderer/follow-relay.ts +++ b/src/remote/activitypub/renderer/follow-relay.ts @@ -1,6 +1,6 @@ -import config from '@/config/index.js'; -import { Relay } from '@/models/entities/relay.js'; -import { ILocalUser } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { Relay } from '@/models/entities/relay'; +import { ILocalUser } from '@/models/entities/user'; export function renderFollowRelay(relay: Relay, relayActor: ILocalUser) { const follow = { diff --git a/src/remote/activitypub/renderer/follow-user.ts b/src/remote/activitypub/renderer/follow-user.ts index ad1d63b933..e3dde7f7fe 100644 --- a/src/remote/activitypub/renderer/follow-user.ts +++ b/src/remote/activitypub/renderer/follow-user.ts @@ -1,6 +1,6 @@ -import config from '@/config/index.js'; -import { Users } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { Users } from '@/models/index'; +import { User } from '@/models/entities/user'; /** * Convert (local|remote)(Follower|Followee)ID to URL diff --git a/src/remote/activitypub/renderer/follow.ts b/src/remote/activitypub/renderer/follow.ts index 9f80bf829b..c8a7946799 100644 --- a/src/remote/activitypub/renderer/follow.ts +++ b/src/remote/activitypub/renderer/follow.ts @@ -1,6 +1,6 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; -import { Users } from '@/models/index.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; +import { Users } from '@/models/index'; export default (follower: { id: User['id']; host: User['host']; uri: User['host'] }, followee: { id: User['id']; host: User['host']; uri: User['host'] }, requestId?: string) => { const follow = { diff --git a/src/remote/activitypub/renderer/hashtag.ts b/src/remote/activitypub/renderer/hashtag.ts index faa0efe924..290c74c7fe 100644 --- a/src/remote/activitypub/renderer/hashtag.ts +++ b/src/remote/activitypub/renderer/hashtag.ts @@ -1,4 +1,4 @@ -import config from '@/config/index.js'; +import config from '@/config/index'; export default (tag: string) => ({ type: 'Hashtag', diff --git a/src/remote/activitypub/renderer/image.ts b/src/remote/activitypub/renderer/image.ts index 6440248a4a..0cb3d6ed65 100644 --- a/src/remote/activitypub/renderer/image.ts +++ b/src/remote/activitypub/renderer/image.ts @@ -1,5 +1,5 @@ -import { DriveFile } from '@/models/entities/drive-file.js'; -import { DriveFiles } from '@/models/index.js'; +import { DriveFile } from '@/models/entities/drive-file'; +import { DriveFiles } from '@/models/index'; export default (file: DriveFile) => ({ type: 'Image', diff --git a/src/remote/activitypub/renderer/index.ts b/src/remote/activitypub/renderer/index.ts index 5ab5b1cdbe..f6ec6583d0 100644 --- a/src/remote/activitypub/renderer/index.ts +++ b/src/remote/activitypub/renderer/index.ts @@ -1,9 +1,9 @@ -import config from '@/config/index.js'; +import config from '@/config/index'; import { v4 as uuid } from 'uuid'; -import { IActivity } from '../type.js'; -import { LdSignature } from '../misc/ld-signature.js'; -import { getUserKeypair } from '@/misc/keypair-store.js'; -import { User } from '@/models/entities/user.js'; +import { IActivity } from '../type'; +import { LdSignature } from '../misc/ld-signature'; +import { getUserKeypair } from '@/misc/keypair-store'; +import { User } from '@/models/entities/user'; export const renderActivity = (x: any): IActivity | null => { if (x == null) return null; diff --git a/src/remote/activitypub/renderer/key.ts b/src/remote/activitypub/renderer/key.ts index 4db1d83262..992f98d79a 100644 --- a/src/remote/activitypub/renderer/key.ts +++ b/src/remote/activitypub/renderer/key.ts @@ -1,6 +1,6 @@ -import config from '@/config/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; -import { UserKeypair } from '@/models/entities/user-keypair.js'; +import config from '@/config/index'; +import { ILocalUser } from '@/models/entities/user'; +import { UserKeypair } from '@/models/entities/user-keypair'; import { createPublicKey } from 'crypto'; export default (user: ILocalUser, key: UserKeypair, postfix?: string) => ({ diff --git a/src/remote/activitypub/renderer/like.ts b/src/remote/activitypub/renderer/like.ts index 6ec0bfb034..a7e79a176f 100644 --- a/src/remote/activitypub/renderer/like.ts +++ b/src/remote/activitypub/renderer/like.ts @@ -1,8 +1,8 @@ -import config from '@/config/index.js'; -import { NoteReaction } from '@/models/entities/note-reaction.js'; -import { Note } from '@/models/entities/note.js'; -import { Emojis } from '@/models/index.js'; -import renderEmoji from './emoji.js'; +import config from '@/config/index'; +import { NoteReaction } from '@/models/entities/note-reaction'; +import { Note } from '@/models/entities/note'; +import { Emojis } from '@/models/index'; +import renderEmoji from './emoji'; export const renderLike = async (noteReaction: NoteReaction, note: Note) => { const reaction = noteReaction.reaction; diff --git a/src/remote/activitypub/renderer/mention.ts b/src/remote/activitypub/renderer/mention.ts index c7e62e8840..06d2d33e59 100644 --- a/src/remote/activitypub/renderer/mention.ts +++ b/src/remote/activitypub/renderer/mention.ts @@ -1,6 +1,6 @@ -import config from '@/config/index.js'; -import { User, ILocalUser } from '@/models/entities/user.js'; -import { Users } from '@/models/index.js'; +import config from '@/config/index'; +import { User, ILocalUser } from '@/models/entities/user'; +import { Users } from '@/models/index'; export default (mention: User) => ({ type: 'Mention', diff --git a/src/remote/activitypub/renderer/note.ts b/src/remote/activitypub/renderer/note.ts index 0f4513fca7..84a1786784 100644 --- a/src/remote/activitypub/renderer/note.ts +++ b/src/remote/activitypub/renderer/note.ts @@ -1,15 +1,15 @@ -import renderDocument from './document.js'; -import renderHashtag from './hashtag.js'; -import renderMention from './mention.js'; -import renderEmoji from './emoji.js'; -import config from '@/config/index.js'; -import toHtml from '../misc/get-note-html.js'; -import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { DriveFiles, Notes, Users, Emojis, Polls } from '@/models/index.js'; +import renderDocument from './document'; +import renderHashtag from './hashtag'; +import renderMention from './mention'; +import renderEmoji from './emoji'; +import config from '@/config/index'; +import toHtml from '../misc/get-note-html'; +import { Note, IMentionedRemoteUsers } from '@/models/entities/note'; +import { DriveFile } from '@/models/entities/drive-file'; +import { DriveFiles, Notes, Users, Emojis, Polls } from '@/models/index'; import { In } from 'typeorm'; -import { Emoji } from '@/models/entities/emoji.js'; -import { Poll } from '@/models/entities/poll.js'; +import { Emoji } from '@/models/entities/emoji'; +import { Poll } from '@/models/entities/poll'; export default async function renderNote(note: Note, dive = true, isTalk = false): Promise { const getPromisedFiles = async (ids: string[]) => { diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts index edcb68ef6a..f2a283a870 100644 --- a/src/remote/activitypub/renderer/person.ts +++ b/src/remote/activitypub/renderer/person.ts @@ -1,16 +1,16 @@ import { URL } from 'url'; import * as mfm from 'mfm-js'; -import renderImage from './image.js'; -import renderKey from './key.js'; -import config from '@/config/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; -import { toHtml } from '../../../mfm/to-html.js'; -import { getEmojis } from './note.js'; -import renderEmoji from './emoji.js'; -import { IIdentifier } from '../models/identifier.js'; -import renderHashtag from './hashtag.js'; -import { DriveFiles, UserProfiles } from '@/models/index.js'; -import { getUserKeypair } from '@/misc/keypair-store.js'; +import renderImage from './image'; +import renderKey from './key'; +import config from '@/config/index'; +import { ILocalUser } from '@/models/entities/user'; +import { toHtml } from '../../../mfm/to-html'; +import { getEmojis } from './note'; +import renderEmoji from './emoji'; +import { IIdentifier } from '../models/identifier'; +import renderHashtag from './hashtag'; +import { DriveFiles, UserProfiles } from '@/models/index'; +import { getUserKeypair } from '@/misc/keypair-store'; export async function renderPerson(user: ILocalUser) { const id = `${config.url}/users/${user.id}`; diff --git a/src/remote/activitypub/renderer/question.ts b/src/remote/activitypub/renderer/question.ts index 388398a7d8..246d599bab 100644 --- a/src/remote/activitypub/renderer/question.ts +++ b/src/remote/activitypub/renderer/question.ts @@ -1,7 +1,7 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { Poll } from '@/models/entities/poll.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { Poll } from '@/models/entities/poll'; export default async function renderQuestion(user: { id: User['id'] }, note: Note, poll: Poll) { const question = { diff --git a/src/remote/activitypub/renderer/read.ts b/src/remote/activitypub/renderer/read.ts index 39a852fcb5..95357f64d3 100644 --- a/src/remote/activitypub/renderer/read.ts +++ b/src/remote/activitypub/renderer/read.ts @@ -1,6 +1,6 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; -import { MessagingMessage } from '@/models/entities/messaging-message.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; +import { MessagingMessage } from '@/models/entities/messaging-message'; export const renderReadActivity = (user: { id: User['id'] }, message: MessagingMessage) => ({ type: 'Read', diff --git a/src/remote/activitypub/renderer/reject.ts b/src/remote/activitypub/renderer/reject.ts index 474b67d680..42beffecf2 100644 --- a/src/remote/activitypub/renderer/reject.ts +++ b/src/remote/activitypub/renderer/reject.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; export default (object: any, user: { id: User['id'] }) => ({ type: 'Reject', diff --git a/src/remote/activitypub/renderer/remove.ts b/src/remote/activitypub/renderer/remove.ts index 1f6bc19404..79d60edbaa 100644 --- a/src/remote/activitypub/renderer/remove.ts +++ b/src/remote/activitypub/renderer/remove.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; export default (user: { id: User['id'] }, target: any, object: any) => ({ type: 'Remove', diff --git a/src/remote/activitypub/renderer/undo.ts b/src/remote/activitypub/renderer/undo.ts index 968d59fae6..f9082ffdfc 100644 --- a/src/remote/activitypub/renderer/undo.ts +++ b/src/remote/activitypub/renderer/undo.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { ILocalUser, User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { ILocalUser, User } from '@/models/entities/user'; export default (object: any, user: { id: User['id'] }) => { if (object == null) return null; diff --git a/src/remote/activitypub/renderer/update.ts b/src/remote/activitypub/renderer/update.ts index c696a9c34b..d9a8149af3 100644 --- a/src/remote/activitypub/renderer/update.ts +++ b/src/remote/activitypub/renderer/update.ts @@ -1,5 +1,5 @@ -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; export default (object: any, user: { id: User['id'] }) => { const activity = { diff --git a/src/remote/activitypub/renderer/vote.ts b/src/remote/activitypub/renderer/vote.ts index 201845a189..ff038070f7 100644 --- a/src/remote/activitypub/renderer/vote.ts +++ b/src/remote/activitypub/renderer/vote.ts @@ -1,8 +1,8 @@ -import config from '@/config/index.js'; -import { Note } from '@/models/entities/note.js'; -import { IRemoteUser, User } from '@/models/entities/user.js'; -import { PollVote } from '@/models/entities/poll-vote.js'; -import { Poll } from '@/models/entities/poll.js'; +import config from '@/config/index'; +import { Note } from '@/models/entities/note'; +import { IRemoteUser, User } from '@/models/entities/user'; +import { PollVote } from '@/models/entities/poll-vote'; +import { Poll } from '@/models/entities/poll'; export default async function renderVote(user: { id: User['id'] }, vote: PollVote, note: Note, poll: Poll, pollOwner: IRemoteUser): Promise { return { diff --git a/src/remote/activitypub/request.ts b/src/remote/activitypub/request.ts index 2711c85874..fe1009243c 100644 --- a/src/remote/activitypub/request.ts +++ b/src/remote/activitypub/request.ts @@ -3,13 +3,13 @@ import * as https from 'https'; import { sign } from 'http-signature'; import * as crypto from 'crypto'; -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; -import { getAgentByUrl } from '@/misc/fetch.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; +import { getAgentByUrl } from '@/misc/fetch'; import { URL } from 'url'; import got from 'got'; import * as Got from 'got'; -import { getUserKeypair } from '@/misc/keypair-store.js'; +import { getUserKeypair } from '@/misc/keypair-store'; export default async (user: { id: User['id'] }, url: string, object: any) => { const timeout = 10 * 1000; diff --git a/src/remote/activitypub/resolver.ts b/src/remote/activitypub/resolver.ts index 8351058312..32f3d9ef26 100644 --- a/src/remote/activitypub/resolver.ts +++ b/src/remote/activitypub/resolver.ts @@ -1,9 +1,9 @@ -import config from '@/config/index.js'; -import { getJson } from '@/misc/fetch.js'; -import { ILocalUser } from '@/models/entities/user.js'; -import { getInstanceActor } from '@/services/instance-actor.js'; -import { signedGet } from './request.js'; -import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type.js'; +import config from '@/config/index'; +import { getJson } from '@/misc/fetch'; +import { ILocalUser } from '@/models/entities/user'; +import { getInstanceActor } from '@/services/instance-actor'; +import { signedGet } from './request'; +import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type'; export default class Resolver { private history: Set; diff --git a/src/remote/logger.ts b/src/remote/logger.ts index 4921f53bd8..9ffad4d716 100644 --- a/src/remote/logger.ts +++ b/src/remote/logger.ts @@ -1,3 +1,3 @@ -import Logger from '@/services/logger.js'; +import Logger from '@/services/logger'; export const remoteLogger = new Logger('remote', 'cyan'); diff --git a/src/remote/resolve-user.ts b/src/remote/resolve-user.ts index 1869204399..a12396abc8 100644 --- a/src/remote/resolve-user.ts +++ b/src/remote/resolve-user.ts @@ -1,12 +1,12 @@ import { URL } from 'url'; -import webFinger from './webfinger.js'; -import config from '@/config/index.js'; -import { createPerson, updatePerson } from './activitypub/models/person.js'; -import { remoteLogger } from './logger.js'; +import webFinger from './webfinger'; +import config from '@/config/index'; +import { createPerson, updatePerson } from './activitypub/models/person'; +import { remoteLogger } from './logger'; import * as chalk from 'chalk'; -import { User, IRemoteUser } from '@/models/entities/user.js'; -import { Users } from '@/models/index.js'; -import { toPuny } from '@/misc/convert-host.js'; +import { User, IRemoteUser } from '@/models/entities/user'; +import { Users } from '@/models/index'; +import { toPuny } from '@/misc/convert-host'; const logger = remoteLogger.createSubLogger('resolve-user'); diff --git a/src/remote/webfinger.ts b/src/remote/webfinger.ts index e885e9d7cb..744ab3639a 100644 --- a/src/remote/webfinger.ts +++ b/src/remote/webfinger.ts @@ -1,6 +1,6 @@ import { URL } from 'url'; -import { getJson } from '@/misc/fetch.js'; -import { query as urlQuery } from '../prelude/url.js'; +import { getJson } from '@/misc/fetch'; +import { query as urlQuery } from '../prelude/url'; type ILink = { href: string; diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts index 834293a5a7..eabe681136 100644 --- a/src/server/activitypub.ts +++ b/src/server/activitypub.ts @@ -2,22 +2,22 @@ import * as Router from '@koa/router'; import * as json from 'koa-json-body'; import * as httpSignature from 'http-signature'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderNote from '@/remote/activitypub/renderer/note.js'; -import renderKey from '@/remote/activitypub/renderer/key.js'; -import { renderPerson } from '@/remote/activitypub/renderer/person.js'; -import renderEmoji from '@/remote/activitypub/renderer/emoji.js'; -import Outbox, { packActivity } from './activitypub/outbox.js'; -import Followers from './activitypub/followers.js'; -import Following from './activitypub/following.js'; -import Featured from './activitypub/featured.js'; -import { inbox as processInbox } from '@/queue/index.js'; -import { isSelfHost } from '@/misc/convert-host.js'; -import { Notes, Users, Emojis, NoteReactions } from '@/models/index.js'; -import { ILocalUser, User } from '@/models/entities/user.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderNote from '@/remote/activitypub/renderer/note'; +import renderKey from '@/remote/activitypub/renderer/key'; +import { renderPerson } from '@/remote/activitypub/renderer/person'; +import renderEmoji from '@/remote/activitypub/renderer/emoji'; +import Outbox, { packActivity } from './activitypub/outbox'; +import Followers from './activitypub/followers'; +import Following from './activitypub/following'; +import Featured from './activitypub/featured'; +import { inbox as processInbox } from '@/queue/index'; +import { isSelfHost } from '@/misc/convert-host'; +import { Notes, Users, Emojis, NoteReactions } from '@/models/index'; +import { ILocalUser, User } from '@/models/entities/user'; import { In } from 'typeorm'; -import { renderLike } from '@/remote/activitypub/renderer/like.js'; -import { getUserKeypair } from '@/misc/keypair-store.js'; +import { renderLike } from '@/remote/activitypub/renderer/like'; +import { getUserKeypair } from '@/misc/keypair-store'; // Init router const router = new Router(); diff --git a/src/server/activitypub/featured.ts b/src/server/activitypub/featured.ts index 69de201137..1598cc680f 100644 --- a/src/server/activitypub/featured.ts +++ b/src/server/activitypub/featured.ts @@ -1,10 +1,10 @@ import * as Router from '@koa/router'; -import config from '@/config/index.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; -import { setResponseType } from '../activitypub.js'; -import renderNote from '@/remote/activitypub/renderer/note.js'; -import { Users, Notes, UserNotePinings } from '@/models/index.js'; +import config from '@/config/index'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection'; +import { setResponseType } from '../activitypub'; +import renderNote from '@/remote/activitypub/renderer/note'; +import { Users, Notes, UserNotePinings } from '@/models/index'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; diff --git a/src/server/activitypub/followers.ts b/src/server/activitypub/followers.ts index 13a3ae91ad..0fad6b13c1 100644 --- a/src/server/activitypub/followers.ts +++ b/src/server/activitypub/followers.ts @@ -1,14 +1,14 @@ import * as Router from '@koa/router'; -import config from '@/config/index.js'; +import config from '@/config/index'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import * as url from '../../prelude/url.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; -import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; -import renderFollowUser from '@/remote/activitypub/renderer/follow-user.js'; -import { setResponseType } from '../activitypub.js'; -import { Users, Followings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import * as url from '../../prelude/url'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection'; +import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page'; +import renderFollowUser from '@/remote/activitypub/renderer/follow-user'; +import { setResponseType } from '../activitypub'; +import { Users, Followings } from '@/models/index'; import { LessThan } from 'typeorm'; export default async (ctx: Router.RouterContext) => { diff --git a/src/server/activitypub/following.ts b/src/server/activitypub/following.ts index 1f7938bec4..e7316d3e4d 100644 --- a/src/server/activitypub/following.ts +++ b/src/server/activitypub/following.ts @@ -1,16 +1,16 @@ import * as Router from '@koa/router'; -import config from '@/config/index.js'; +import config from '@/config/index'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import * as url from '../../prelude/url.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; -import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; -import renderFollowUser from '@/remote/activitypub/renderer/follow-user.js'; -import { setResponseType } from '../activitypub.js'; -import { Users, Followings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import * as url from '../../prelude/url'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection'; +import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page'; +import renderFollowUser from '@/remote/activitypub/renderer/follow-user'; +import { setResponseType } from '../activitypub'; +import { Users, Followings } from '@/models/index'; import { LessThan, FindConditions } from 'typeorm'; -import { Following } from '@/models/entities/following.js'; +import { Following } from '@/models/entities/following'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; diff --git a/src/server/activitypub/outbox.ts b/src/server/activitypub/outbox.ts index eed489e59d..c6cf10de5e 100644 --- a/src/server/activitypub/outbox.ts +++ b/src/server/activitypub/outbox.ts @@ -1,20 +1,20 @@ import * as Router from '@koa/router'; -import config from '@/config/index.js'; +import config from '@/config/index'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; -import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; -import { setResponseType } from '../activitypub.js'; -import renderNote from '@/remote/activitypub/renderer/note.js'; -import renderCreate from '@/remote/activitypub/renderer/create.js'; -import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; -import { countIf } from '../../prelude/array.js'; -import * as url from '../../prelude/url.js'; -import { Users, Notes } from '@/models/index.js'; -import { makePaginationQuery } from '../api/common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection'; +import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page'; +import { setResponseType } from '../activitypub'; +import renderNote from '@/remote/activitypub/renderer/note'; +import renderCreate from '@/remote/activitypub/renderer/create'; +import renderAnnounce from '@/remote/activitypub/renderer/announce'; +import { countIf } from '../../prelude/array'; +import * as url from '../../prelude/url'; +import { Users, Notes } from '@/models/index'; +import { makePaginationQuery } from '../api/common/make-pagination-query'; import { Brackets } from 'typeorm'; -import { Note } from '@/models/entities/note.js'; +import { Note } from '@/models/entities/note'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; diff --git a/src/server/api/2fa.ts b/src/server/api/2fa.ts index ee92caf55a..117446383d 100644 --- a/src/server/api/2fa.ts +++ b/src/server/api/2fa.ts @@ -1,5 +1,5 @@ import * as crypto from 'crypto'; -import config from '@/config/index.js'; +import config from '@/config/index'; import * as jsrsasign from 'jsrsasign'; const ECC_PRELUDE = Buffer.from([0x04]); diff --git a/src/server/api/api-handler.ts b/src/server/api/api-handler.ts index e2660d7b6f..cbace8917e 100644 --- a/src/server/api/api-handler.ts +++ b/src/server/api/api-handler.ts @@ -1,9 +1,9 @@ import * as Koa from 'koa'; -import { IEndpoint } from './endpoints.js'; -import authenticate, { AuthenticationError } from './authenticate.js'; -import call from './call.js'; -import { ApiError } from './error.js'; +import { IEndpoint } from './endpoints'; +import authenticate, { AuthenticationError } from './authenticate'; +import call from './call'; +import { ApiError } from './error'; export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise((res) => { const body = ctx.request.body; diff --git a/src/server/api/authenticate.ts b/src/server/api/authenticate.ts index cd5b01cd51..b8e216edc4 100644 --- a/src/server/api/authenticate.ts +++ b/src/server/api/authenticate.ts @@ -1,7 +1,7 @@ -import isNativeToken from './common/is-native-token.js'; -import { User } from '@/models/entities/user.js'; -import { Users, AccessTokens, Apps } from '@/models/index.js'; -import { AccessToken } from '@/models/entities/access-token.js'; +import isNativeToken from './common/is-native-token'; +import { User } from '@/models/entities/user'; +import { Users, AccessTokens, Apps } from '@/models/index'; +import { AccessToken } from '@/models/entities/access-token'; export class AuthenticationError extends Error { constructor(message: string) { diff --git a/src/server/api/call.ts b/src/server/api/call.ts index 899a5a6c72..2768bde07e 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -1,10 +1,10 @@ import { performance } from 'perf_hooks'; -import limiter from './limiter.js'; -import { User } from '@/models/entities/user.js'; -import endpoints from './endpoints.js'; -import { ApiError } from './error.js'; -import { apiLogger } from './logger.js'; -import { AccessToken } from '@/models/entities/access-token.js'; +import limiter from './limiter'; +import { User } from '@/models/entities/user'; +import endpoints from './endpoints'; +import { ApiError } from './error'; +import { apiLogger } from './logger'; +import { AccessToken } from '@/models/entities/access-token'; const accessDenied = { message: 'Access denied.', diff --git a/src/server/api/common/generate-block-query.ts b/src/server/api/common/generate-block-query.ts index 60db1e731b..4fd6184738 100644 --- a/src/server/api/common/generate-block-query.ts +++ b/src/server/api/common/generate-block-query.ts @@ -1,5 +1,5 @@ -import { User } from '@/models/entities/user.js'; -import { Blockings } from '@/models/index.js'; +import { User } from '@/models/entities/user'; +import { Blockings } from '@/models/index'; import { Brackets, SelectQueryBuilder } from 'typeorm'; // ここでいうBlockedは被Blockedの意 diff --git a/src/server/api/common/generate-channel-query.ts b/src/server/api/common/generate-channel-query.ts index 333bb73b86..80a0acf7f9 100644 --- a/src/server/api/common/generate-channel-query.ts +++ b/src/server/api/common/generate-channel-query.ts @@ -1,5 +1,5 @@ -import { User } from '@/models/entities/user.js'; -import { ChannelFollowings } from '@/models/index.js'; +import { User } from '@/models/entities/user'; +import { ChannelFollowings } from '@/models/index'; import { Brackets, SelectQueryBuilder } from 'typeorm'; export function generateChannelQuery(q: SelectQueryBuilder, me?: { id: User['id'] } | null) { diff --git a/src/server/api/common/generate-muted-note-query.ts b/src/server/api/common/generate-muted-note-query.ts index f544e334d3..0737842613 100644 --- a/src/server/api/common/generate-muted-note-query.ts +++ b/src/server/api/common/generate-muted-note-query.ts @@ -1,5 +1,5 @@ -import { User } from '@/models/entities/user.js'; -import { MutedNotes } from '@/models/index.js'; +import { User } from '@/models/entities/user'; +import { MutedNotes } from '@/models/index'; import { SelectQueryBuilder } from 'typeorm'; export function generateMutedNoteQuery(q: SelectQueryBuilder, me: { id: User['id'] }) { diff --git a/src/server/api/common/generate-muted-user-query.ts b/src/server/api/common/generate-muted-user-query.ts index 79cb3ff894..7e200b87ef 100644 --- a/src/server/api/common/generate-muted-user-query.ts +++ b/src/server/api/common/generate-muted-user-query.ts @@ -1,5 +1,5 @@ -import { User } from '@/models/entities/user.js'; -import { Mutings } from '@/models/index.js'; +import { User } from '@/models/entities/user'; +import { Mutings } from '@/models/index'; import { SelectQueryBuilder, Brackets } from 'typeorm'; export function generateMutedUserQuery(q: SelectQueryBuilder, me: { id: User['id'] }, exclude?: User) { diff --git a/src/server/api/common/generate-native-user-token.ts b/src/server/api/common/generate-native-user-token.ts index 5d8a4c5378..1f791c57ce 100644 --- a/src/server/api/common/generate-native-user-token.ts +++ b/src/server/api/common/generate-native-user-token.ts @@ -1,3 +1,3 @@ -import { secureRndstr } from '@/misc/secure-rndstr.js'; +import { secureRndstr } from '@/misc/secure-rndstr'; export default () => secureRndstr(16, true); diff --git a/src/server/api/common/generate-replies-query.ts b/src/server/api/common/generate-replies-query.ts index e59a3334ef..fbc41b2c25 100644 --- a/src/server/api/common/generate-replies-query.ts +++ b/src/server/api/common/generate-replies-query.ts @@ -1,4 +1,4 @@ -import { User } from '@/models/entities/user.js'; +import { User } from '@/models/entities/user'; import { Brackets, SelectQueryBuilder } from 'typeorm'; export function generateRepliesQuery(q: SelectQueryBuilder, me?: { id: User['id'] } | null) { diff --git a/src/server/api/common/generate-visibility-query.ts b/src/server/api/common/generate-visibility-query.ts index 715982934c..813e8b6c09 100644 --- a/src/server/api/common/generate-visibility-query.ts +++ b/src/server/api/common/generate-visibility-query.ts @@ -1,5 +1,5 @@ -import { User } from '@/models/entities/user.js'; -import { Followings } from '@/models/index.js'; +import { User } from '@/models/entities/user'; +import { Followings } from '@/models/index'; import { Brackets, SelectQueryBuilder } from 'typeorm'; export function generateVisibilityQuery(q: SelectQueryBuilder, me?: { id: User['id'] } | null) { diff --git a/src/server/api/common/getters.ts b/src/server/api/common/getters.ts index c5a47876d0..4b2ee8f1da 100644 --- a/src/server/api/common/getters.ts +++ b/src/server/api/common/getters.ts @@ -1,7 +1,7 @@ -import { IdentifiableError } from '@/misc/identifiable-error.js'; -import { User } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { Notes, Users } from '@/models/index.js'; +import { IdentifiableError } from '@/misc/identifiable-error'; +import { User } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { Notes, Users } from '@/models/index'; /** * Get note for API processing diff --git a/src/server/api/common/inject-featured.ts b/src/server/api/common/inject-featured.ts index b7dd8028b5..1dc13c83ef 100644 --- a/src/server/api/common/inject-featured.ts +++ b/src/server/api/common/inject-featured.ts @@ -1,9 +1,9 @@ import rndstr from 'rndstr'; -import { Note } from '@/models/entities/note.js'; -import { User } from '@/models/entities/user.js'; -import { Notes, UserProfiles, NoteReactions } from '@/models/index.js'; -import { generateMutedUserQuery } from './generate-muted-user-query.js'; -import { generateBlockedUserQuery } from './generate-block-query.js'; +import { Note } from '@/models/entities/note'; +import { User } from '@/models/entities/user'; +import { Notes, UserProfiles, NoteReactions } from '@/models/index'; +import { generateMutedUserQuery } from './generate-muted-user-query'; +import { generateBlockedUserQuery } from './generate-block-query'; // TODO: リアクション、Renote、返信などをしたノートは除外する diff --git a/src/server/api/common/inject-promo.ts b/src/server/api/common/inject-promo.ts index 971770f32a..87767a65bf 100644 --- a/src/server/api/common/inject-promo.ts +++ b/src/server/api/common/inject-promo.ts @@ -1,7 +1,7 @@ import rndstr from 'rndstr'; -import { Note } from '@/models/entities/note.js'; -import { User } from '@/models/entities/user.js'; -import { PromoReads, PromoNotes, Notes, Users } from '@/models/index.js'; +import { Note } from '@/models/entities/note'; +import { User } from '@/models/entities/user'; +import { PromoReads, PromoNotes, Notes, Users } from '@/models/index'; export async function injectPromo(timeline: Note[], user?: User | null) { if (timeline.length < 5) return; diff --git a/src/server/api/common/read-messaging-message.ts b/src/server/api/common/read-messaging-message.ts index 638aff3d58..8e030faa3d 100644 --- a/src/server/api/common/read-messaging-message.ts +++ b/src/server/api/common/read-messaging-message.ts @@ -1,17 +1,17 @@ -import { publishMainStream, publishGroupMessagingStream } from '@/services/stream.js'; -import { publishMessagingStream } from '@/services/stream.js'; -import { publishMessagingIndexStream } from '@/services/stream.js'; -import { User, IRemoteUser } from '@/models/entities/user.js'; -import { MessagingMessage } from '@/models/entities/messaging-message.js'; -import { MessagingMessages, UserGroupJoinings, Users } from '@/models/index.js'; +import { publishMainStream, publishGroupMessagingStream } from '@/services/stream'; +import { publishMessagingStream } from '@/services/stream'; +import { publishMessagingIndexStream } from '@/services/stream'; +import { User, IRemoteUser } from '@/models/entities/user'; +import { MessagingMessage } from '@/models/entities/messaging-message'; +import { MessagingMessages, UserGroupJoinings, Users } from '@/models/index'; import { In } from 'typeorm'; -import { IdentifiableError } from '@/misc/identifiable-error.js'; -import { UserGroup } from '@/models/entities/user-group.js'; -import { toArray } from '../../../prelude/array.js'; -import { renderReadActivity } from '@/remote/activitypub/renderer/read.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { deliver } from '@/queue/index.js'; -import orderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; +import { IdentifiableError } from '@/misc/identifiable-error'; +import { UserGroup } from '@/models/entities/user-group'; +import { toArray } from '../../../prelude/array'; +import { renderReadActivity } from '@/remote/activitypub/renderer/read'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { deliver } from '@/queue/index'; +import orderedCollection from '@/remote/activitypub/renderer/ordered-collection'; /** * Mark messages as read diff --git a/src/server/api/common/read-notification.ts b/src/server/api/common/read-notification.ts index ce958c479f..a4406c9eeb 100644 --- a/src/server/api/common/read-notification.ts +++ b/src/server/api/common/read-notification.ts @@ -1,7 +1,7 @@ -import { publishMainStream } from '@/services/stream.js'; -import { User } from '@/models/entities/user.js'; -import { Notification } from '@/models/entities/notification.js'; -import { Notifications, Users } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream'; +import { User } from '@/models/entities/user'; +import { Notification } from '@/models/entities/notification'; +import { Notifications, Users } from '@/models/index'; import { In } from 'typeorm'; export async function readNotification( diff --git a/src/server/api/common/signin.ts b/src/server/api/common/signin.ts index adc5aafe85..4c7aacf1cd 100644 --- a/src/server/api/common/signin.ts +++ b/src/server/api/common/signin.ts @@ -1,10 +1,10 @@ import * as Koa from 'koa'; -import config from '@/config/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; -import { Signins } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { publishMainStream } from '@/services/stream.js'; +import config from '@/config/index'; +import { ILocalUser } from '@/models/entities/user'; +import { Signins } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { publishMainStream } from '@/services/stream'; export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) { if (redirect) { diff --git a/src/server/api/common/signup.ts b/src/server/api/common/signup.ts index c5605e2b8f..eb3aa09c8c 100644 --- a/src/server/api/common/signup.ts +++ b/src/server/api/common/signup.ts @@ -1,15 +1,15 @@ import * as bcrypt from 'bcryptjs'; import { generateKeyPair } from 'crypto'; -import generateUserToken from './generate-native-user-token.js'; -import { User } from '@/models/entities/user.js'; -import { Users, UsedUsernames } from '@/models/index.js'; -import { UserProfile } from '@/models/entities/user-profile.js'; +import generateUserToken from './generate-native-user-token'; +import { User } from '@/models/entities/user'; +import { Users, UsedUsernames } from '@/models/index'; +import { UserProfile } from '@/models/entities/user-profile'; import { getConnection } from 'typeorm'; -import { genId } from '@/misc/gen-id.js'; -import { toPunyNullable } from '@/misc/convert-host.js'; -import { UserKeypair } from '@/models/entities/user-keypair.js'; -import { usersChart } from '@/services/chart/index.js'; -import { UsedUsername } from '@/models/entities/used-username.js'; +import { genId } from '@/misc/gen-id'; +import { toPunyNullable } from '@/misc/convert-host'; +import { UserKeypair } from '@/models/entities/user-keypair'; +import { usersChart } from '@/services/chart/index'; +import { UsedUsername } from '@/models/entities/used-username'; export async function signup(username: User['username'], password: UserProfile['password'], host: string | null = null) { // Validate username diff --git a/src/server/api/define.ts b/src/server/api/define.ts index 18e8f62016..4bd8f95e31 100644 --- a/src/server/api/define.ts +++ b/src/server/api/define.ts @@ -1,9 +1,9 @@ import * as fs from 'fs'; -import { ILocalUser } from '@/models/entities/user.js'; -import { IEndpointMeta } from './endpoints.js'; -import { ApiError } from './error.js'; -import { SchemaType } from '@/misc/schema.js'; -import { AccessToken } from '@/models/entities/access-token.js'; +import { ILocalUser } from '@/models/entities/user'; +import { IEndpointMeta } from './endpoints'; +import { ApiError } from './error'; +import { SchemaType } from '@/misc/schema'; +import { AccessToken } from '@/models/entities/access-token'; type NonOptional = T extends undefined ? never : T; diff --git a/src/server/api/endpoints.ts b/src/server/api/endpoints.ts index 4c0baf2242..640b14ed6a 100644 --- a/src/server/api/endpoints.ts +++ b/src/server/api/endpoints.ts @@ -3,7 +3,7 @@ import { dirname } from 'path'; import { Context } from 'cafy'; import * as path from 'path'; import * as glob from 'glob'; -import { Schema } from '@/misc/schema.js'; +import { Schema } from '@/misc/schema'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; diff --git a/src/server/api/endpoints/admin/abuse-user-reports.ts b/src/server/api/endpoints/admin/abuse-user-reports.ts index 5bc5618ab3..403eb24191 100644 --- a/src/server/api/endpoints/admin/abuse-user-reports.ts +++ b/src/server/api/endpoints/admin/abuse-user-reports.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { AbuseUserReports } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { AbuseUserReports } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/accounts/create.ts b/src/server/api/endpoints/admin/accounts/create.ts index f9a6c10b87..9691b9c7e3 100644 --- a/src/server/api/endpoints/admin/accounts/create.ts +++ b/src/server/api/endpoints/admin/accounts/create.ts @@ -1,6 +1,6 @@ -import define from '../../../define.js'; -import { Users } from '@/models/index.js'; -import { signup } from '../../../common/signup.js'; +import define from '../../../define'; +import { Users } from '@/models/index'; +import { signup } from '../../../common/signup'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/create.ts b/src/server/api/endpoints/admin/ad/create.ts index 55cc037182..27c7b5d318 100644 --- a/src/server/api/endpoints/admin/ad/create.ts +++ b/src/server/api/endpoints/admin/ad/create.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Ads } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import define from '../../../define'; +import { Ads } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/delete.ts b/src/server/api/endpoints/admin/ad/delete.ts index 9f11f968ee..91934e1aab 100644 --- a/src/server/api/endpoints/admin/ad/delete.ts +++ b/src/server/api/endpoints/admin/ad/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Ads } from '@/models/index.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { Ads } from '@/models/index'; +import { ApiError } from '../../../error'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/list.ts b/src/server/api/endpoints/admin/ad/list.ts index a2d843ec16..000aaaba9d 100644 --- a/src/server/api/endpoints/admin/ad/list.ts +++ b/src/server/api/endpoints/admin/ad/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { Ads } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { Ads } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/ad/update.ts b/src/server/api/endpoints/admin/ad/update.ts index 2d7a32585d..36c87895c2 100644 --- a/src/server/api/endpoints/admin/ad/update.ts +++ b/src/server/api/endpoints/admin/ad/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Ads } from '@/models/index.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { Ads } from '@/models/index'; +import { ApiError } from '../../../error'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/create.ts b/src/server/api/endpoints/admin/announcements/create.ts index ab1b9a3c20..f1c07745f9 100644 --- a/src/server/api/endpoints/admin/announcements/create.ts +++ b/src/server/api/endpoints/admin/announcements/create.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Announcements } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import define from '../../../define'; +import { Announcements } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/delete.ts b/src/server/api/endpoints/admin/announcements/delete.ts index 52d7cb26c5..7dbc05b4c9 100644 --- a/src/server/api/endpoints/admin/announcements/delete.ts +++ b/src/server/api/endpoints/admin/announcements/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Announcements } from '@/models/index.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { Announcements } from '@/models/index'; +import { ApiError } from '../../../error'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/list.ts b/src/server/api/endpoints/admin/announcements/list.ts index ff62b7806a..4039bcd88f 100644 --- a/src/server/api/endpoints/admin/announcements/list.ts +++ b/src/server/api/endpoints/admin/announcements/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { Announcements, AnnouncementReads } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { Announcements, AnnouncementReads } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/announcements/update.ts b/src/server/api/endpoints/admin/announcements/update.ts index e45a185ad6..343f37d626 100644 --- a/src/server/api/endpoints/admin/announcements/update.ts +++ b/src/server/api/endpoints/admin/announcements/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Announcements } from '@/models/index.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { Announcements } from '@/models/index'; +import { ApiError } from '../../../error'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts index 9001e01a1a..988ab29558 100644 --- a/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts +++ b/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { deleteFile } from '@/services/drive/delete-file.js'; -import { DriveFiles } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; +import define from '../../define'; +import { deleteFile } from '@/services/drive/delete-file'; +import { DriveFiles } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/delete-logs.ts b/src/server/api/endpoints/admin/delete-logs.ts index be3f58d738..9d37ceb434 100644 --- a/src/server/api/endpoints/admin/delete-logs.ts +++ b/src/server/api/endpoints/admin/delete-logs.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { Logs } from '@/models/index.js'; +import define from '../../define'; +import { Logs } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/src/server/api/endpoints/admin/drive/clean-remote-files.ts index f945f0f049..76a6acff59 100644 --- a/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { createCleanRemoteFilesJob } from '@/queue/index.js'; +import define from '../../../define'; +import { createCleanRemoteFilesJob } from '@/queue/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/cleanup.ts b/src/server/api/endpoints/admin/drive/cleanup.ts index d5ad221a62..8497478da9 100644 --- a/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/src/server/api/endpoints/admin/drive/cleanup.ts @@ -1,7 +1,7 @@ import { IsNull } from 'typeorm'; -import define from '../../../define.js'; -import { deleteFile } from '@/services/drive/delete-file.js'; -import { DriveFiles } from '@/models/index.js'; +import define from '../../../define'; +import { deleteFile } from '@/services/drive/delete-file'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/files.ts b/src/server/api/endpoints/admin/drive/files.ts index 65980bfea2..c0788c8e02 100644 --- a/src/server/api/endpoints/admin/drive/files.ts +++ b/src/server/api/endpoints/admin/drive/files.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { DriveFiles } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; -import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define'; +import { DriveFiles } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/drive/show-file.ts b/src/server/api/endpoints/admin/drive/show-file.ts index 9dfa0cacf9..270b89c4fa 100644 --- a/src/server/api/endpoints/admin/drive/show-file.ts +++ b/src/server/api/endpoints/admin/drive/show-file.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/add.ts b/src/server/api/endpoints/admin/emoji/add.ts index b797fb30a3..1af81fe46d 100644 --- a/src/server/api/endpoints/admin/emoji/add.ts +++ b/src/server/api/endpoints/admin/emoji/add.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Emojis, DriveFiles } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import define from '../../../define'; +import { Emojis, DriveFiles } from '@/models/index'; +import { genId } from '@/misc/gen-id'; import { getConnection } from 'typeorm'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; -import { ApiError } from '../../../error.js'; -import { ID } from '@/misc/cafy-id.js'; +import { insertModerationLog } from '@/services/insert-moderation-log'; +import { ApiError } from '../../../error'; +import { ID } from '@/misc/cafy-id'; import rndstr from 'rndstr'; -import { publishBroadcastStream } from '@/services/stream.js'; +import { publishBroadcastStream } from '@/services/stream'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/copy.ts b/src/server/api/endpoints/admin/emoji/copy.ts index 4c5f7bf36c..4c8ab99f7c 100644 --- a/src/server/api/endpoints/admin/emoji/copy.ts +++ b/src/server/api/endpoints/admin/emoji/copy.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Emojis } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import define from '../../../define'; +import { Emojis } from '@/models/index'; +import { genId } from '@/misc/gen-id'; import { getConnection } from 'typeorm'; -import { ApiError } from '../../../error.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { ID } from '@/misc/cafy-id.js'; -import uploadFromUrl from '@/services/drive/upload-from-url.js'; -import { publishBroadcastStream } from '@/services/stream.js'; +import { ApiError } from '../../../error'; +import { DriveFile } from '@/models/entities/drive-file'; +import { ID } from '@/misc/cafy-id'; +import uploadFromUrl from '@/services/drive/upload-from-url'; +import { publishBroadcastStream } from '@/services/stream'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/list-remote.ts b/src/server/api/endpoints/admin/emoji/list-remote.ts index cc284123b5..3c8ca22170 100644 --- a/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Emojis } from '@/models/index.js'; -import { toPuny } from '@/misc/convert-host.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; -import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define'; +import { Emojis } from '@/models/index'; +import { toPuny } from '@/misc/convert-host'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/list.ts b/src/server/api/endpoints/admin/emoji/list.ts index da72ac13e7..cb1e79e0fe 100644 --- a/src/server/api/endpoints/admin/emoji/list.ts +++ b/src/server/api/endpoints/admin/emoji/list.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Emojis } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Emoji } from '@/models/entities/emoji.js'; +import define from '../../../define'; +import { Emojis } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; +import { ID } from '@/misc/cafy-id'; +import { Emoji } from '@/models/entities/emoji'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/remove.ts b/src/server/api/endpoints/admin/emoji/remove.ts index d81c0b9bbd..259950e362 100644 --- a/src/server/api/endpoints/admin/emoji/remove.ts +++ b/src/server/api/endpoints/admin/emoji/remove.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Emojis } from '@/models/index.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { Emojis } from '@/models/index'; import { getConnection } from 'typeorm'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; -import { ApiError } from '../../../error.js'; +import { insertModerationLog } from '@/services/insert-moderation-log'; +import { ApiError } from '../../../error'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/emoji/update.ts b/src/server/api/endpoints/admin/emoji/update.ts index 912c96c7dc..3fd547d7e5 100644 --- a/src/server/api/endpoints/admin/emoji/update.ts +++ b/src/server/api/endpoints/admin/emoji/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Emojis } from '@/models/index.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { Emojis } from '@/models/index'; import { getConnection } from 'typeorm'; -import { ApiError } from '../../../error.js'; +import { ApiError } from '../../../error'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/delete-all-files.ts b/src/server/api/endpoints/admin/federation/delete-all-files.ts index f32c6b9776..82540c5447 100644 --- a/src/server/api/endpoints/admin/federation/delete-all-files.ts +++ b/src/server/api/endpoints/admin/federation/delete-all-files.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { deleteFile } from '@/services/drive/delete-file.js'; -import { DriveFiles } from '@/models/index.js'; +import define from '../../../define'; +import { deleteFile } from '@/services/drive/delete-file'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index 125be42e80..65a6947ba0 100644 --- a/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Instances } from '@/models/index.js'; -import { toPuny } from '@/misc/convert-host.js'; -import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; +import define from '../../../define'; +import { Instances } from '@/models/index'; +import { toPuny } from '@/misc/convert-host'; +import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/remove-all-following.ts b/src/server/api/endpoints/admin/federation/remove-all-following.ts index 6b3d621c8b..7935eaa631 100644 --- a/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import deleteFollowing from '@/services/following/delete.js'; -import { Followings, Users } from '@/models/index.js'; +import define from '../../../define'; +import deleteFollowing from '@/services/following/delete'; +import { Followings, Users } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/federation/update-instance.ts b/src/server/api/endpoints/admin/federation/update-instance.ts index b5f13027a3..34eab27c78 100644 --- a/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/src/server/api/endpoints/admin/federation/update-instance.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Instances } from '@/models/index.js'; -import { toPuny } from '@/misc/convert-host.js'; +import define from '../../../define'; +import { Instances } from '@/models/index'; +import { toPuny } from '@/misc/convert-host'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/get-index-stats.ts b/src/server/api/endpoints/admin/get-index-stats.ts index e7e8d0b219..f2b06d0ef2 100644 --- a/src/server/api/endpoints/admin/get-index-stats.ts +++ b/src/server/api/endpoints/admin/get-index-stats.ts @@ -1,4 +1,4 @@ -import define from '../../define.js'; +import define from '../../define'; import { getConnection } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/admin/get-table-stats.ts b/src/server/api/endpoints/admin/get-table-stats.ts index c7f2a614b0..bce813232b 100644 --- a/src/server/api/endpoints/admin/get-table-stats.ts +++ b/src/server/api/endpoints/admin/get-table-stats.ts @@ -1,4 +1,4 @@ -import define from '../../define.js'; +import define from '../../define'; import { getConnection } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/admin/invite.ts b/src/server/api/endpoints/admin/invite.ts index 0a63b69ee9..2c69eec535 100644 --- a/src/server/api/endpoints/admin/invite.ts +++ b/src/server/api/endpoints/admin/invite.ts @@ -1,7 +1,7 @@ import rndstr from 'rndstr'; -import define from '../../define.js'; -import { RegistrationTickets } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import define from '../../define'; +import { RegistrationTickets } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/logs.ts b/src/server/api/endpoints/admin/logs.ts index e0d97b4abe..776403a62e 100644 --- a/src/server/api/endpoints/admin/logs.ts +++ b/src/server/api/endpoints/admin/logs.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Logs } from '@/models/index.js'; +import define from '../../define'; +import { Logs } from '@/models/index'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/admin/moderators/add.ts b/src/server/api/endpoints/admin/moderators/add.ts index bff9b63359..2b87fc217f 100644 --- a/src/server/api/endpoints/admin/moderators/add.ts +++ b/src/server/api/endpoints/admin/moderators/add.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { Users } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/moderators/remove.ts b/src/server/api/endpoints/admin/moderators/remove.ts index cacb788b4d..cbb0625224 100644 --- a/src/server/api/endpoints/admin/moderators/remove.ts +++ b/src/server/api/endpoints/admin/moderators/remove.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { Users } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/promo/create.ts b/src/server/api/endpoints/admin/promo/create.ts index faba458fed..3bdaaad4d9 100644 --- a/src/server/api/endpoints/admin/promo/create.ts +++ b/src/server/api/endpoints/admin/promo/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getNote } from '../../../common/getters.js'; -import { PromoNotes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getNote } from '../../../common/getters'; +import { PromoNotes } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/clear.ts b/src/server/api/endpoints/admin/queue/clear.ts index 4bab2f20cd..fedb7065ab 100644 --- a/src/server/api/endpoints/admin/queue/clear.ts +++ b/src/server/api/endpoints/admin/queue/clear.ts @@ -1,6 +1,6 @@ -import define from '../../../define.js'; -import { destroy } from '@/queue/index.js'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import define from '../../../define'; +import { destroy } from '@/queue/index'; +import { insertModerationLog } from '@/services/insert-moderation-log'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/src/server/api/endpoints/admin/queue/deliver-delayed.ts index ed34228108..cd7b640983 100644 --- a/src/server/api/endpoints/admin/queue/deliver-delayed.ts +++ b/src/server/api/endpoints/admin/queue/deliver-delayed.ts @@ -1,6 +1,6 @@ -import { deliverQueue } from '@/queue/queues.js'; +import { deliverQueue } from '@/queue/queues'; import { URL } from 'url'; -import define from '../../../define.js'; +import define from '../../../define'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/src/server/api/endpoints/admin/queue/inbox-delayed.ts index 8870722f23..59e5c834ed 100644 --- a/src/server/api/endpoints/admin/queue/inbox-delayed.ts +++ b/src/server/api/endpoints/admin/queue/inbox-delayed.ts @@ -1,6 +1,6 @@ import { URL } from 'url'; -import define from '../../../define.js'; -import { inboxQueue } from '@/queue/index.js'; +import define from '../../../define'; +import { inboxQueue } from '@/queue/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/jobs.ts b/src/server/api/endpoints/admin/queue/jobs.ts index 164379f721..c426e5f39b 100644 --- a/src/server/api/endpoints/admin/queue/jobs.ts +++ b/src/server/api/endpoints/admin/queue/jobs.ts @@ -1,6 +1,6 @@ -import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues.js'; +import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues'; import $ from 'cafy'; -import define from '../../../define.js'; +import define from '../../../define'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/queue/stats.ts b/src/server/api/endpoints/admin/queue/stats.ts index 60a3416c39..38f18459dd 100644 --- a/src/server/api/endpoints/admin/queue/stats.ts +++ b/src/server/api/endpoints/admin/queue/stats.ts @@ -1,5 +1,5 @@ -import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues.js'; -import define from '../../../define.js'; +import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues'; +import define from '../../../define'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/relays/add.ts b/src/server/api/endpoints/admin/relays/add.ts index e3b9a8afcb..567035fd3a 100644 --- a/src/server/api/endpoints/admin/relays/add.ts +++ b/src/server/api/endpoints/admin/relays/add.ts @@ -1,8 +1,8 @@ import { URL } from 'url'; import $ from 'cafy'; -import define from '../../../define.js'; -import { addRelay } from '@/services/relay.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { addRelay } from '@/services/relay'; +import { ApiError } from '../../../error'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/relays/list.ts b/src/server/api/endpoints/admin/relays/list.ts index 1707b8cd34..031ebe85d0 100644 --- a/src/server/api/endpoints/admin/relays/list.ts +++ b/src/server/api/endpoints/admin/relays/list.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { listRelay } from '@/services/relay.js'; +import define from '../../../define'; +import { listRelay } from '@/services/relay'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/relays/remove.ts b/src/server/api/endpoints/admin/relays/remove.ts index 406257fdf2..c1c50f5dc0 100644 --- a/src/server/api/endpoints/admin/relays/remove.ts +++ b/src/server/api/endpoints/admin/relays/remove.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { removeRelay } from '@/services/relay.js'; +import define from '../../../define'; +import { removeRelay } from '@/services/relay'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/reset-password.ts b/src/server/api/endpoints/admin/reset-password.ts index 0bc32e07a1..0fc2c6a868 100644 --- a/src/server/api/endpoints/admin/reset-password.ts +++ b/src/server/api/endpoints/admin/reset-password.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; import * as bcrypt from 'bcryptjs'; import rndstr from 'rndstr'; -import { Users, UserProfiles } from '@/models/index.js'; +import { Users, UserProfiles } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index 4c7ef37923..7b71f8e000 100644 --- a/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { AbuseUserReports } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { AbuseUserReports } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/resync-chart.ts b/src/server/api/endpoints/admin/resync-chart.ts index 613cdbdfad..b0e687333f 100644 --- a/src/server/api/endpoints/admin/resync-chart.ts +++ b/src/server/api/endpoints/admin/resync-chart.ts @@ -1,6 +1,6 @@ -import define from '../../define.js'; -import { driveChart, notesChart, usersChart, instanceChart } from '@/services/chart/index.js'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import define from '../../define'; +import { driveChart, notesChart, usersChart, instanceChart } from '@/services/chart/index'; +import { insertModerationLog } from '@/services/insert-moderation-log'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/send-email.ts b/src/server/api/endpoints/admin/send-email.ts index 353add59ba..6f67b78542 100644 --- a/src/server/api/endpoints/admin/send-email.ts +++ b/src/server/api/endpoints/admin/send-email.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { sendEmail } from '@/services/send-email.js'; +import define from '../../define'; +import { sendEmail } from '@/services/send-email'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/server-info.ts b/src/server/api/endpoints/admin/server-info.ts index daac6395ea..bb2d35e397 100644 --- a/src/server/api/endpoints/admin/server-info.ts +++ b/src/server/api/endpoints/admin/server-info.ts @@ -1,8 +1,8 @@ import * as os from 'os'; import * as si from 'systeminformation'; import { getConnection } from 'typeorm'; -import define from '../../define.js'; -import { redisClient } from '../../../../db/redis.js'; +import define from '../../define'; +import { redisClient } from '../../../../db/redis'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/admin/show-moderation-logs.ts b/src/server/api/endpoints/admin/show-moderation-logs.ts index 833c49ee64..e9509568d0 100644 --- a/src/server/api/endpoints/admin/show-moderation-logs.ts +++ b/src/server/api/endpoints/admin/show-moderation-logs.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ModerationLogs } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ModerationLogs } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/show-user.ts b/src/server/api/endpoints/admin/show-user.ts index e4935fe90f..963c123255 100644 --- a/src/server/api/endpoints/admin/show-user.ts +++ b/src/server/api/endpoints/admin/show-user.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Users } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/show-users.ts b/src/server/api/endpoints/admin/show-users.ts index 0ac2112f4b..20b63e7be6 100644 --- a/src/server/api/endpoints/admin/show-users.ts +++ b/src/server/api/endpoints/admin/show-users.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; +import define from '../../define'; +import { Users } from '@/models/index'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/silence-user.ts b/src/server/api/endpoints/admin/silence-user.ts index 0a2b080aa4..9bfed2310a 100644 --- a/src/server/api/endpoints/admin/silence-user.ts +++ b/src/server/api/endpoints/admin/silence-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Users } from '@/models/index'; +import { insertModerationLog } from '@/services/insert-moderation-log'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/suspend-user.ts b/src/server/api/endpoints/admin/suspend-user.ts index 8026b9ec83..364f258ce8 100644 --- a/src/server/api/endpoints/admin/suspend-user.ts +++ b/src/server/api/endpoints/admin/suspend-user.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import deleteFollowing from '@/services/following/delete.js'; -import { Users, Followings, Notifications } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; -import { doPostSuspend } from '@/services/suspend-user.js'; -import { publishUserEvent } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import deleteFollowing from '@/services/following/delete'; +import { Users, Followings, Notifications } from '@/models/index'; +import { User } from '@/models/entities/user'; +import { insertModerationLog } from '@/services/insert-moderation-log'; +import { doPostSuspend } from '@/services/suspend-user'; +import { publishUserEvent } from '@/services/stream'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/unsilence-user.ts b/src/server/api/endpoints/admin/unsilence-user.ts index 1e581df494..9994fbf462 100644 --- a/src/server/api/endpoints/admin/unsilence-user.ts +++ b/src/server/api/endpoints/admin/unsilence-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Users } from '@/models/index'; +import { insertModerationLog } from '@/services/insert-moderation-log'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/unsuspend-user.ts b/src/server/api/endpoints/admin/unsuspend-user.ts index e839377435..ab4c2d3dfe 100644 --- a/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/src/server/api/endpoints/admin/unsuspend-user.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; -import { doPostUnsuspend } from '@/services/unsuspend-user.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Users } from '@/models/index'; +import { insertModerationLog } from '@/services/insert-moderation-log'; +import { doPostUnsuspend } from '@/services/unsuspend-user'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/update-meta.ts b/src/server/api/endpoints/admin/update-meta.ts index 2d34b5a219..5962dba98a 100644 --- a/src/server/api/endpoints/admin/update-meta.ts +++ b/src/server/api/endpoints/admin/update-meta.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../define.js'; +import define from '../../define'; import { getConnection } from 'typeorm'; -import { Meta } from '@/models/entities/meta.js'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; -import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits.js'; -import { ID } from '@/misc/cafy-id.js'; +import { Meta } from '@/models/entities/meta'; +import { insertModerationLog } from '@/services/insert-moderation-log'; +import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; +import { ID } from '@/misc/cafy-id'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/admin/vacuum.ts b/src/server/api/endpoints/admin/vacuum.ts index 9ff9711a00..9a80d88c44 100644 --- a/src/server/api/endpoints/admin/vacuum.ts +++ b/src/server/api/endpoints/admin/vacuum.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; +import define from '../../define'; import { getConnection } from 'typeorm'; -import { insertModerationLog } from '@/services/insert-moderation-log.js'; +import { insertModerationLog } from '@/services/insert-moderation-log'; export const meta = { tags: ['admin'], diff --git a/src/server/api/endpoints/announcements.ts b/src/server/api/endpoints/announcements.ts index 83a8b3a71c..a67737b2ff 100644 --- a/src/server/api/endpoints/announcements.ts +++ b/src/server/api/endpoints/announcements.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../define.js'; -import { Announcements, AnnouncementReads } from '@/models/index.js'; -import { makePaginationQuery } from '../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../define'; +import { Announcements, AnnouncementReads } from '@/models/index'; +import { makePaginationQuery } from '../common/make-pagination-query'; export const meta = { tags: ['meta'], diff --git a/src/server/api/endpoints/antennas/create.ts b/src/server/api/endpoints/antennas/create.ts index 2310ee6d51..4bdae8cc33 100644 --- a/src/server/api/endpoints/antennas/create.ts +++ b/src/server/api/endpoints/antennas/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { genId } from '@/misc/gen-id.js'; -import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; -import { ApiError } from '../../error.js'; -import { publishInternalEvent } from '@/services/stream.js'; +import define from '../../define'; +import { genId } from '@/misc/gen-id'; +import { Antennas, UserLists, UserGroupJoinings } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; +import { ApiError } from '../../error'; +import { publishInternalEvent } from '@/services/stream'; export const meta = { tags: ['antennas'], diff --git a/src/server/api/endpoints/antennas/delete.ts b/src/server/api/endpoints/antennas/delete.ts index 59a29a9511..1cd136183e 100644 --- a/src/server/api/endpoints/antennas/delete.ts +++ b/src/server/api/endpoints/antennas/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Antennas } from '@/models/index.js'; -import { publishInternalEvent } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Antennas } from '@/models/index'; +import { publishInternalEvent } from '@/services/stream'; export const meta = { tags: ['antennas'], diff --git a/src/server/api/endpoints/antennas/list.ts b/src/server/api/endpoints/antennas/list.ts index eceec945aa..8baae8435b 100644 --- a/src/server/api/endpoints/antennas/list.ts +++ b/src/server/api/endpoints/antennas/list.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { Antennas } from '@/models/index.js'; +import define from '../../define'; +import { Antennas } from '@/models/index'; export const meta = { tags: ['antennas', 'account'], diff --git a/src/server/api/endpoints/antennas/notes.ts b/src/server/api/endpoints/antennas/notes.ts index 11f69f354b..3c8a4fbdae 100644 --- a/src/server/api/endpoints/antennas/notes.ts +++ b/src/server/api/endpoints/antennas/notes.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Antennas, Notes, AntennaNotes } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { ApiError } from '../../error.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Antennas, Notes, AntennaNotes } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { ApiError } from '../../error'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['antennas', 'account', 'notes'], diff --git a/src/server/api/endpoints/antennas/show.ts b/src/server/api/endpoints/antennas/show.ts index 0d9a716bf4..3cdf4dcb61 100644 --- a/src/server/api/endpoints/antennas/show.ts +++ b/src/server/api/endpoints/antennas/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Antennas } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Antennas } from '@/models/index'; export const meta = { tags: ['antennas', 'account'], diff --git a/src/server/api/endpoints/antennas/update.ts b/src/server/api/endpoints/antennas/update.ts index 37f3b01641..ff13e89bcc 100644 --- a/src/server/api/endpoints/antennas/update.ts +++ b/src/server/api/endpoints/antennas/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js'; -import { publishInternalEvent } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Antennas, UserLists, UserGroupJoinings } from '@/models/index'; +import { publishInternalEvent } from '@/services/stream'; export const meta = { tags: ['antennas'], diff --git a/src/server/api/endpoints/ap/get.ts b/src/server/api/endpoints/ap/get.ts index 33734b7cbd..2cffce1f16 100644 --- a/src/server/api/endpoints/ap/get.ts +++ b/src/server/api/endpoints/ap/get.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import Resolver from '@/remote/activitypub/resolver.js'; -import { ApiError } from '../../error.js'; +import define from '../../define'; +import Resolver from '@/remote/activitypub/resolver'; +import { ApiError } from '../../error'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/ap/show.ts b/src/server/api/endpoints/ap/show.ts index 0472d28a65..aa0dae070c 100644 --- a/src/server/api/endpoints/ap/show.ts +++ b/src/server/api/endpoints/ap/show.ts @@ -1,16 +1,16 @@ import $ from 'cafy'; -import define from '../../define.js'; -import config from '@/config/index.js'; -import { createPerson } from '@/remote/activitypub/models/person.js'; -import { createNote } from '@/remote/activitypub/models/note.js'; -import Resolver from '@/remote/activitypub/resolver.js'; -import { ApiError } from '../../error.js'; -import { extractDbHost } from '@/misc/convert-host.js'; -import { Users, Notes } from '@/models/index.js'; -import { Note } from '@/models/entities/note.js'; -import { User } from '@/models/entities/user.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { isActor, isPost, getApId } from '@/remote/activitypub/type.js'; +import define from '../../define'; +import config from '@/config/index'; +import { createPerson } from '@/remote/activitypub/models/person'; +import { createNote } from '@/remote/activitypub/models/note'; +import Resolver from '@/remote/activitypub/resolver'; +import { ApiError } from '../../error'; +import { extractDbHost } from '@/misc/convert-host'; +import { Users, Notes } from '@/models/index'; +import { Note } from '@/models/entities/note'; +import { User } from '@/models/entities/user'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { isActor, isPost, getApId } from '@/remote/activitypub/type'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts index f013fa91ca..5dbafa07ee 100644 --- a/src/server/api/endpoints/app/create.ts +++ b/src/server/api/endpoints/app/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Apps } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { unique } from '../../../../prelude/array.js'; -import { secureRndstr } from '@/misc/secure-rndstr.js'; +import define from '../../define'; +import { Apps } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { unique } from '../../../../prelude/array'; +import { secureRndstr } from '@/misc/secure-rndstr'; export const meta = { tags: ['app'], diff --git a/src/server/api/endpoints/app/show.ts b/src/server/api/endpoints/app/show.ts index 919d65b12f..27f12eb44f 100644 --- a/src/server/api/endpoints/app/show.ts +++ b/src/server/api/endpoints/app/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Apps } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Apps } from '@/models/index'; export const meta = { tags: ['app'], diff --git a/src/server/api/endpoints/auth/accept.ts b/src/server/api/endpoints/auth/accept.ts index e4fcb6dc42..1d1d8ac227 100644 --- a/src/server/api/endpoints/auth/accept.ts +++ b/src/server/api/endpoints/auth/accept.ts @@ -1,10 +1,10 @@ import * as crypto from 'crypto'; import $ from 'cafy'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { AuthSessions, AccessTokens, Apps } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { secureRndstr } from '@/misc/secure-rndstr.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { AuthSessions, AccessTokens, Apps } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { secureRndstr } from '@/misc/secure-rndstr'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/auth/session/generate.ts b/src/server/api/endpoints/auth/session/generate.ts index 4ea5967b08..859cf52ed3 100644 --- a/src/server/api/endpoints/auth/session/generate.ts +++ b/src/server/api/endpoints/auth/session/generate.ts @@ -1,10 +1,10 @@ import { v4 as uuid } from 'uuid'; import $ from 'cafy'; -import config from '@/config/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { Apps, AuthSessions } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import config from '@/config/index'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { Apps, AuthSessions } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/auth/session/show.ts b/src/server/api/endpoints/auth/session/show.ts index 420facb8fb..23f1a56a37 100644 --- a/src/server/api/endpoints/auth/session/show.ts +++ b/src/server/api/endpoints/auth/session/show.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { AuthSessions } from '@/models/index.js'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { AuthSessions } from '@/models/index'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/auth/session/userkey.ts b/src/server/api/endpoints/auth/session/userkey.ts index 240ff57f1e..72201cb207 100644 --- a/src/server/api/endpoints/auth/session/userkey.ts +++ b/src/server/api/endpoints/auth/session/userkey.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { Apps, AuthSessions, AccessTokens, Users } from '@/models/index.js'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { Apps, AuthSessions, AccessTokens, Users } from '@/models/index'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/blocking/create.ts b/src/server/api/endpoints/blocking/create.ts index c82b6eb920..1bf5cf374b 100644 --- a/src/server/api/endpoints/blocking/create.ts +++ b/src/server/api/endpoints/blocking/create.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; +import { ID } from '@/misc/cafy-id'; import * as ms from 'ms'; -import create from '@/services/blocking/create.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { Blockings, NoteWatchings, Users } from '@/models/index.js'; +import create from '@/services/blocking/create'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { Blockings, NoteWatchings, Users } from '@/models/index'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/blocking/delete.ts b/src/server/api/endpoints/blocking/delete.ts index 9d075f272c..a66e46fdf0 100644 --- a/src/server/api/endpoints/blocking/delete.ts +++ b/src/server/api/endpoints/blocking/delete.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; +import { ID } from '@/misc/cafy-id'; import * as ms from 'ms'; -import deleteBlocking from '@/services/blocking/delete.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { Blockings, Users } from '@/models/index.js'; +import deleteBlocking from '@/services/blocking/delete'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { Blockings, Users } from '@/models/index'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/blocking/list.ts b/src/server/api/endpoints/blocking/list.ts index a616d0b7c1..fe25fdaba1 100644 --- a/src/server/api/endpoints/blocking/list.ts +++ b/src/server/api/endpoints/blocking/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Blockings } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Blockings } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/channels/create.ts b/src/server/api/endpoints/channels/create.ts index 48348cf35a..0cedfd6c6a 100644 --- a/src/server/api/endpoints/channels/create.ts +++ b/src/server/api/endpoints/channels/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Channels, DriveFiles } from '@/models/index.js'; -import { Channel } from '@/models/entities/channel.js'; -import { genId } from '@/misc/gen-id.js'; -import { ID } from '@/misc/cafy-id.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Channels, DriveFiles } from '@/models/index'; +import { Channel } from '@/models/entities/channel'; +import { genId } from '@/misc/gen-id'; +import { ID } from '@/misc/cafy-id'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/featured.ts b/src/server/api/endpoints/channels/featured.ts index 7cfc33e639..dc1f49f960 100644 --- a/src/server/api/endpoints/channels/featured.ts +++ b/src/server/api/endpoints/channels/featured.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { Channels } from '@/models/index.js'; +import define from '../../define'; +import { Channels } from '@/models/index'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/follow.ts b/src/server/api/endpoints/channels/follow.ts index 37fb8ff1b4..d4664e6996 100644 --- a/src/server/api/endpoints/channels/follow.ts +++ b/src/server/api/endpoints/channels/follow.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Channels, ChannelFollowings } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { publishUserEvent } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Channels, ChannelFollowings } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { publishUserEvent } from '@/services/stream'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/followed.ts b/src/server/api/endpoints/channels/followed.ts index 7fc83c933d..be239a01d6 100644 --- a/src/server/api/endpoints/channels/followed.ts +++ b/src/server/api/endpoints/channels/followed.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Channels, ChannelFollowings } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Channels, ChannelFollowings } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['channels', 'account'], diff --git a/src/server/api/endpoints/channels/owned.ts b/src/server/api/endpoints/channels/owned.ts index 2f08e52615..4a2e9db17b 100644 --- a/src/server/api/endpoints/channels/owned.ts +++ b/src/server/api/endpoints/channels/owned.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Channels } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Channels } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['channels', 'account'], diff --git a/src/server/api/endpoints/channels/show.ts b/src/server/api/endpoints/channels/show.ts index f2c351f557..803ce6363d 100644 --- a/src/server/api/endpoints/channels/show.ts +++ b/src/server/api/endpoints/channels/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Channels } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Channels } from '@/models/index'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/timeline.ts b/src/server/api/endpoints/channels/timeline.ts index 3032e7ee6f..0ed057a11e 100644 --- a/src/server/api/endpoints/channels/timeline.ts +++ b/src/server/api/endpoints/channels/timeline.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Notes, Channels } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { activeUsersChart } from '@/services/chart/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Notes, Channels } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { activeUsersChart } from '@/services/chart/index'; export const meta = { tags: ['notes', 'channels'], diff --git a/src/server/api/endpoints/channels/unfollow.ts b/src/server/api/endpoints/channels/unfollow.ts index 1c2ab307af..700f8e93ba 100644 --- a/src/server/api/endpoints/channels/unfollow.ts +++ b/src/server/api/endpoints/channels/unfollow.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Channels, ChannelFollowings } from '@/models/index.js'; -import { publishUserEvent } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Channels, ChannelFollowings } from '@/models/index'; +import { publishUserEvent } from '@/services/stream'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/channels/update.ts b/src/server/api/endpoints/channels/update.ts index 255c664307..9b447bd04b 100644 --- a/src/server/api/endpoints/channels/update.ts +++ b/src/server/api/endpoints/channels/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Channels, DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Channels, DriveFiles } from '@/models/index'; export const meta = { tags: ['channels'], diff --git a/src/server/api/endpoints/charts/active-users.ts b/src/server/api/endpoints/charts/active-users.ts index dc080d3bc6..c4878f7d61 100644 --- a/src/server/api/endpoints/charts/active-users.ts +++ b/src/server/api/endpoints/charts/active-users.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { activeUsersChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { activeUsersChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'users'], diff --git a/src/server/api/endpoints/charts/drive.ts b/src/server/api/endpoints/charts/drive.ts index 5bad71a9fa..07bff82cf4 100644 --- a/src/server/api/endpoints/charts/drive.ts +++ b/src/server/api/endpoints/charts/drive.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { driveChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { driveChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'drive'], diff --git a/src/server/api/endpoints/charts/federation.ts b/src/server/api/endpoints/charts/federation.ts index 83ec290023..9575f9a7b7 100644 --- a/src/server/api/endpoints/charts/federation.ts +++ b/src/server/api/endpoints/charts/federation.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { federationChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { federationChart } from '@/services/chart/index'; export const meta = { tags: ['charts'], diff --git a/src/server/api/endpoints/charts/hashtag.ts b/src/server/api/endpoints/charts/hashtag.ts index 12d3c2ba4c..53dc61e51e 100644 --- a/src/server/api/endpoints/charts/hashtag.ts +++ b/src/server/api/endpoints/charts/hashtag.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { hashtagChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { hashtagChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'hashtags'], diff --git a/src/server/api/endpoints/charts/instance.ts b/src/server/api/endpoints/charts/instance.ts index ed3f8bbe93..1835023188 100644 --- a/src/server/api/endpoints/charts/instance.ts +++ b/src/server/api/endpoints/charts/instance.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { instanceChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { instanceChart } from '@/services/chart/index'; export const meta = { tags: ['charts'], diff --git a/src/server/api/endpoints/charts/network.ts b/src/server/api/endpoints/charts/network.ts index a4700f045a..b524df93be 100644 --- a/src/server/api/endpoints/charts/network.ts +++ b/src/server/api/endpoints/charts/network.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { networkChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { networkChart } from '@/services/chart/index'; export const meta = { tags: ['charts'], diff --git a/src/server/api/endpoints/charts/notes.ts b/src/server/api/endpoints/charts/notes.ts index 7c92a11882..676f302939 100644 --- a/src/server/api/endpoints/charts/notes.ts +++ b/src/server/api/endpoints/charts/notes.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { notesChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { notesChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'notes'], diff --git a/src/server/api/endpoints/charts/user/drive.ts b/src/server/api/endpoints/charts/user/drive.ts index 8649ac69c7..f2770e2df8 100644 --- a/src/server/api/endpoints/charts/user/drive.ts +++ b/src/server/api/endpoints/charts/user/drive.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { convertLog } from '@/services/chart/core.js'; -import { perUserDriveChart } from '@/services/chart/index.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { convertLog } from '@/services/chart/core'; +import { perUserDriveChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'drive', 'users'], diff --git a/src/server/api/endpoints/charts/user/following.ts b/src/server/api/endpoints/charts/user/following.ts index 8905be2d9b..8c97b63e89 100644 --- a/src/server/api/endpoints/charts/user/following.ts +++ b/src/server/api/endpoints/charts/user/following.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { convertLog } from '@/services/chart/core.js'; -import { perUserFollowingChart } from '@/services/chart/index.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { convertLog } from '@/services/chart/core'; +import { perUserFollowingChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'users', 'following'], diff --git a/src/server/api/endpoints/charts/user/notes.ts b/src/server/api/endpoints/charts/user/notes.ts index 9c6152fa9e..0d5f5a8b6a 100644 --- a/src/server/api/endpoints/charts/user/notes.ts +++ b/src/server/api/endpoints/charts/user/notes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { convertLog } from '@/services/chart/core.js'; -import { perUserNotesChart } from '@/services/chart/index.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { convertLog } from '@/services/chart/core'; +import { perUserNotesChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'users', 'notes'], diff --git a/src/server/api/endpoints/charts/user/reactions.ts b/src/server/api/endpoints/charts/user/reactions.ts index 28629a0259..3cabe40d56 100644 --- a/src/server/api/endpoints/charts/user/reactions.ts +++ b/src/server/api/endpoints/charts/user/reactions.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { convertLog } from '@/services/chart/core.js'; -import { perUserReactionsChart } from '@/services/chart/index.js'; +import define from '../../../define'; +import { ID } from '@/misc/cafy-id'; +import { convertLog } from '@/services/chart/core'; +import { perUserReactionsChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'users', 'reactions'], diff --git a/src/server/api/endpoints/charts/users.ts b/src/server/api/endpoints/charts/users.ts index 8d312e1a14..deac89b59d 100644 --- a/src/server/api/endpoints/charts/users.ts +++ b/src/server/api/endpoints/charts/users.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { convertLog } from '@/services/chart/core.js'; -import { usersChart } from '@/services/chart/index.js'; +import define from '../../define'; +import { convertLog } from '@/services/chart/core'; +import { usersChart } from '@/services/chart/index'; export const meta = { tags: ['charts', 'users'], diff --git a/src/server/api/endpoints/clips/add-note.ts b/src/server/api/endpoints/clips/add-note.ts index 909d05bc82..79d7b8adde 100644 --- a/src/server/api/endpoints/clips/add-note.ts +++ b/src/server/api/endpoints/clips/add-note.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ClipNotes, Clips } from '@/models/index.js'; -import { ApiError } from '../../error.js'; -import { genId } from '@/misc/gen-id.js'; -import { getNote } from '../../common/getters.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ClipNotes, Clips } from '@/models/index'; +import { ApiError } from '../../error'; +import { genId } from '@/misc/gen-id'; +import { getNote } from '../../common/getters'; export const meta = { tags: ['account', 'notes', 'clips'], diff --git a/src/server/api/endpoints/clips/create.ts b/src/server/api/endpoints/clips/create.ts index 06286ed8ec..02d2773709 100644 --- a/src/server/api/endpoints/clips/create.ts +++ b/src/server/api/endpoints/clips/create.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { genId } from '@/misc/gen-id.js'; -import { Clips } from '@/models/index.js'; +import define from '../../define'; +import { genId } from '@/misc/gen-id'; +import { Clips } from '@/models/index'; export const meta = { tags: ['clips'], diff --git a/src/server/api/endpoints/clips/delete.ts b/src/server/api/endpoints/clips/delete.ts index 93e69dae34..ca489af3bf 100644 --- a/src/server/api/endpoints/clips/delete.ts +++ b/src/server/api/endpoints/clips/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Clips } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Clips } from '@/models/index'; export const meta = { tags: ['clips'], diff --git a/src/server/api/endpoints/clips/list.ts b/src/server/api/endpoints/clips/list.ts index 1eeac8b45b..1f6db9b979 100644 --- a/src/server/api/endpoints/clips/list.ts +++ b/src/server/api/endpoints/clips/list.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { Clips } from '@/models/index.js'; +import define from '../../define'; +import { Clips } from '@/models/index'; export const meta = { tags: ['clips', 'account'], diff --git a/src/server/api/endpoints/clips/notes.ts b/src/server/api/endpoints/clips/notes.ts index 41fa2b2bcc..5a9fed52fa 100644 --- a/src/server/api/endpoints/clips/notes.ts +++ b/src/server/api/endpoints/clips/notes.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ClipNotes, Clips, Notes } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { ApiError } from '../../error.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ClipNotes, Clips, Notes } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { ApiError } from '../../error'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['account', 'notes', 'clips'], diff --git a/src/server/api/endpoints/clips/show.ts b/src/server/api/endpoints/clips/show.ts index ab368e6a09..8f245cd18e 100644 --- a/src/server/api/endpoints/clips/show.ts +++ b/src/server/api/endpoints/clips/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Clips } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Clips } from '@/models/index'; export const meta = { tags: ['clips', 'account'], diff --git a/src/server/api/endpoints/clips/update.ts b/src/server/api/endpoints/clips/update.ts index 07a9d585c7..7f645560bb 100644 --- a/src/server/api/endpoints/clips/update.ts +++ b/src/server/api/endpoints/clips/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Clips } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Clips } from '@/models/index'; export const meta = { tags: ['clips'], diff --git a/src/server/api/endpoints/drive.ts b/src/server/api/endpoints/drive.ts index 6a99cd1246..2974ccfab9 100644 --- a/src/server/api/endpoints/drive.ts +++ b/src/server/api/endpoints/drive.ts @@ -1,6 +1,6 @@ -import define from '../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { DriveFiles } from '@/models/index.js'; +import define from '../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['drive', 'account'], diff --git a/src/server/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts index 60cf3eb948..95435e1e43 100644 --- a/src/server/api/endpoints/drive/files.ts +++ b/src/server/api/endpoints/drive/files.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { DriveFiles } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { DriveFiles } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/attached-notes.ts b/src/server/api/endpoints/drive/files/attached-notes.ts index 5aafe0ea1f..eec7d7877e 100644 --- a/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/src/server/api/endpoints/drive/files/attached-notes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFiles, Notes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFiles, Notes } from '@/models/index'; export const meta = { tags: ['drive', 'notes'], diff --git a/src/server/api/endpoints/drive/files/check-existence.ts b/src/server/api/endpoints/drive/files/check-existence.ts index a53a4f7f91..2c36078421 100644 --- a/src/server/api/endpoints/drive/files/check-existence.ts +++ b/src/server/api/endpoints/drive/files/check-existence.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { DriveFiles } from '@/models/index.js'; +import define from '../../../define'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/create.ts b/src/server/api/endpoints/drive/files/create.ts index 1f7b712439..2abc104e6c 100644 --- a/src/server/api/endpoints/drive/files/create.ts +++ b/src/server/api/endpoints/drive/files/create.ts @@ -1,11 +1,11 @@ import * as ms from 'ms'; import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import create from '@/services/drive/add-file.js'; -import define from '../../../define.js'; -import { apiLogger } from '../../../logger.js'; -import { ApiError } from '../../../error.js'; -import { DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import create from '@/services/drive/add-file'; +import define from '../../../define'; +import { apiLogger } from '../../../logger'; +import { ApiError } from '../../../error'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/delete.ts b/src/server/api/endpoints/drive/files/delete.ts index ae1381ee13..038325694d 100644 --- a/src/server/api/endpoints/drive/files/delete.ts +++ b/src/server/api/endpoints/drive/files/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { deleteFile } from '@/services/drive/delete-file.js'; -import { publishDriveStream } from '@/services/stream.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { deleteFile } from '@/services/drive/delete-file'; +import { publishDriveStream } from '@/services/stream'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/find-by-hash.ts b/src/server/api/endpoints/drive/files/find-by-hash.ts index 492a7ee593..5fea7bbbb0 100644 --- a/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { DriveFiles } from '@/models/index.js'; +import define from '../../../define'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/find.ts b/src/server/api/endpoints/drive/files/find.ts index 724424500d..dd419f4c04 100644 --- a/src/server/api/endpoints/drive/files/find.ts +++ b/src/server/api/endpoints/drive/files/find.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { DriveFiles } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/drive/files/show.ts b/src/server/api/endpoints/drive/files/show.ts index 7a2ea1b76f..a96ebaa123 100644 --- a/src/server/api/endpoints/drive/files/show.ts +++ b/src/server/api/endpoints/drive/files/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFile } from '@/models/entities/drive-file'; +import { DriveFiles } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/update.ts b/src/server/api/endpoints/drive/files/update.ts index d75da00119..1ef445625c 100644 --- a/src/server/api/endpoints/drive/files/update.ts +++ b/src/server/api/endpoints/drive/files/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishDriveStream } from '@/services/stream.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFiles, DriveFolders } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { publishDriveStream } from '@/services/stream'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFiles, DriveFolders } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/files/upload-from-url.ts b/src/server/api/endpoints/drive/files/upload-from-url.ts index 5f0c461dc3..f37f316efb 100644 --- a/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; +import { ID } from '@/misc/cafy-id'; import * as ms from 'ms'; -import uploadFromUrl from '@/services/drive/upload-from-url.js'; -import define from '../../../define.js'; -import { DriveFiles } from '@/models/index.js'; -import { publishMainStream } from '@/services/stream.js'; +import uploadFromUrl from '@/services/drive/upload-from-url'; +import define from '../../../define'; +import { DriveFiles } from '@/models/index'; +import { publishMainStream } from '@/services/stream'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders.ts b/src/server/api/endpoints/drive/folders.ts index 5e0561d579..6f16878b13 100644 --- a/src/server/api/endpoints/drive/folders.ts +++ b/src/server/api/endpoints/drive/folders.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { DriveFolders } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { DriveFolders } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/create.ts b/src/server/api/endpoints/drive/folders/create.ts index 5167ac0d19..80f96bd641 100644 --- a/src/server/api/endpoints/drive/folders/create.ts +++ b/src/server/api/endpoints/drive/folders/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishDriveStream } from '@/services/stream.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFolders } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { ID } from '@/misc/cafy-id'; +import { publishDriveStream } from '@/services/stream'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFolders } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/delete.ts b/src/server/api/endpoints/drive/folders/delete.ts index 3f2ef8f2c0..38b4aef103 100644 --- a/src/server/api/endpoints/drive/folders/delete.ts +++ b/src/server/api/endpoints/drive/folders/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { publishDriveStream } from '@/services/stream.js'; -import { ApiError } from '../../../error.js'; -import { DriveFolders, DriveFiles } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { publishDriveStream } from '@/services/stream'; +import { ApiError } from '../../../error'; +import { DriveFolders, DriveFiles } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/find.ts b/src/server/api/endpoints/drive/folders/find.ts index 7299dceccf..a6c5a49988 100644 --- a/src/server/api/endpoints/drive/folders/find.ts +++ b/src/server/api/endpoints/drive/folders/find.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { DriveFolders } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { DriveFolders } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/show.ts b/src/server/api/endpoints/drive/folders/show.ts index 7d46e853ba..e907a24f05 100644 --- a/src/server/api/endpoints/drive/folders/show.ts +++ b/src/server/api/endpoints/drive/folders/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFolders } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFolders } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/folders/update.ts b/src/server/api/endpoints/drive/folders/update.ts index 6598b6a8a4..612252e6df 100644 --- a/src/server/api/endpoints/drive/folders/update.ts +++ b/src/server/api/endpoints/drive/folders/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishDriveStream } from '@/services/stream.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { DriveFolders } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { publishDriveStream } from '@/services/stream'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { DriveFolders } from '@/models/index'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index da70b7b36c..141e02f748 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { DriveFiles } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { DriveFiles } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['drive'], diff --git a/src/server/api/endpoints/endpoint.ts b/src/server/api/endpoints/endpoint.ts index c8fb0f5f34..1a04d8bee8 100644 --- a/src/server/api/endpoints/endpoint.ts +++ b/src/server/api/endpoints/endpoint.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../define.js'; -import endpoints from '../endpoints.js'; +import define from '../define'; +import endpoints from '../endpoints'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/endpoints.ts b/src/server/api/endpoints/endpoints.ts index cd7bf45c4f..f7b9757d8d 100644 --- a/src/server/api/endpoints/endpoints.ts +++ b/src/server/api/endpoints/endpoints.ts @@ -1,5 +1,5 @@ -import define from '../define.js'; -import endpoints from '../endpoints.js'; +import define from '../define'; +import endpoints from '../endpoints'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/federation/dns.ts b/src/server/api/endpoints/federation/dns.ts index 4605cd5576..7ba566301a 100644 --- a/src/server/api/endpoints/federation/dns.ts +++ b/src/server/api/endpoints/federation/dns.ts @@ -1,8 +1,8 @@ import { promises as dns } from 'dns'; import $ from 'cafy'; -import define from '../../define.js'; -import { Instances } from '@/models/index.js'; -import { toPuny } from '@/misc/convert-host.js'; +import define from '../../define'; +import { Instances } from '@/models/index'; +import { toPuny } from '@/misc/convert-host'; const resolver = new dns.Resolver(); resolver.setServers(['1.1.1.1']); diff --git a/src/server/api/endpoints/federation/followers.ts b/src/server/api/endpoints/federation/followers.ts index 1c74f45030..655e7b7b9a 100644 --- a/src/server/api/endpoints/federation/followers.ts +++ b/src/server/api/endpoints/federation/followers.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Followings } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Followings } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/following.ts b/src/server/api/endpoints/federation/following.ts index b30f67af39..5b283581a6 100644 --- a/src/server/api/endpoints/federation/following.ts +++ b/src/server/api/endpoints/federation/following.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Followings } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Followings } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/instances.ts b/src/server/api/endpoints/federation/instances.ts index f16c04f5d5..cf5e44ebd5 100644 --- a/src/server/api/endpoints/federation/instances.ts +++ b/src/server/api/endpoints/federation/instances.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import config from '@/config/index.js'; -import define from '../../define.js'; -import { Instances } from '@/models/index.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; +import config from '@/config/index'; +import define from '../../define'; +import { Instances } from '@/models/index'; +import { fetchMeta } from '@/misc/fetch-meta'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/show-instance.ts b/src/server/api/endpoints/federation/show-instance.ts index d613a940ab..f8352aefb3 100644 --- a/src/server/api/endpoints/federation/show-instance.ts +++ b/src/server/api/endpoints/federation/show-instance.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Instances } from '@/models/index.js'; -import { toPuny } from '@/misc/convert-host.js'; +import define from '../../define'; +import { Instances } from '@/models/index'; +import { toPuny } from '@/misc/convert-host'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/update-remote-user.ts b/src/server/api/endpoints/federation/update-remote-user.ts index b8a383410d..580c3cb3d9 100644 --- a/src/server/api/endpoints/federation/update-remote-user.ts +++ b/src/server/api/endpoints/federation/update-remote-user.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { getRemoteUser } from '../../common/getters.js'; -import { updatePerson } from '@/remote/activitypub/models/person.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { getRemoteUser } from '../../common/getters'; +import { updatePerson } from '@/remote/activitypub/models/person'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/federation/users.ts b/src/server/api/endpoints/federation/users.ts index 9c7390b68e..0e35df3e1c 100644 --- a/src/server/api/endpoints/federation/users.ts +++ b/src/server/api/endpoints/federation/users.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Users } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['federation'], diff --git a/src/server/api/endpoints/following/create.ts b/src/server/api/endpoints/following/create.ts index 91b49b481d..ba9ca1092d 100644 --- a/src/server/api/endpoints/following/create.ts +++ b/src/server/api/endpoints/following/create.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; +import { ID } from '@/misc/cafy-id'; import * as ms from 'ms'; -import create from '@/services/following/create.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { Followings, Users } from '@/models/index.js'; +import create from '@/services/following/create'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { Followings, Users } from '@/models/index'; export const meta = { tags: ['following', 'users'], diff --git a/src/server/api/endpoints/following/delete.ts b/src/server/api/endpoints/following/delete.ts index 7b2d006f4f..0b0158b86e 100644 --- a/src/server/api/endpoints/following/delete.ts +++ b/src/server/api/endpoints/following/delete.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; +import { ID } from '@/misc/cafy-id'; import * as ms from 'ms'; -import deleteFollowing from '@/services/following/delete.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { Followings, Users } from '@/models/index.js'; +import deleteFollowing from '@/services/following/delete'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { Followings, Users } from '@/models/index'; export const meta = { tags: ['following', 'users'], diff --git a/src/server/api/endpoints/following/requests/accept.ts b/src/server/api/endpoints/following/requests/accept.ts index bf3c315c3c..af39ea1d90 100644 --- a/src/server/api/endpoints/following/requests/accept.ts +++ b/src/server/api/endpoints/following/requests/accept.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import acceptFollowRequest from '@/services/following/requests/accept.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import { ID } from '@/misc/cafy-id'; +import acceptFollowRequest from '@/services/following/requests/accept'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/following/requests/cancel.ts b/src/server/api/endpoints/following/requests/cancel.ts index 37e4c73096..b69c9d2fe1 100644 --- a/src/server/api/endpoints/following/requests/cancel.ts +++ b/src/server/api/endpoints/following/requests/cancel.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import cancelFollowRequest from '@/services/following/requests/cancel.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import cancelFollowRequest from '@/services/following/requests/cancel'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { Users } from '@/models/index'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/following/requests/list.ts b/src/server/api/endpoints/following/requests/list.ts index 1d6880d35d..84440ccac7 100644 --- a/src/server/api/endpoints/following/requests/list.ts +++ b/src/server/api/endpoints/following/requests/list.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { FollowRequests } from '@/models/index.js'; +import define from '../../../define'; +import { FollowRequests } from '@/models/index'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/following/requests/reject.ts b/src/server/api/endpoints/following/requests/reject.ts index 5e41473545..620324361f 100644 --- a/src/server/api/endpoints/following/requests/reject.ts +++ b/src/server/api/endpoints/following/requests/reject.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import rejectFollowRequest from '@/services/following/requests/reject.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import { ID } from '@/misc/cafy-id'; +import rejectFollowRequest from '@/services/following/requests/reject'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; export const meta = { tags: ['following', 'account'], diff --git a/src/server/api/endpoints/gallery/featured.ts b/src/server/api/endpoints/gallery/featured.ts index 6e8118850c..30ef8cedec 100644 --- a/src/server/api/endpoints/gallery/featured.ts +++ b/src/server/api/endpoints/gallery/featured.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { GalleryPosts } from '@/models/index.js'; +import define from '../../define'; +import { GalleryPosts } from '@/models/index'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/popular.ts b/src/server/api/endpoints/gallery/popular.ts index 6c3db479c3..18449b9654 100644 --- a/src/server/api/endpoints/gallery/popular.ts +++ b/src/server/api/endpoints/gallery/popular.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { GalleryPosts } from '@/models/index.js'; +import define from '../../define'; +import { GalleryPosts } from '@/models/index'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts.ts b/src/server/api/endpoints/gallery/posts.ts index 625070ca29..53d3236d2d 100644 --- a/src/server/api/endpoints/gallery/posts.ts +++ b/src/server/api/endpoints/gallery/posts.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { GalleryPosts } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { GalleryPosts } from '@/models/index'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/create.ts b/src/server/api/endpoints/gallery/posts/create.ts index e1c7345171..38b487e6ea 100644 --- a/src/server/api/endpoints/gallery/posts/create.ts +++ b/src/server/api/endpoints/gallery/posts/create.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../../define.js'; -import { ID } from '../../../../../misc/cafy-id.js'; -import { DriveFiles, GalleryPosts } from '@/models/index.js'; -import { genId } from '../../../../../misc/gen-id.js'; -import { GalleryPost } from '@/models/entities/gallery-post.js'; -import { ApiError } from '../../../error.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; +import define from '../../../define'; +import { ID } from '../../../../../misc/cafy-id'; +import { DriveFiles, GalleryPosts } from '@/models/index'; +import { genId } from '../../../../../misc/gen-id'; +import { GalleryPost } from '@/models/entities/gallery-post'; +import { ApiError } from '../../../error'; +import { DriveFile } from '@/models/entities/drive-file'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/delete.ts b/src/server/api/endpoints/gallery/posts/delete.ts index 65819206c8..e5b7c07f2f 100644 --- a/src/server/api/endpoints/gallery/posts/delete.ts +++ b/src/server/api/endpoints/gallery/posts/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { GalleryPosts } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { GalleryPosts } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/like.ts b/src/server/api/endpoints/gallery/posts/like.ts index 80ec1b8745..81a25c0ad1 100644 --- a/src/server/api/endpoints/gallery/posts/like.ts +++ b/src/server/api/endpoints/gallery/posts/like.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { GalleryPosts, GalleryLikes } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { GalleryPosts, GalleryLikes } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/show.ts b/src/server/api/endpoints/gallery/posts/show.ts index 777fb76e3a..93852a5f8d 100644 --- a/src/server/api/endpoints/gallery/posts/show.ts +++ b/src/server/api/endpoints/gallery/posts/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { GalleryPosts } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { GalleryPosts } from '@/models/index'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/unlike.ts b/src/server/api/endpoints/gallery/posts/unlike.ts index 1ddafcec90..0347cdf79e 100644 --- a/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/src/server/api/endpoints/gallery/posts/unlike.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { GalleryPosts, GalleryLikes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { GalleryPosts, GalleryLikes } from '@/models/index'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/gallery/posts/update.ts b/src/server/api/endpoints/gallery/posts/update.ts index 5906f29e86..54eea130d3 100644 --- a/src/server/api/endpoints/gallery/posts/update.ts +++ b/src/server/api/endpoints/gallery/posts/update.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../../define.js'; -import { ID } from '../../../../../misc/cafy-id.js'; -import { DriveFiles, GalleryPosts } from '@/models/index.js'; -import { GalleryPost } from '@/models/entities/gallery-post.js'; -import { ApiError } from '../../../error.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; +import define from '../../../define'; +import { ID } from '../../../../../misc/cafy-id'; +import { DriveFiles, GalleryPosts } from '@/models/index'; +import { GalleryPost } from '@/models/entities/gallery-post'; +import { ApiError } from '../../../error'; +import { DriveFile } from '@/models/entities/drive-file'; export const meta = { tags: ['gallery'], diff --git a/src/server/api/endpoints/games/reversi/games.ts b/src/server/api/endpoints/games/reversi/games.ts index d62a039e16..4db9ecb69f 100644 --- a/src/server/api/endpoints/games/reversi/games.ts +++ b/src/server/api/endpoints/games/reversi/games.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ReversiGames } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ReversiGames } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/games/reversi/games/show.ts b/src/server/api/endpoints/games/reversi/games/show.ts index 02da583f47..93afffdb1f 100644 --- a/src/server/api/endpoints/games/reversi/games/show.ts +++ b/src/server/api/endpoints/games/reversi/games/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import Reversi from '../../../../../../games/reversi/core.js'; -import define from '../../../../define.js'; -import { ApiError } from '../../../../error.js'; -import { ReversiGames } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import Reversi from '../../../../../../games/reversi/core'; +import define from '../../../../define'; +import { ApiError } from '../../../../error'; +import { ReversiGames } from '@/models/index'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/games/surrender.ts b/src/server/api/endpoints/games/reversi/games/surrender.ts index 371d2475f3..00d58b19e3 100644 --- a/src/server/api/endpoints/games/reversi/games/surrender.ts +++ b/src/server/api/endpoints/games/reversi/games/surrender.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishReversiGameStream } from '@/services/stream.js'; -import define from '../../../../define.js'; -import { ApiError } from '../../../../error.js'; -import { ReversiGames } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { publishReversiGameStream } from '@/services/stream'; +import define from '../../../../define'; +import { ApiError } from '../../../../error'; +import { ReversiGames } from '@/models/index'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/invitations.ts b/src/server/api/endpoints/games/reversi/invitations.ts index 5745ba566e..c8629377b2 100644 --- a/src/server/api/endpoints/games/reversi/invitations.ts +++ b/src/server/api/endpoints/games/reversi/invitations.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { ReversiMatchings } from '@/models/index.js'; +import define from '../../../define'; +import { ReversiMatchings } from '@/models/index'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/match.ts b/src/server/api/endpoints/games/reversi/match.ts index e02d11f4eb..5ceb16c7d7 100644 --- a/src/server/api/endpoints/games/reversi/match.ts +++ b/src/server/api/endpoints/games/reversi/match.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishMainStream, publishReversiStream } from '@/services/stream.js'; -import { eighteight } from '../../../../../games/reversi/maps.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { genId } from '@/misc/gen-id.js'; -import { ReversiMatchings, ReversiGames } from '@/models/index.js'; -import { ReversiGame } from '@/models/entities/games/reversi/game.js'; -import { ReversiMatching } from '@/models/entities/games/reversi/matching.js'; +import { ID } from '@/misc/cafy-id'; +import { publishMainStream, publishReversiStream } from '@/services/stream'; +import { eighteight } from '../../../../../games/reversi/maps'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { genId } from '@/misc/gen-id'; +import { ReversiMatchings, ReversiGames } from '@/models/index'; +import { ReversiGame } from '@/models/entities/games/reversi/game'; +import { ReversiMatching } from '@/models/entities/games/reversi/matching'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/games/reversi/match/cancel.ts b/src/server/api/endpoints/games/reversi/match/cancel.ts index 2e5c086572..e4a138bb87 100644 --- a/src/server/api/endpoints/games/reversi/match/cancel.ts +++ b/src/server/api/endpoints/games/reversi/match/cancel.ts @@ -1,5 +1,5 @@ -import define from '../../../../define.js'; -import { ReversiMatchings } from '@/models/index.js'; +import define from '../../../../define'; +import { ReversiMatchings } from '@/models/index'; export const meta = { tags: ['games'], diff --git a/src/server/api/endpoints/get-online-users-count.ts b/src/server/api/endpoints/get-online-users-count.ts index 00b838ddcd..5c80d588d3 100644 --- a/src/server/api/endpoints/get-online-users-count.ts +++ b/src/server/api/endpoints/get-online-users-count.ts @@ -1,7 +1,7 @@ -import { USER_ONLINE_THRESHOLD } from '@/const.js'; -import { Users } from '@/models/index.js'; +import { USER_ONLINE_THRESHOLD } from '@/const'; +import { Users } from '@/models/index'; import { MoreThan } from 'typeorm'; -import define from '../define.js'; +import define from '../define'; export const meta = { tags: ['meta'], diff --git a/src/server/api/endpoints/hashtags/list.ts b/src/server/api/endpoints/hashtags/list.ts index 0453b0acf8..821016a50c 100644 --- a/src/server/api/endpoints/hashtags/list.ts +++ b/src/server/api/endpoints/hashtags/list.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Hashtags } from '@/models/index.js'; +import define from '../../define'; +import { Hashtags } from '@/models/index'; export const meta = { tags: ['hashtags'], diff --git a/src/server/api/endpoints/hashtags/search.ts b/src/server/api/endpoints/hashtags/search.ts index 025023f54e..fd0cac3983 100644 --- a/src/server/api/endpoints/hashtags/search.ts +++ b/src/server/api/endpoints/hashtags/search.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Hashtags } from '@/models/index.js'; +import define from '../../define'; +import { Hashtags } from '@/models/index'; export const meta = { tags: ['hashtags'], diff --git a/src/server/api/endpoints/hashtags/show.ts b/src/server/api/endpoints/hashtags/show.ts index 50f330fef1..f22edbfffd 100644 --- a/src/server/api/endpoints/hashtags/show.ts +++ b/src/server/api/endpoints/hashtags/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Hashtags } from '@/models/index.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Hashtags } from '@/models/index'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; export const meta = { tags: ['hashtags'], diff --git a/src/server/api/endpoints/hashtags/trend.ts b/src/server/api/endpoints/hashtags/trend.ts index 21ac69057b..3d67241ab6 100644 --- a/src/server/api/endpoints/hashtags/trend.ts +++ b/src/server/api/endpoints/hashtags/trend.ts @@ -1,10 +1,10 @@ import { Brackets } from 'typeorm'; -import define from '../../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Notes } from '@/models/index.js'; -import { Note } from '@/models/entities/note.js'; -import { safeForSql } from '@/misc/safe-for-sql.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import define from '../../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Notes } from '@/models/index'; +import { Note } from '@/models/entities/note'; +import { safeForSql } from '@/misc/safe-for-sql'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; /* トレンドに載るためには「『直近a分間のユニーク投稿数が今からa分前~今からb分前の間のユニーク投稿数のn倍以上』のハッシュタグの上位5位以内に入る」ことが必要 diff --git a/src/server/api/endpoints/hashtags/users.ts b/src/server/api/endpoints/hashtags/users.ts index 2ddf066e90..8c8cd1510b 100644 --- a/src/server/api/endpoints/hashtags/users.ts +++ b/src/server/api/endpoints/hashtags/users.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import define from '../../define'; +import { Users } from '@/models/index'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/i.ts b/src/server/api/endpoints/i.ts index 12b97e9911..0568a962d8 100644 --- a/src/server/api/endpoints/i.ts +++ b/src/server/api/endpoints/i.ts @@ -1,5 +1,5 @@ -import define from '../define.js'; -import { Users } from '@/models/index.js'; +import define from '../define'; +import { Users } from '@/models/index'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/2fa/done.ts b/src/server/api/endpoints/i/2fa/done.ts index 1c1f0557da..2bd2128cce 100644 --- a/src/server/api/endpoints/i/2fa/done.ts +++ b/src/server/api/endpoints/i/2fa/done.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import * as speakeasy from 'speakeasy'; -import define from '../../../define.js'; -import { UserProfiles } from '@/models/index.js'; +import define from '../../../define'; +import { UserProfiles } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/key-done.ts b/src/server/api/endpoints/i/2fa/key-done.ts index ea9976bd56..b4d3af235a 100644 --- a/src/server/api/endpoints/i/2fa/key-done.ts +++ b/src/server/api/endpoints/i/2fa/key-done.ts @@ -2,16 +2,16 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; import { promisify } from 'util'; import * as cbor from 'cbor'; -import define from '../../../define.js'; +import define from '../../../define'; import { UserProfiles, UserSecurityKeys, AttestationChallenges, Users -} from '@/models/index.js'; -import config from '@/config/index.js'; -import { procedures, hash } from '../../../2fa.js'; -import { publishMainStream } from '@/services/stream.js'; +} from '@/models/index'; +import config from '@/config/index'; +import { procedures, hash } from '../../../2fa'; +import { publishMainStream } from '@/services/stream'; const cborDecodeFirst = promisify(cbor.decodeFirst) as any; diff --git a/src/server/api/endpoints/i/2fa/password-less.ts b/src/server/api/endpoints/i/2fa/password-less.ts index b62ba25b98..064828b638 100644 --- a/src/server/api/endpoints/i/2fa/password-less.ts +++ b/src/server/api/endpoints/i/2fa/password-less.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { UserProfiles } from '@/models/index.js'; +import define from '../../../define'; +import { UserProfiles } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/register-key.ts b/src/server/api/endpoints/i/2fa/register-key.ts index 12e0afd93e..1b385a10ee 100644 --- a/src/server/api/endpoints/i/2fa/register-key.ts +++ b/src/server/api/endpoints/i/2fa/register-key.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../../define.js'; -import { UserProfiles, AttestationChallenges } from '@/models/index.js'; +import define from '../../../define'; +import { UserProfiles, AttestationChallenges } from '@/models/index'; import { promisify } from 'util'; import * as crypto from 'crypto'; -import { genId } from '@/misc/gen-id.js'; -import { hash } from '../../../2fa.js'; +import { genId } from '@/misc/gen-id'; +import { hash } from '../../../2fa'; const randomBytes = promisify(crypto.randomBytes); diff --git a/src/server/api/endpoints/i/2fa/register.ts b/src/server/api/endpoints/i/2fa/register.ts index 7a3a6ec4cf..b03b98188a 100644 --- a/src/server/api/endpoints/i/2fa/register.ts +++ b/src/server/api/endpoints/i/2fa/register.ts @@ -2,9 +2,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; import * as speakeasy from 'speakeasy'; import * as QRCode from 'qrcode'; -import config from '@/config/index.js'; -import define from '../../../define.js'; -import { UserProfiles } from '@/models/index.js'; +import config from '@/config/index'; +import define from '../../../define'; +import { UserProfiles } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/remove-key.ts b/src/server/api/endpoints/i/2fa/remove-key.ts index 2c74a8a856..dea56301ab 100644 --- a/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/src/server/api/endpoints/i/2fa/remove-key.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../../define.js'; -import { UserProfiles, UserSecurityKeys, Users } from '@/models/index.js'; -import { publishMainStream } from '@/services/stream.js'; +import define from '../../../define'; +import { UserProfiles, UserSecurityKeys, Users } from '@/models/index'; +import { publishMainStream } from '@/services/stream'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/2fa/unregister.ts b/src/server/api/endpoints/i/2fa/unregister.ts index 47f6c0f876..af53033daa 100644 --- a/src/server/api/endpoints/i/2fa/unregister.ts +++ b/src/server/api/endpoints/i/2fa/unregister.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../../define.js'; -import { UserProfiles } from '@/models/index.js'; +import define from '../../../define'; +import { UserProfiles } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/apps.ts b/src/server/api/endpoints/i/apps.ts index 3cb7038a53..994528e5c9 100644 --- a/src/server/api/endpoints/i/apps.ts +++ b/src/server/api/endpoints/i/apps.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { AccessTokens } from '@/models/index.js'; +import define from '../../define'; +import { AccessTokens } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/authorized-apps.ts b/src/server/api/endpoints/i/authorized-apps.ts index 63cb87cf09..042fcd14e8 100644 --- a/src/server/api/endpoints/i/authorized-apps.ts +++ b/src/server/api/endpoints/i/authorized-apps.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { AccessTokens, Apps } from '@/models/index.js'; +import define from '../../define'; +import { AccessTokens, Apps } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/change-password.ts b/src/server/api/endpoints/i/change-password.ts index 545df032cd..7ea5f8c488 100644 --- a/src/server/api/endpoints/i/change-password.ts +++ b/src/server/api/endpoints/i/change-password.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../define.js'; -import { UserProfiles } from '@/models/index.js'; +import define from '../../define'; +import { UserProfiles } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/delete-account.ts b/src/server/api/endpoints/i/delete-account.ts index 02c03e5ba0..f761e5cc34 100644 --- a/src/server/api/endpoints/i/delete-account.ts +++ b/src/server/api/endpoints/i/delete-account.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import define from '../../define.js'; -import { Users, UserProfiles } from '@/models/index.js'; -import { doPostSuspend } from '@/services/suspend-user.js'; -import { publishUserEvent } from '@/services/stream.js'; +import define from '../../define'; +import { Users, UserProfiles } from '@/models/index'; +import { doPostSuspend } from '@/services/suspend-user'; +import { publishUserEvent } from '@/services/stream'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/export-blocking.ts b/src/server/api/endpoints/i/export-blocking.ts index 219fbb1ef1..e4797da0c1 100644 --- a/src/server/api/endpoints/i/export-blocking.ts +++ b/src/server/api/endpoints/i/export-blocking.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { createExportBlockingJob } from '@/queue/index.js'; +import define from '../../define'; +import { createExportBlockingJob } from '@/queue/index'; import * as ms from 'ms'; export const meta = { diff --git a/src/server/api/endpoints/i/export-following.ts b/src/server/api/endpoints/i/export-following.ts index 2d6a8c2e3a..b0f154cda8 100644 --- a/src/server/api/endpoints/i/export-following.ts +++ b/src/server/api/endpoints/i/export-following.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { createExportFollowingJob } from '@/queue/index.js'; +import define from '../../define'; +import { createExportFollowingJob } from '@/queue/index'; import * as ms from 'ms'; export const meta = { diff --git a/src/server/api/endpoints/i/export-mute.ts b/src/server/api/endpoints/i/export-mute.ts index a96ca1d5bb..46d547fa53 100644 --- a/src/server/api/endpoints/i/export-mute.ts +++ b/src/server/api/endpoints/i/export-mute.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { createExportMuteJob } from '@/queue/index.js'; +import define from '../../define'; +import { createExportMuteJob } from '@/queue/index'; import * as ms from 'ms'; export const meta = { diff --git a/src/server/api/endpoints/i/export-notes.ts b/src/server/api/endpoints/i/export-notes.ts index ff8e02a01b..441bf16896 100644 --- a/src/server/api/endpoints/i/export-notes.ts +++ b/src/server/api/endpoints/i/export-notes.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { createExportNotesJob } from '@/queue/index.js'; +import define from '../../define'; +import { createExportNotesJob } from '@/queue/index'; import * as ms from 'ms'; export const meta = { diff --git a/src/server/api/endpoints/i/export-user-lists.ts b/src/server/api/endpoints/i/export-user-lists.ts index 4554e512d3..24043a862a 100644 --- a/src/server/api/endpoints/i/export-user-lists.ts +++ b/src/server/api/endpoints/i/export-user-lists.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { createExportUserListsJob } from '@/queue/index.js'; +import define from '../../define'; +import { createExportUserListsJob } from '@/queue/index'; import * as ms from 'ms'; export const meta = { diff --git a/src/server/api/endpoints/i/favorites.ts b/src/server/api/endpoints/i/favorites.ts index 99ce45e9b5..b79d68ae73 100644 --- a/src/server/api/endpoints/i/favorites.ts +++ b/src/server/api/endpoints/i/favorites.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { NoteFavorites } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { NoteFavorites } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['account', 'notes', 'favorites'], diff --git a/src/server/api/endpoints/i/gallery/likes.ts b/src/server/api/endpoints/i/gallery/likes.ts index 0ddcdad5b9..7a2935a5ec 100644 --- a/src/server/api/endpoints/i/gallery/likes.ts +++ b/src/server/api/endpoints/i/gallery/likes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { GalleryLikes } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { GalleryLikes } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; export const meta = { tags: ['account', 'gallery'], diff --git a/src/server/api/endpoints/i/gallery/posts.ts b/src/server/api/endpoints/i/gallery/posts.ts index 74518c792c..21bb8759fc 100644 --- a/src/server/api/endpoints/i/gallery/posts.ts +++ b/src/server/api/endpoints/i/gallery/posts.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { GalleryPosts } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { GalleryPosts } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; export const meta = { tags: ['account', 'gallery'], diff --git a/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/src/server/api/endpoints/i/get-word-muted-notes-count.ts index a18a5c779b..6b9be98582 100644 --- a/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { MutedNotes } from '@/models/index.js'; +import define from '../../define'; +import { MutedNotes } from '@/models/index'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/import-following.ts b/src/server/api/endpoints/i/import-following.ts index bb4558cc5c..b3de397661 100644 --- a/src/server/api/endpoints/i/import-following.ts +++ b/src/server/api/endpoints/i/import-following.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { createImportFollowingJob } from '@/queue/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { createImportFollowingJob } from '@/queue/index'; import * as ms from 'ms'; -import { ApiError } from '../../error.js'; -import { DriveFiles } from '@/models/index.js'; +import { ApiError } from '../../error'; +import { DriveFiles } from '@/models/index'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/import-user-lists.ts b/src/server/api/endpoints/i/import-user-lists.ts index 99465b1fed..9069a019a9 100644 --- a/src/server/api/endpoints/i/import-user-lists.ts +++ b/src/server/api/endpoints/i/import-user-lists.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { createImportUserListsJob } from '@/queue/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { createImportUserListsJob } from '@/queue/index'; import * as ms from 'ms'; -import { ApiError } from '../../error.js'; -import { DriveFiles } from '@/models/index.js'; +import { ApiError } from '../../error'; +import { DriveFiles } from '@/models/index'; export const meta = { secure: true, diff --git a/src/server/api/endpoints/i/notifications.ts b/src/server/api/endpoints/i/notifications.ts index fb7fcea579..3c265a10c1 100644 --- a/src/server/api/endpoints/i/notifications.ts +++ b/src/server/api/endpoints/i/notifications.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { readNotification } from '../../common/read-notification.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { Notifications, Followings, Mutings, Users } from '@/models/index.js'; -import { notificationTypes } from '../../../../types.js'; -import read from '@/services/note/read.js'; +import { ID } from '@/misc/cafy-id'; +import { readNotification } from '../../common/read-notification'; +import define from '../../define'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { Notifications, Followings, Mutings, Users } from '@/models/index'; +import { notificationTypes } from '../../../../types'; +import read from '@/services/note/read'; export const meta = { tags: ['account', 'notifications'], diff --git a/src/server/api/endpoints/i/page-likes.ts b/src/server/api/endpoints/i/page-likes.ts index 231b029b28..fa2bc31730 100644 --- a/src/server/api/endpoints/i/page-likes.ts +++ b/src/server/api/endpoints/i/page-likes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { PageLikes } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { PageLikes } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['account', 'pages'], diff --git a/src/server/api/endpoints/i/pages.ts b/src/server/api/endpoints/i/pages.ts index 1547212197..ee87fffa2d 100644 --- a/src/server/api/endpoints/i/pages.ts +++ b/src/server/api/endpoints/i/pages.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Pages } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Pages } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['account', 'pages'], diff --git a/src/server/api/endpoints/i/pin.ts b/src/server/api/endpoints/i/pin.ts index 689e1ae641..de94220ba9 100644 --- a/src/server/api/endpoints/i/pin.ts +++ b/src/server/api/endpoints/i/pin.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { addPinned } from '@/services/i/pin.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { addPinned } from '@/services/i/pin'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Users } from '@/models/index'; export const meta = { tags: ['account', 'notes'], diff --git a/src/server/api/endpoints/i/read-all-messaging-messages.ts b/src/server/api/endpoints/i/read-all-messaging-messages.ts index fe0e6e558a..9aca7611c9 100644 --- a/src/server/api/endpoints/i/read-all-messaging-messages.ts +++ b/src/server/api/endpoints/i/read-all-messaging-messages.ts @@ -1,6 +1,6 @@ -import { publishMainStream } from '@/services/stream.js'; -import define from '../../define.js'; -import { MessagingMessages, UserGroupJoinings } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../../define'; +import { MessagingMessages, UserGroupJoinings } from '@/models/index'; export const meta = { tags: ['account', 'messaging'], diff --git a/src/server/api/endpoints/i/read-all-unread-notes.ts b/src/server/api/endpoints/i/read-all-unread-notes.ts index 635c483b75..2a7102a590 100644 --- a/src/server/api/endpoints/i/read-all-unread-notes.ts +++ b/src/server/api/endpoints/i/read-all-unread-notes.ts @@ -1,6 +1,6 @@ -import { publishMainStream } from '@/services/stream.js'; -import define from '../../define.js'; -import { NoteUnreads } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../../define'; +import { NoteUnreads } from '@/models/index'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/read-announcement.ts b/src/server/api/endpoints/i/read-announcement.ts index 6a1050c05e..2f5036f953 100644 --- a/src/server/api/endpoints/i/read-announcement.ts +++ b/src/server/api/endpoints/i/read-announcement.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { genId } from '@/misc/gen-id.js'; -import { AnnouncementReads, Announcements, Users } from '@/models/index.js'; -import { publishMainStream } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { genId } from '@/misc/gen-id'; +import { AnnouncementReads, Announcements, Users } from '@/models/index'; +import { publishMainStream } from '@/services/stream'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/regenerate-token.ts b/src/server/api/endpoints/i/regenerate-token.ts index af22d53770..1cce2d37be 100644 --- a/src/server/api/endpoints/i/regenerate-token.ts +++ b/src/server/api/endpoints/i/regenerate-token.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import { publishMainStream, publishUserEvent } from '@/services/stream.js'; -import generateUserToken from '../../common/generate-native-user-token.js'; -import define from '../../define.js'; -import { Users, UserProfiles } from '@/models/index.js'; +import { publishMainStream, publishUserEvent } from '@/services/stream'; +import generateUserToken from '../../common/generate-native-user-token'; +import define from '../../define'; +import { Users, UserProfiles } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/get-all.ts b/src/server/api/endpoints/i/registry/get-all.ts index 6d5a4ec31f..c8eaf83a25 100644 --- a/src/server/api/endpoints/i/registry/get-all.ts +++ b/src/server/api/endpoints/i/registry/get-all.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/get-detail.ts b/src/server/api/endpoints/i/registry/get-detail.ts index 81a81b0217..992800c44c 100644 --- a/src/server/api/endpoints/i/registry/get-detail.ts +++ b/src/server/api/endpoints/i/registry/get-detail.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; +import { ApiError } from '../../../error'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/get.ts b/src/server/api/endpoints/i/registry/get.ts index 8bdec7986a..569c3a9280 100644 --- a/src/server/api/endpoints/i/registry/get.ts +++ b/src/server/api/endpoints/i/registry/get.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; +import { ApiError } from '../../../error'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/keys-with-type.ts b/src/server/api/endpoints/i/registry/keys-with-type.ts index 1aeba71fe2..16a4fee374 100644 --- a/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/keys.ts b/src/server/api/endpoints/i/registry/keys.ts index 1c3836d7a0..3a8aeaa195 100644 --- a/src/server/api/endpoints/i/registry/keys.ts +++ b/src/server/api/endpoints/i/registry/keys.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/remove.ts b/src/server/api/endpoints/i/registry/remove.ts index 64cf5fbb74..07bc23d4a6 100644 --- a/src/server/api/endpoints/i/registry/remove.ts +++ b/src/server/api/endpoints/i/registry/remove.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; -import { ApiError } from '../../../error.js'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; +import { ApiError } from '../../../error'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/scopes.ts b/src/server/api/endpoints/i/registry/scopes.ts index 094dfbef88..ecbdb05a8e 100644 --- a/src/server/api/endpoints/i/registry/scopes.ts +++ b/src/server/api/endpoints/i/registry/scopes.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/registry/set.ts b/src/server/api/endpoints/i/registry/set.ts index 099ccd27ba..f129ee1b70 100644 --- a/src/server/api/endpoints/i/registry/set.ts +++ b/src/server/api/endpoints/i/registry/set.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { publishMainStream } from '@/services/stream.js'; -import define from '../../../define.js'; -import { RegistryItems } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../../../define'; +import { RegistryItems } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/revoke-token.ts b/src/server/api/endpoints/i/revoke-token.ts index 3f3a2fa939..bed868def4 100644 --- a/src/server/api/endpoints/i/revoke-token.ts +++ b/src/server/api/endpoints/i/revoke-token.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { AccessTokens } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; -import { publishUserEvent } from '@/services/stream.js'; +import define from '../../define'; +import { AccessTokens } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; +import { publishUserEvent } from '@/services/stream'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/signin-history.ts b/src/server/api/endpoints/i/signin-history.ts index 215c7b1fc9..a2c10148c6 100644 --- a/src/server/api/endpoints/i/signin-history.ts +++ b/src/server/api/endpoints/i/signin-history.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Signins } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Signins } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/unpin.ts b/src/server/api/endpoints/i/unpin.ts index f8c451aa2e..dc79e255ab 100644 --- a/src/server/api/endpoints/i/unpin.ts +++ b/src/server/api/endpoints/i/unpin.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { removePinned } from '@/services/i/pin.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { removePinned } from '@/services/i/pin'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Users } from '@/models/index'; export const meta = { tags: ['account', 'notes'], diff --git a/src/server/api/endpoints/i/update-email.ts b/src/server/api/endpoints/i/update-email.ts index 142a7aa75c..14aedad88b 100644 --- a/src/server/api/endpoints/i/update-email.ts +++ b/src/server/api/endpoints/i/update-email.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { publishMainStream } from '@/services/stream.js'; -import define from '../../define.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../../define'; import rndstr from 'rndstr'; -import config from '@/config/index.js'; +import config from '@/config/index'; import * as ms from 'ms'; import * as bcrypt from 'bcryptjs'; -import { Users, UserProfiles } from '@/models/index.js'; -import { sendEmail } from '@/services/send-email.js'; -import { ApiError } from '../../error.js'; +import { Users, UserProfiles } from '@/models/index'; +import { sendEmail } from '@/services/send-email'; +import { ApiError } from '../../error'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index e8881f94de..fb7e12760e 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -1,20 +1,20 @@ import $ from 'cafy'; import * as mfm from 'mfm-js'; -import { ID } from '@/misc/cafy-id.js'; -import { publishMainStream, publishUserEvent } from '@/services/stream.js'; -import acceptAllFollowRequests from '@/services/following/requests/accept-all.js'; -import { publishToFollowers } from '@/services/i/update.js'; -import define from '../../define.js'; -import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; -import { extractHashtags } from '@/misc/extract-hashtags.js'; +import { ID } from '@/misc/cafy-id'; +import { publishMainStream, publishUserEvent } from '@/services/stream'; +import acceptAllFollowRequests from '@/services/following/requests/accept-all'; +import { publishToFollowers } from '@/services/i/update'; +import define from '../../define'; +import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm'; +import { extractHashtags } from '@/misc/extract-hashtags'; import * as langmap from 'langmap'; -import { updateUsertags } from '@/services/update-hashtag.js'; -import { ApiError } from '../../error.js'; -import { Users, DriveFiles, UserProfiles, Pages } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; -import { UserProfile } from '@/models/entities/user-profile.js'; -import { notificationTypes } from '../../../../types.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import { updateUsertags } from '@/services/update-hashtag'; +import { ApiError } from '../../error'; +import { Users, DriveFiles, UserProfiles, Pages } from '@/models/index'; +import { User } from '@/models/entities/user'; +import { UserProfile } from '@/models/entities/user-profile'; +import { notificationTypes } from '../../../../types'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/i/user-group-invites.ts b/src/server/api/endpoints/i/user-group-invites.ts index 57148bac5d..1ebde243ca 100644 --- a/src/server/api/endpoints/i/user-group-invites.ts +++ b/src/server/api/endpoints/i/user-group-invites.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { UserGroupInvitations } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { UserGroupInvitations } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['account', 'groups'], diff --git a/src/server/api/endpoints/messaging/history.ts b/src/server/api/endpoints/messaging/history.ts index 6f098a0940..e447703546 100644 --- a/src/server/api/endpoints/messaging/history.ts +++ b/src/server/api/endpoints/messaging/history.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { MessagingMessage } from '@/models/entities/messaging-message.js'; -import { MessagingMessages, Mutings, UserGroupJoinings } from '@/models/index.js'; +import define from '../../define'; +import { MessagingMessage } from '@/models/entities/messaging-message'; +import { MessagingMessages, Mutings, UserGroupJoinings } from '@/models/index'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/messaging/messages.ts b/src/server/api/endpoints/messaging/messages.ts index 3541001ae1..6baa24609e 100644 --- a/src/server/api/endpoints/messaging/messages.ts +++ b/src/server/api/endpoints/messaging/messages.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { MessagingMessages, UserGroups, UserGroupJoinings, Users } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { MessagingMessages, UserGroups, UserGroupJoinings, Users } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; import { Brackets } from 'typeorm'; -import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message.js'; +import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/messaging/messages/create.ts b/src/server/api/endpoints/messaging/messages/create.ts index c6902dc1b6..df0b455cbe 100644 --- a/src/server/api/endpoints/messaging/messages/create.ts +++ b/src/server/api/endpoints/messaging/messages/create.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { MessagingMessages, DriveFiles, UserGroups, UserGroupJoinings, Blockings } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; -import { UserGroup } from '@/models/entities/user-group.js'; -import { createMessage } from '@/services/messages/create.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { MessagingMessages, DriveFiles, UserGroups, UserGroupJoinings, Blockings } from '@/models/index'; +import { User } from '@/models/entities/user'; +import { UserGroup } from '@/models/entities/user-group'; +import { createMessage } from '@/services/messages/create'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/messaging/messages/delete.ts b/src/server/api/endpoints/messaging/messages/delete.ts index 54559560c9..bd4890fc8a 100644 --- a/src/server/api/endpoints/messaging/messages/delete.ts +++ b/src/server/api/endpoints/messaging/messages/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; import * as ms from 'ms'; -import { ApiError } from '../../../error.js'; -import { MessagingMessages } from '@/models/index.js'; -import { deleteMessage } from '@/services/messages/delete.js'; +import { ApiError } from '../../../error'; +import { MessagingMessages } from '@/models/index'; +import { deleteMessage } from '@/services/messages/delete'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/messaging/messages/read.ts b/src/server/api/endpoints/messaging/messages/read.ts index ac822b6a36..a1747310d3 100644 --- a/src/server/api/endpoints/messaging/messages/read.ts +++ b/src/server/api/endpoints/messaging/messages/read.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { MessagingMessages } from '@/models/index.js'; -import { readUserMessagingMessage, readGroupMessagingMessage } from '../../../common/read-messaging-message.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { MessagingMessages } from '@/models/index'; +import { readUserMessagingMessage, readGroupMessagingMessage } from '../../../common/read-messaging-message'; export const meta = { tags: ['messaging'], diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 579e963af9..1c87952f6a 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import config from '@/config/index.js'; -import define from '../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Ads, Emojis, Users } from '@/models/index.js'; -import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits.js'; +import config from '@/config/index'; +import define from '../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Ads, Emojis, Users } from '@/models/index'; +import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; import { MoreThan } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/miauth/gen-token.ts b/src/server/api/endpoints/miauth/gen-token.ts index b026d995a5..321fa42fc9 100644 --- a/src/server/api/endpoints/miauth/gen-token.ts +++ b/src/server/api/endpoints/miauth/gen-token.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { AccessTokens } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { secureRndstr } from '@/misc/secure-rndstr.js'; +import define from '../../define'; +import { AccessTokens } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { secureRndstr } from '@/misc/secure-rndstr'; export const meta = { tags: ['auth'], diff --git a/src/server/api/endpoints/mute/create.ts b/src/server/api/endpoints/mute/create.ts index 5fdb21a449..5163ed63db 100644 --- a/src/server/api/endpoints/mute/create.ts +++ b/src/server/api/endpoints/mute/create.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { genId } from '@/misc/gen-id.js'; -import { Mutings, NoteWatchings } from '@/models/index.js'; -import { Muting } from '@/models/entities/muting.js'; -import { publishUserEvent } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { genId } from '@/misc/gen-id'; +import { Mutings, NoteWatchings } from '@/models/index'; +import { Muting } from '@/models/entities/muting'; +import { publishUserEvent } from '@/services/stream'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/mute/delete.ts b/src/server/api/endpoints/mute/delete.ts index 041e5df208..3ffd1f4562 100644 --- a/src/server/api/endpoints/mute/delete.ts +++ b/src/server/api/endpoints/mute/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { Mutings } from '@/models/index.js'; -import { publishUserEvent } from '@/services/stream.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { Mutings } from '@/models/index'; +import { publishUserEvent } from '@/services/stream'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/mute/list.ts b/src/server/api/endpoints/mute/list.ts index 0024506eb0..ae4c3a719d 100644 --- a/src/server/api/endpoints/mute/list.ts +++ b/src/server/api/endpoints/mute/list.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { Mutings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { Mutings } from '@/models/index'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/my/apps.ts b/src/server/api/endpoints/my/apps.ts index 268408698b..d91562b62f 100644 --- a/src/server/api/endpoints/my/apps.ts +++ b/src/server/api/endpoints/my/apps.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Apps } from '@/models/index.js'; +import define from '../../define'; +import { Apps } from '@/models/index'; export const meta = { tags: ['account', 'app'], diff --git a/src/server/api/endpoints/notes.ts b/src/server/api/endpoints/notes.ts index 6a9766d289..a3f6e187f2 100644 --- a/src/server/api/endpoints/notes.ts +++ b/src/server/api/endpoints/notes.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../define.js'; -import { makePaginationQuery } from '../common/make-pagination-query.js'; -import { Notes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../define'; +import { makePaginationQuery } from '../common/make-pagination-query'; +import { Notes } from '@/models/index'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/children.ts b/src/server/api/endpoints/notes/children.ts index de17c32f51..68881fda9e 100644 --- a/src/server/api/endpoints/notes/children.ts +++ b/src/server/api/endpoints/notes/children.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; import { Brackets } from 'typeorm'; -import { Notes } from '@/models/index.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { Notes } from '@/models/index'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/clips.ts b/src/server/api/endpoints/notes/clips.ts index c3360d6f22..6b303d87ec 100644 --- a/src/server/api/endpoints/notes/clips.ts +++ b/src/server/api/endpoints/notes/clips.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ClipNotes, Clips } from '@/models/index.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ClipNotes, Clips } from '@/models/index'; +import { getNote } from '../../common/getters'; +import { ApiError } from '../../error'; import { In } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/notes/conversation.ts b/src/server/api/endpoints/notes/conversation.ts index adf4ca2e10..0fe323ea00 100644 --- a/src/server/api/endpoints/notes/conversation.ts +++ b/src/server/api/endpoints/notes/conversation.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getNote } from '../../common/getters.js'; -import { Note } from '@/models/entities/note.js'; -import { Notes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getNote } from '../../common/getters'; +import { Note } from '@/models/entities/note'; +import { Notes } from '@/models/index'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/create.ts b/src/server/api/endpoints/notes/create.ts index 8c2db5213e..751673f955 100644 --- a/src/server/api/endpoints/notes/create.ts +++ b/src/server/api/endpoints/notes/create.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; import * as ms from 'ms'; import { length } from 'stringz'; -import create from '@/services/note/create.js'; -import define from '../../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { ApiError } from '../../error.js'; -import { ID } from '@/misc/cafy-id.js'; -import { User } from '@/models/entities/user.js'; -import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { Note } from '@/models/entities/note.js'; -import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits.js'; -import { noteVisibilities } from '../../../../types.js'; -import { Channel } from '@/models/entities/channel.js'; +import create from '@/services/note/create'; +import define from '../../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { ApiError } from '../../error'; +import { ID } from '@/misc/cafy-id'; +import { User } from '@/models/entities/user'; +import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index'; +import { DriveFile } from '@/models/entities/drive-file'; +import { Note } from '@/models/entities/note'; +import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; +import { noteVisibilities } from '../../../../types'; +import { Channel } from '@/models/entities/channel'; let maxNoteTextLength = 500; diff --git a/src/server/api/endpoints/notes/delete.ts b/src/server/api/endpoints/notes/delete.ts index e66718001b..7163a2b9d2 100644 --- a/src/server/api/endpoints/notes/delete.ts +++ b/src/server/api/endpoints/notes/delete.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import deleteNote from '@/services/note/delete.js'; -import define from '../../define.js'; +import { ID } from '@/misc/cafy-id'; +import deleteNote from '@/services/note/delete'; +import define from '../../define'; import * as ms from 'ms'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; -import { Users } from '@/models/index.js'; +import { getNote } from '../../common/getters'; +import { ApiError } from '../../error'; +import { Users } from '@/models/index'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/favorites/create.ts b/src/server/api/endpoints/notes/favorites/create.ts index f406d6238a..1bb25edd7f 100644 --- a/src/server/api/endpoints/notes/favorites/create.ts +++ b/src/server/api/endpoints/notes/favorites/create.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getNote } from '../../../common/getters.js'; -import { NoteFavorites } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getNote } from '../../../common/getters'; +import { NoteFavorites } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['notes', 'favorites'], diff --git a/src/server/api/endpoints/notes/favorites/delete.ts b/src/server/api/endpoints/notes/favorites/delete.ts index 624cf18948..75eb9a359a 100644 --- a/src/server/api/endpoints/notes/favorites/delete.ts +++ b/src/server/api/endpoints/notes/favorites/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getNote } from '../../../common/getters.js'; -import { NoteFavorites } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getNote } from '../../../common/getters'; +import { NoteFavorites } from '@/models/index'; export const meta = { tags: ['notes', 'favorites'], diff --git a/src/server/api/endpoints/notes/featured.ts b/src/server/api/endpoints/notes/featured.ts index aa8a8c09aa..8d33c0e73d 100644 --- a/src/server/api/endpoints/notes/featured.ts +++ b/src/server/api/endpoints/notes/featured.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { Notes } from '@/models/index.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '../../define'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { Notes } from '@/models/index'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/global-timeline.ts b/src/server/api/endpoints/notes/global-timeline.ts index ae2408ef40..5902c0415c 100644 --- a/src/server/api/endpoints/notes/global-timeline.ts +++ b/src/server/api/endpoints/notes/global-timeline.ts @@ -1,15 +1,15 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { Notes } from '@/models/index.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { activeUsersChart } from '@/services/chart/index.js'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { ApiError } from '../../error'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { Notes } from '@/models/index'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { activeUsersChart } from '@/services/chart/index'; +import { generateRepliesQuery } from '../../common/generate-replies-query'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/hybrid-timeline.ts b/src/server/api/endpoints/notes/hybrid-timeline.ts index 4bebeab998..47f08f208b 100644 --- a/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { Followings, Notes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { ApiError } from '../../error'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { Followings, Notes } from '@/models/index'; import { Brackets } from 'typeorm'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { activeUsersChart } from '@/services/chart/index.js'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateChannelQuery } from '../../common/generate-channel-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { activeUsersChart } from '@/services/chart/index'; +import { generateRepliesQuery } from '../../common/generate-replies-query'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; +import { generateChannelQuery } from '../../common/generate-channel-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/local-timeline.ts b/src/server/api/endpoints/notes/local-timeline.ts index 95e748fae6..f670d478bf 100644 --- a/src/server/api/endpoints/notes/local-timeline.ts +++ b/src/server/api/endpoints/notes/local-timeline.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { ApiError } from '../../error.js'; -import { Notes } from '@/models/index.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { activeUsersChart } from '@/services/chart/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { ApiError } from '../../error'; +import { Notes } from '@/models/index'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { activeUsersChart } from '@/services/chart/index'; import { Brackets } from 'typeorm'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateChannelQuery } from '../../common/generate-channel-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { generateRepliesQuery } from '../../common/generate-replies-query'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; +import { generateChannelQuery } from '../../common/generate-channel-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/mentions.ts b/src/server/api/endpoints/notes/mentions.ts index f3b8eecad6..74f7911bfe 100644 --- a/src/server/api/endpoints/notes/mentions.ts +++ b/src/server/api/endpoints/notes/mentions.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import read from '@/services/note/read.js'; -import { Notes, Followings } from '@/models/index.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import read from '@/services/note/read'; +import { Notes, Followings } from '@/models/index'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { makePaginationQuery } from '../../common/make-pagination-query'; import { Brackets } from 'typeorm'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/polls/recommendation.ts b/src/server/api/endpoints/notes/polls/recommendation.ts index 194c2ae276..0763f0c8fd 100644 --- a/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/src/server/api/endpoints/notes/polls/recommendation.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { Polls, Mutings, Notes, PollVotes } from '@/models/index.js'; +import define from '../../../define'; +import { Polls, Mutings, Notes, PollVotes } from '@/models/index'; import { Brackets, In } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts index 0fde90b592..f670501385 100644 --- a/src/server/api/endpoints/notes/polls/vote.ts +++ b/src/server/api/endpoints/notes/polls/vote.ts @@ -1,18 +1,18 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishNoteStream } from '@/services/stream.js'; -import { createNotification } from '@/services/create-notification.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getNote } from '../../../common/getters.js'; -import { deliver } from '@/queue/index.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderVote from '@/remote/activitypub/renderer/vote.js'; -import { deliverQuestionUpdate } from '@/services/note/polls/update.js'; -import { PollVotes, NoteWatchings, Users, Polls, Blockings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { publishNoteStream } from '@/services/stream'; +import { createNotification } from '@/services/create-notification'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getNote } from '../../../common/getters'; +import { deliver } from '@/queue/index'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderVote from '@/remote/activitypub/renderer/vote'; +import { deliverQuestionUpdate } from '@/services/note/polls/update'; +import { PollVotes, NoteWatchings, Users, Polls, Blockings } from '@/models/index'; import { Not } from 'typeorm'; -import { IRemoteUser } from '@/models/entities/user.js'; -import { genId } from '@/misc/gen-id.js'; +import { IRemoteUser } from '@/models/entities/user'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/reactions.ts b/src/server/api/endpoints/notes/reactions.ts index a67851d3b7..09dd6b600b 100644 --- a/src/server/api/endpoints/notes/reactions.ts +++ b/src/server/api/endpoints/notes/reactions.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; -import { NoteReactions } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { getNote } from '../../common/getters'; +import { ApiError } from '../../error'; +import { NoteReactions } from '@/models/index'; import { DeepPartial } from 'typeorm'; -import { NoteReaction } from '@/models/entities/note-reaction.js'; +import { NoteReaction } from '@/models/entities/note-reaction'; export const meta = { tags: ['notes', 'reactions'], diff --git a/src/server/api/endpoints/notes/reactions/create.ts b/src/server/api/endpoints/notes/reactions/create.ts index 41109746f8..24a73a8d4f 100644 --- a/src/server/api/endpoints/notes/reactions/create.ts +++ b/src/server/api/endpoints/notes/reactions/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import createReaction from '@/services/note/reaction/create.js'; -import define from '../../../define.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import { ID } from '@/misc/cafy-id'; +import createReaction from '@/services/note/reaction/create'; +import define from '../../../define'; +import { getNote } from '../../../common/getters'; +import { ApiError } from '../../../error'; export const meta = { tags: ['reactions', 'notes'], diff --git a/src/server/api/endpoints/notes/reactions/delete.ts b/src/server/api/endpoints/notes/reactions/delete.ts index b9eaf6978c..69550f96de 100644 --- a/src/server/api/endpoints/notes/reactions/delete.ts +++ b/src/server/api/endpoints/notes/reactions/delete.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; import * as ms from 'ms'; -import deleteReaction from '@/services/note/reaction/delete.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import deleteReaction from '@/services/note/reaction/delete'; +import { getNote } from '../../../common/getters'; +import { ApiError } from '../../../error'; export const meta = { tags: ['reactions', 'notes'], diff --git a/src/server/api/endpoints/notes/renotes.ts b/src/server/api/endpoints/notes/renotes.ts index b08173f249..26bfc1657d 100644 --- a/src/server/api/endpoints/notes/renotes.ts +++ b/src/server/api/endpoints/notes/renotes.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { Notes } from '@/models/index.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { getNote } from '../../common/getters'; +import { ApiError } from '../../error'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { Notes } from '@/models/index'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/replies.ts b/src/server/api/endpoints/notes/replies.ts index 5a96c16fd2..0bb62413ae 100644 --- a/src/server/api/endpoints/notes/replies.ts +++ b/src/server/api/endpoints/notes/replies.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Notes } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Notes } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/search-by-tag.ts b/src/server/api/endpoints/notes/search-by-tag.ts index 2c0ad74635..40e1499736 100644 --- a/src/server/api/endpoints/notes/search-by-tag.ts +++ b/src/server/api/endpoints/notes/search-by-tag.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { Notes } from '@/models/index.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { Notes } from '@/models/index'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; import { Brackets } from 'typeorm'; -import { safeForSql } from '@/misc/safe-for-sql.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { safeForSql } from '@/misc/safe-for-sql'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes', 'hashtags'], diff --git a/src/server/api/endpoints/notes/search.ts b/src/server/api/endpoints/notes/search.ts index 45442c2548..eb832a6b31 100644 --- a/src/server/api/endpoints/notes/search.ts +++ b/src/server/api/endpoints/notes/search.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import es from '../../../../db/elasticsearch.js'; -import define from '../../define.js'; -import { Notes } from '@/models/index.js'; +import es from '../../../../db/elasticsearch'; +import define from '../../define'; +import { Notes } from '@/models/index'; import { In } from 'typeorm'; -import { ID } from '@/misc/cafy-id.js'; -import config from '@/config/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { ID } from '@/misc/cafy-id'; +import config from '@/config/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/show.ts b/src/server/api/endpoints/notes/show.ts index 8387279b17..fad63d6483 100644 --- a/src/server/api/endpoints/notes/show.ts +++ b/src/server/api/endpoints/notes/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; -import { Notes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { getNote } from '../../common/getters'; +import { ApiError } from '../../error'; +import { Notes } from '@/models/index'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/state.ts b/src/server/api/endpoints/notes/state.ts index bd2e85ea9d..489902435d 100644 --- a/src/server/api/endpoints/notes/state.ts +++ b/src/server/api/endpoints/notes/state.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { NoteFavorites, NoteWatchings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { NoteFavorites, NoteWatchings } from '@/models/index'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/timeline.ts b/src/server/api/endpoints/notes/timeline.ts index e1fd2d5fca..1bd0e57d34 100644 --- a/src/server/api/endpoints/notes/timeline.ts +++ b/src/server/api/endpoints/notes/timeline.ts @@ -1,16 +1,16 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { Notes, Followings } from '@/models/index.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { activeUsersChart } from '@/services/chart/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { Notes, Followings } from '@/models/index'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; +import { activeUsersChart } from '@/services/chart/index'; import { Brackets } from 'typeorm'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateChannelQuery } from '../../common/generate-channel-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { generateRepliesQuery } from '../../common/generate-replies-query'; +import { generateMutedNoteQuery } from '../../common/generate-muted-note-query'; +import { generateChannelQuery } from '../../common/generate-channel-query'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/translate.ts b/src/server/api/endpoints/notes/translate.ts index 66354a2ea4..a5fdf70ce6 100644 --- a/src/server/api/endpoints/notes/translate.ts +++ b/src/server/api/endpoints/notes/translate.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { getNote } from '../../common/getters'; +import { ApiError } from '../../error'; import fetch from 'node-fetch'; -import config from '@/config/index.js'; -import { getAgentByUrl } from '@/misc/fetch.js'; +import config from '@/config/index'; +import { getAgentByUrl } from '@/misc/fetch'; import { URLSearchParams } from 'url'; -import { fetchMeta } from '@/misc/fetch-meta.js'; +import { fetchMeta } from '@/misc/fetch-meta'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/unrenote.ts b/src/server/api/endpoints/notes/unrenote.ts index eec7a21515..dce43d9d9c 100644 --- a/src/server/api/endpoints/notes/unrenote.ts +++ b/src/server/api/endpoints/notes/unrenote.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import deleteNote from '@/services/note/delete.js'; -import define from '../../define.js'; +import { ID } from '@/misc/cafy-id'; +import deleteNote from '@/services/note/delete'; +import define from '../../define'; import * as ms from 'ms'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; -import { Notes, Users } from '@/models/index.js'; +import { getNote } from '../../common/getters'; +import { ApiError } from '../../error'; +import { Notes, Users } from '@/models/index'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/user-list-timeline.ts b/src/server/api/endpoints/notes/user-list-timeline.ts index 15abaa6c22..32c370004c 100644 --- a/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/src/server/api/endpoints/notes/user-list-timeline.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { UserLists, UserListJoinings, Notes } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { activeUsersChart } from '@/services/chart/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { UserLists, UserListJoinings, Notes } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { activeUsersChart } from '@/services/chart/index'; import { Brackets } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/notes/watching/create.ts b/src/server/api/endpoints/notes/watching/create.ts index 1c2c1652ae..4d182d3715 100644 --- a/src/server/api/endpoints/notes/watching/create.ts +++ b/src/server/api/endpoints/notes/watching/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import watch from '@/services/note/watch.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import watch from '@/services/note/watch'; +import { getNote } from '../../../common/getters'; +import { ApiError } from '../../../error'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notes/watching/delete.ts b/src/server/api/endpoints/notes/watching/delete.ts index b418d3af2b..dd58c52b57 100644 --- a/src/server/api/endpoints/notes/watching/delete.ts +++ b/src/server/api/endpoints/notes/watching/delete.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import unwatch from '@/services/note/unwatch.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import unwatch from '@/services/note/unwatch'; +import { getNote } from '../../../common/getters'; +import { ApiError } from '../../../error'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/notifications/create.ts b/src/server/api/endpoints/notifications/create.ts index 5231d9011b..8003c497ee 100644 --- a/src/server/api/endpoints/notifications/create.ts +++ b/src/server/api/endpoints/notifications/create.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { createNotification } from '@/services/create-notification.js'; +import define from '../../define'; +import { createNotification } from '@/services/create-notification'; export const meta = { tags: ['notifications'], diff --git a/src/server/api/endpoints/notifications/mark-all-as-read.ts b/src/server/api/endpoints/notifications/mark-all-as-read.ts index d0dc7be31b..8d4e512750 100644 --- a/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -1,6 +1,6 @@ -import { publishMainStream } from '@/services/stream.js'; -import define from '../../define.js'; -import { Notifications } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../../define'; +import { Notifications } from '@/models/index'; export const meta = { tags: ['notifications', 'account'], diff --git a/src/server/api/endpoints/notifications/read.ts b/src/server/api/endpoints/notifications/read.ts index 94140db82e..66bbc4efd7 100644 --- a/src/server/api/endpoints/notifications/read.ts +++ b/src/server/api/endpoints/notifications/read.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishMainStream } from '@/services/stream.js'; -import define from '../../define.js'; -import { Notifications } from '@/models/index.js'; -import { readNotification } from '../../common/read-notification.js'; -import { ApiError } from '../../error.js'; +import { ID } from '@/misc/cafy-id'; +import { publishMainStream } from '@/services/stream'; +import define from '../../define'; +import { Notifications } from '@/models/index'; +import { readNotification } from '../../common/read-notification'; +import { ApiError } from '../../error'; export const meta = { tags: ['notifications', 'account'], diff --git a/src/server/api/endpoints/page-push.ts b/src/server/api/endpoints/page-push.ts index 1d48303394..a0412e89f1 100644 --- a/src/server/api/endpoints/page-push.ts +++ b/src/server/api/endpoints/page-push.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { publishMainStream } from '@/services/stream.js'; -import { Users, Pages } from '@/models/index.js'; -import { ApiError } from '../error.js'; +import define from '../define'; +import { ID } from '@/misc/cafy-id'; +import { publishMainStream } from '@/services/stream'; +import { Users, Pages } from '@/models/index'; +import { ApiError } from '../error'; export const meta = { requireCredential: true as const, diff --git a/src/server/api/endpoints/pages/create.ts b/src/server/api/endpoints/pages/create.ts index 4f8a09b02a..c23978f093 100644 --- a/src/server/api/endpoints/pages/create.ts +++ b/src/server/api/endpoints/pages/create.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Pages, DriveFiles } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { Page } from '@/models/entities/page.js'; -import { ApiError } from '../../error.js'; +import define from '../../define'; +import { ID } from '@/misc/cafy-id'; +import { Pages, DriveFiles } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { Page } from '@/models/entities/page'; +import { ApiError } from '../../error'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/delete.ts b/src/server/api/endpoints/pages/delete.ts index 8777c65e42..b1f8c8a709 100644 --- a/src/server/api/endpoints/pages/delete.ts +++ b/src/server/api/endpoints/pages/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Pages } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Pages } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/featured.ts b/src/server/api/endpoints/pages/featured.ts index 68adac930d..f891c45f05 100644 --- a/src/server/api/endpoints/pages/featured.ts +++ b/src/server/api/endpoints/pages/featured.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { Pages } from '@/models/index.js'; +import define from '../../define'; +import { Pages } from '@/models/index'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/like.ts b/src/server/api/endpoints/pages/like.ts index ac0f577eb8..a95a377802 100644 --- a/src/server/api/endpoints/pages/like.ts +++ b/src/server/api/endpoints/pages/like.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Pages, PageLikes } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Pages, PageLikes } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/show.ts b/src/server/api/endpoints/pages/show.ts index 21084d3b9a..7c55d4a9e6 100644 --- a/src/server/api/endpoints/pages/show.ts +++ b/src/server/api/endpoints/pages/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Pages, Users } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Page } from '@/models/entities/page.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Pages, Users } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; +import { Page } from '@/models/entities/page'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/unlike.ts b/src/server/api/endpoints/pages/unlike.ts index dddecccf62..facf2d6d5f 100644 --- a/src/server/api/endpoints/pages/unlike.ts +++ b/src/server/api/endpoints/pages/unlike.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Pages, PageLikes } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Pages, PageLikes } from '@/models/index'; export const meta = { tags: ['pages'], diff --git a/src/server/api/endpoints/pages/update.ts b/src/server/api/endpoints/pages/update.ts index d1df9b08a2..b3a7f26963 100644 --- a/src/server/api/endpoints/pages/update.ts +++ b/src/server/api/endpoints/pages/update.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as ms from 'ms'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Pages, DriveFiles } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Pages, DriveFiles } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; import { Not } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/ping.ts b/src/server/api/endpoints/ping.ts index 1d342dac33..0b1bb6e164 100644 --- a/src/server/api/endpoints/ping.ts +++ b/src/server/api/endpoints/ping.ts @@ -1,4 +1,4 @@ -import define from '../define.js'; +import define from '../define'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/pinned-users.ts b/src/server/api/endpoints/pinned-users.ts index 0ea5e9b390..e88dfbd535 100644 --- a/src/server/api/endpoints/pinned-users.ts +++ b/src/server/api/endpoints/pinned-users.ts @@ -1,8 +1,8 @@ -import define from '../define.js'; -import { Users } from '@/models/index.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { parseAcct } from '@/misc/acct.js'; -import { User } from '@/models/entities/user.js'; +import define from '../define'; +import { Users } from '@/models/index'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { parseAcct } from '@/misc/acct'; +import { User } from '@/models/entities/user'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/promo/read.ts b/src/server/api/endpoints/promo/read.ts index 92a6768988..ae57bf9cf1 100644 --- a/src/server/api/endpoints/promo/read.ts +++ b/src/server/api/endpoints/promo/read.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getNote } from '../../common/getters.js'; -import { PromoReads } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getNote } from '../../common/getters'; +import { PromoReads } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['notes'], diff --git a/src/server/api/endpoints/request-reset-password.ts b/src/server/api/endpoints/request-reset-password.ts index 754a5a1c87..f9928c2ee6 100644 --- a/src/server/api/endpoints/request-reset-password.ts +++ b/src/server/api/endpoints/request-reset-password.ts @@ -1,13 +1,13 @@ import $ from 'cafy'; -import { publishMainStream } from '@/services/stream.js'; -import define from '../define.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../define'; import rndstr from 'rndstr'; -import config from '@/config/index.js'; +import config from '@/config/index'; import * as ms from 'ms'; -import { Users, UserProfiles, PasswordResetRequests } from '@/models/index.js'; -import { sendEmail } from '@/services/send-email.js'; -import { ApiError } from '../error.js'; -import { genId } from '@/misc/gen-id.js'; +import { Users, UserProfiles, PasswordResetRequests } from '@/models/index'; +import { sendEmail } from '@/services/send-email'; +import { ApiError } from '../error'; +import { genId } from '@/misc/gen-id'; import { IsNull } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/reset-db.ts b/src/server/api/endpoints/reset-db.ts index c6ad8303fa..f430869302 100644 --- a/src/server/api/endpoints/reset-db.ts +++ b/src/server/api/endpoints/reset-db.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../define.js'; -import { ApiError } from '../error.js'; -import { resetDb } from '@/db/postgre.js'; +import define from '../define'; +import { ApiError } from '../error'; +import { resetDb } from '@/db/postgre'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/reset-password.ts b/src/server/api/endpoints/reset-password.ts index f32e499e01..53b0bfde0b 100644 --- a/src/server/api/endpoints/reset-password.ts +++ b/src/server/api/endpoints/reset-password.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; -import { publishMainStream } from '@/services/stream.js'; -import define from '../define.js'; -import { Users, UserProfiles, PasswordResetRequests } from '@/models/index.js'; -import { ApiError } from '../error.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../define'; +import { Users, UserProfiles, PasswordResetRequests } from '@/models/index'; +import { ApiError } from '../error'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/room/show.ts b/src/server/api/endpoints/room/show.ts index dcedde5db3..a6461d4a6e 100644 --- a/src/server/api/endpoints/room/show.ts +++ b/src/server/api/endpoints/room/show.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Users, UserProfiles } from '@/models/index.js'; -import { ID } from '@/misc/cafy-id.js'; -import { toPunyNullable } from '@/misc/convert-host.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Users, UserProfiles } from '@/models/index'; +import { ID } from '@/misc/cafy-id'; +import { toPunyNullable } from '@/misc/convert-host'; export const meta = { tags: ['room'], diff --git a/src/server/api/endpoints/room/update.ts b/src/server/api/endpoints/room/update.ts index 2ee44e157c..8c4cfbdea6 100644 --- a/src/server/api/endpoints/room/update.ts +++ b/src/server/api/endpoints/room/update.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import { publishMainStream } from '@/services/stream.js'; -import define from '../../define.js'; -import { Users, UserProfiles } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream'; +import define from '../../define'; +import { Users, UserProfiles } from '@/models/index'; export const meta = { tags: ['room'], diff --git a/src/server/api/endpoints/server-info.ts b/src/server/api/endpoints/server-info.ts index 23a7aabba4..4e636d331c 100644 --- a/src/server/api/endpoints/server-info.ts +++ b/src/server/api/endpoints/server-info.ts @@ -1,6 +1,6 @@ import * as os from 'os'; import * as si from 'systeminformation'; -import define from '../define.js'; +import define from '../define'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts index 84b56c0ba9..15c8001742 100644 --- a/src/server/api/endpoints/stats.ts +++ b/src/server/api/endpoints/stats.ts @@ -1,6 +1,6 @@ -import define from '../define.js'; -import { NoteReactions, Notes, Users } from '@/models/index.js'; -import { federationChart, driveChart } from '@/services/chart/index.js'; +import define from '../define'; +import { NoteReactions, Notes, Users } from '@/models/index'; +import { federationChart, driveChart } from '@/services/chart/index'; export const meta = { requireCredential: false as const, diff --git a/src/server/api/endpoints/sw/register.ts b/src/server/api/endpoints/sw/register.ts index c008e6ec70..6e14ba2669 100644 --- a/src/server/api/endpoints/sw/register.ts +++ b/src/server/api/endpoints/sw/register.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { genId } from '@/misc/gen-id.js'; -import { SwSubscriptions } from '@/models/index.js'; +import define from '../../define'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { genId } from '@/misc/gen-id'; +import { SwSubscriptions } from '@/models/index'; export const meta = { tags: ['account'], diff --git a/src/server/api/endpoints/username/available.ts b/src/server/api/endpoints/username/available.ts index 38442fdc9c..1ae75448ea 100644 --- a/src/server/api/endpoints/username/available.ts +++ b/src/server/api/endpoints/username/available.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Users, UsedUsernames } from '@/models/index.js'; +import define from '../../define'; +import { Users, UsedUsernames } from '@/models/index'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users.ts b/src/server/api/endpoints/users.ts index 462055b285..130ae30244 100644 --- a/src/server/api/endpoints/users.ts +++ b/src/server/api/endpoints/users.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../define.js'; -import { Users } from '@/models/index.js'; -import { generateMutedUserQueryForUsers } from '../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../common/generate-block-query.js'; +import define from '../define'; +import { Users } from '@/models/index'; +import { generateMutedUserQueryForUsers } from '../common/generate-muted-user-query'; +import { generateBlockedUserQuery } from '../common/generate-block-query'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/clips.ts b/src/server/api/endpoints/users/clips.ts index 8e53843bb3..8feca9422a 100644 --- a/src/server/api/endpoints/users/clips.ts +++ b/src/server/api/endpoints/users/clips.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Clips } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Clips } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['users', 'clips'], diff --git a/src/server/api/endpoints/users/followers.ts b/src/server/api/endpoints/users/followers.ts index 896c3ca1cd..e54b6078ee 100644 --- a/src/server/api/endpoints/users/followers.ts +++ b/src/server/api/endpoints/users/followers.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Users, Followings } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { toPunyNullable } from '@/misc/convert-host.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Users, Followings } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { toPunyNullable } from '@/misc/convert-host'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/following.ts b/src/server/api/endpoints/users/following.ts index ab60cc02fb..f2ef7f47e1 100644 --- a/src/server/api/endpoints/users/following.ts +++ b/src/server/api/endpoints/users/following.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { Users, Followings } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { toPunyNullable } from '@/misc/convert-host.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Users, Followings } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { toPunyNullable } from '@/misc/convert-host'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/gallery/posts.ts b/src/server/api/endpoints/users/gallery/posts.ts index 7c5a7d1cf3..845de1089c 100644 --- a/src/server/api/endpoints/users/gallery/posts.ts +++ b/src/server/api/endpoints/users/gallery/posts.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { GalleryPosts } from '@/models/index.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { GalleryPosts } from '@/models/index'; +import { makePaginationQuery } from '../../../common/make-pagination-query'; export const meta = { tags: ['users', 'gallery'], diff --git a/src/server/api/endpoints/users/get-frequently-replied-users.ts b/src/server/api/endpoints/users/get-frequently-replied-users.ts index 4207aa004c..921d30c82e 100644 --- a/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { maximum } from '../../../../prelude/array.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { maximum } from '../../../../prelude/array'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; import { Not, In, IsNull } from 'typeorm'; -import { Notes, Users } from '@/models/index.js'; +import { Notes, Users } from '@/models/index'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/groups/create.ts b/src/server/api/endpoints/users/groups/create.ts index 7c3d5d258d..dc1ee3879e 100644 --- a/src/server/api/endpoints/users/groups/create.ts +++ b/src/server/api/endpoints/users/groups/create.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { UserGroups, UserGroupJoinings } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { UserGroup } from '@/models/entities/user-group.js'; -import { UserGroupJoining } from '@/models/entities/user-group-joining.js'; +import define from '../../../define'; +import { UserGroups, UserGroupJoinings } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { UserGroup } from '@/models/entities/user-group'; +import { UserGroupJoining } from '@/models/entities/user-group-joining'; export const meta = { tags: ['groups'], diff --git a/src/server/api/endpoints/users/groups/delete.ts b/src/server/api/endpoints/users/groups/delete.ts index 71d6c615a7..7da1b4a273 100644 --- a/src/server/api/endpoints/users/groups/delete.ts +++ b/src/server/api/endpoints/users/groups/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { UserGroups } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { UserGroups } from '@/models/index'; export const meta = { tags: ['groups'], diff --git a/src/server/api/endpoints/users/groups/invitations/accept.ts b/src/server/api/endpoints/users/groups/invitations/accept.ts index 6eab46337d..09e6ae2647 100644 --- a/src/server/api/endpoints/users/groups/invitations/accept.ts +++ b/src/server/api/endpoints/users/groups/invitations/accept.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../../define.js'; -import { ApiError } from '../../../../error.js'; -import { UserGroupJoinings, UserGroupInvitations } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { UserGroupJoining } from '@/models/entities/user-group-joining.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../../define'; +import { ApiError } from '../../../../error'; +import { UserGroupJoinings, UserGroupInvitations } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { UserGroupJoining } from '@/models/entities/user-group-joining'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/invitations/reject.ts b/src/server/api/endpoints/users/groups/invitations/reject.ts index ff0ff58f3c..741fcefb35 100644 --- a/src/server/api/endpoints/users/groups/invitations/reject.ts +++ b/src/server/api/endpoints/users/groups/invitations/reject.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../../define.js'; -import { ApiError } from '../../../../error.js'; -import { UserGroupInvitations } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../../define'; +import { ApiError } from '../../../../error'; +import { UserGroupInvitations } from '@/models/index'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/invite.ts b/src/server/api/endpoints/users/groups/invite.ts index 2a4af72662..f1ee8bf8b7 100644 --- a/src/server/api/endpoints/users/groups/invite.ts +++ b/src/server/api/endpoints/users/groups/invite.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { UserGroups, UserGroupJoinings, UserGroupInvitations } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { UserGroupInvitation } from '@/models/entities/user-group-invitation.js'; -import { createNotification } from '@/services/create-notification.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { UserGroups, UserGroupJoinings, UserGroupInvitations } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { UserGroupInvitation } from '@/models/entities/user-group-invitation'; +import { createNotification } from '@/services/create-notification'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/joined.ts b/src/server/api/endpoints/users/groups/joined.ts index 4066c6ddc3..d5e8fe4032 100644 --- a/src/server/api/endpoints/users/groups/joined.ts +++ b/src/server/api/endpoints/users/groups/joined.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { UserGroups, UserGroupJoinings } from '@/models/index.js'; +import define from '../../../define'; +import { UserGroups, UserGroupJoinings } from '@/models/index'; import { Not, In } from 'typeorm'; export const meta = { diff --git a/src/server/api/endpoints/users/groups/owned.ts b/src/server/api/endpoints/users/groups/owned.ts index 0111ff09d1..17de370dbc 100644 --- a/src/server/api/endpoints/users/groups/owned.ts +++ b/src/server/api/endpoints/users/groups/owned.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { UserGroups } from '@/models/index.js'; +import define from '../../../define'; +import { UserGroups } from '@/models/index'; export const meta = { tags: ['groups', 'account'], diff --git a/src/server/api/endpoints/users/groups/pull.ts b/src/server/api/endpoints/users/groups/pull.ts index 4e080074b4..ce4d2e2881 100644 --- a/src/server/api/endpoints/users/groups/pull.ts +++ b/src/server/api/endpoints/users/groups/pull.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { UserGroups, UserGroupJoinings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { UserGroups, UserGroupJoinings } from '@/models/index'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/show.ts b/src/server/api/endpoints/users/groups/show.ts index 666c159c6d..3c030bf3a5 100644 --- a/src/server/api/endpoints/users/groups/show.ts +++ b/src/server/api/endpoints/users/groups/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { UserGroups, UserGroupJoinings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { UserGroups, UserGroupJoinings } from '@/models/index'; export const meta = { tags: ['groups', 'account'], diff --git a/src/server/api/endpoints/users/groups/transfer.ts b/src/server/api/endpoints/users/groups/transfer.ts index a216e80025..17c42e1127 100644 --- a/src/server/api/endpoints/users/groups/transfer.ts +++ b/src/server/api/endpoints/users/groups/transfer.ts @@ -1,9 +1,9 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { UserGroups, UserGroupJoinings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { UserGroups, UserGroupJoinings } from '@/models/index'; export const meta = { tags: ['groups', 'users'], diff --git a/src/server/api/endpoints/users/groups/update.ts b/src/server/api/endpoints/users/groups/update.ts index c6c1b14818..127bbc47a1 100644 --- a/src/server/api/endpoints/users/groups/update.ts +++ b/src/server/api/endpoints/users/groups/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { UserGroups } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { UserGroups } from '@/models/index'; export const meta = { tags: ['groups'], diff --git a/src/server/api/endpoints/users/lists/create.ts b/src/server/api/endpoints/users/lists/create.ts index 89af90ea52..e0bfe611fc 100644 --- a/src/server/api/endpoints/users/lists/create.ts +++ b/src/server/api/endpoints/users/lists/create.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../../define.js'; -import { UserLists } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { UserList } from '@/models/entities/user-list.js'; +import define from '../../../define'; +import { UserLists } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { UserList } from '@/models/entities/user-list'; export const meta = { tags: ['lists'], diff --git a/src/server/api/endpoints/users/lists/delete.ts b/src/server/api/endpoints/users/lists/delete.ts index d33222242e..5fe3bfb03d 100644 --- a/src/server/api/endpoints/users/lists/delete.ts +++ b/src/server/api/endpoints/users/lists/delete.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { UserLists } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { UserLists } from '@/models/index'; export const meta = { tags: ['lists'], diff --git a/src/server/api/endpoints/users/lists/list.ts b/src/server/api/endpoints/users/lists/list.ts index f186408981..cf0c92bb84 100644 --- a/src/server/api/endpoints/users/lists/list.ts +++ b/src/server/api/endpoints/users/lists/list.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; -import { UserLists } from '@/models/index.js'; +import define from '../../../define'; +import { UserLists } from '@/models/index'; export const meta = { tags: ['lists', 'account'], diff --git a/src/server/api/endpoints/users/lists/pull.ts b/src/server/api/endpoints/users/lists/pull.ts index db15d67d98..d4357fc5e7 100644 --- a/src/server/api/endpoints/users/lists/pull.ts +++ b/src/server/api/endpoints/users/lists/pull.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import { publishUserListStream } from '@/services/stream.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { UserLists, UserListJoinings, Users } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import { publishUserListStream } from '@/services/stream'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { UserLists, UserListJoinings, Users } from '@/models/index'; export const meta = { tags: ['lists', 'users'], diff --git a/src/server/api/endpoints/users/lists/push.ts b/src/server/api/endpoints/users/lists/push.ts index 266e813b16..8e21059d3d 100644 --- a/src/server/api/endpoints/users/lists/push.ts +++ b/src/server/api/endpoints/users/lists/push.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; -import { pushUserToUserList } from '@/services/user-list/push.js'; -import { UserLists, UserListJoinings, Blockings } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { getUser } from '../../../common/getters'; +import { pushUserToUserList } from '@/services/user-list/push'; +import { UserLists, UserListJoinings, Blockings } from '@/models/index'; export const meta = { tags: ['lists', 'users'], diff --git a/src/server/api/endpoints/users/lists/show.ts b/src/server/api/endpoints/users/lists/show.ts index c3a49b7472..f9a35cdab3 100644 --- a/src/server/api/endpoints/users/lists/show.ts +++ b/src/server/api/endpoints/users/lists/show.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { UserLists } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { UserLists } from '@/models/index'; export const meta = { tags: ['lists', 'account'], diff --git a/src/server/api/endpoints/users/lists/update.ts b/src/server/api/endpoints/users/lists/update.ts index c883ed420f..1185af5043 100644 --- a/src/server/api/endpoints/users/lists/update.ts +++ b/src/server/api/endpoints/users/lists/update.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { UserLists } from '@/models/index.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../../define'; +import { ApiError } from '../../../error'; +import { UserLists } from '@/models/index'; export const meta = { tags: ['lists'], diff --git a/src/server/api/endpoints/users/notes.ts b/src/server/api/endpoints/users/notes.ts index ae6d75e641..0afbad9d04 100644 --- a/src/server/api/endpoints/users/notes.ts +++ b/src/server/api/endpoints/users/notes.ts @@ -1,14 +1,14 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { Notes } from '@/models/index.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { makePaginationQuery } from '../../common/make-pagination-query'; +import { generateVisibilityQuery } from '../../common/generate-visibility-query'; +import { Notes } from '@/models/index'; +import { generateMutedUserQuery } from '../../common/generate-muted-user-query'; import { Brackets } from 'typeorm'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import { generateBlockedUserQuery } from '../../common/generate-block-query'; export const meta = { tags: ['users', 'notes'], diff --git a/src/server/api/endpoints/users/pages.ts b/src/server/api/endpoints/users/pages.ts index b27b21bac5..24e9e207fd 100644 --- a/src/server/api/endpoints/users/pages.ts +++ b/src/server/api/endpoints/users/pages.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { Pages } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { Pages } from '@/models/index'; +import { makePaginationQuery } from '../../common/make-pagination-query'; export const meta = { tags: ['users', 'pages'], diff --git a/src/server/api/endpoints/users/recommendation.ts b/src/server/api/endpoints/users/recommendation.ts index 0c86c13366..dde6bb1037 100644 --- a/src/server/api/endpoints/users/recommendation.ts +++ b/src/server/api/endpoints/users/recommendation.ts @@ -1,9 +1,9 @@ import * as ms from 'ms'; import $ from 'cafy'; -import define from '../../define.js'; -import { Users, Followings } from '@/models/index.js'; -import { generateMutedUserQueryForUsers } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery, generateBlockQueryForUsers } from '../../common/generate-block-query.js'; +import define from '../../define'; +import { Users, Followings } from '@/models/index'; +import { generateMutedUserQueryForUsers } from '../../common/generate-muted-user-query'; +import { generateBlockedUserQuery, generateBlockQueryForUsers } from '../../common/generate-block-query'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/relation.ts b/src/server/api/endpoints/users/relation.ts index 5998f2dbc2..32d76a5322 100644 --- a/src/server/api/endpoints/users/relation.ts +++ b/src/server/api/endpoints/users/relation.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Users } from '@/models/index.js'; +import define from '../../define'; +import { ID } from '@/misc/cafy-id'; +import { Users } from '@/models/index'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/report-abuse.ts b/src/server/api/endpoints/users/report-abuse.ts index 37de2d533c..2c8672cd47 100644 --- a/src/server/api/endpoints/users/report-abuse.ts +++ b/src/server/api/endpoints/users/report-abuse.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; -import define from '../../define.js'; -import { publishAdminStream } from '@/services/stream.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { AbuseUserReports, Users } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { ID } from '@/misc/cafy-id'; +import define from '../../define'; +import { publishAdminStream } from '@/services/stream'; +import { ApiError } from '../../error'; +import { getUser } from '../../common/getters'; +import { AbuseUserReports, Users } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/search-by-username-and-host.ts b/src/server/api/endpoints/users/search-by-username-and-host.ts index 690c346e28..b9fbf48fb2 100644 --- a/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { Users } from '@/models/index.js'; +import define from '../../define'; +import { Users } from '@/models/index'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index 46e179b6dc..8011d90b3d 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { UserProfiles, Users } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; +import define from '../../define'; +import { UserProfiles, Users } from '@/models/index'; +import { User } from '@/models/entities/user'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index bd0d65f760..f056983636 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -1,12 +1,12 @@ import $ from 'cafy'; -import { resolveUser } from '@/remote/resolve-user.js'; -import define from '../../define.js'; -import { apiLogger } from '../../logger.js'; -import { ApiError } from '../../error.js'; -import { ID } from '@/misc/cafy-id.js'; -import { Users } from '@/models/index.js'; +import { resolveUser } from '@/remote/resolve-user'; +import define from '../../define'; +import { apiLogger } from '../../logger'; +import { ApiError } from '../../error'; +import { ID } from '@/misc/cafy-id'; +import { Users } from '@/models/index'; import { In } from 'typeorm'; -import { User } from '@/models/entities/user.js'; +import { User } from '@/models/entities/user'; export const meta = { tags: ['users'], diff --git a/src/server/api/endpoints/users/stats.ts b/src/server/api/endpoints/users/stats.ts index 7cf08f71c9..ef8afd5625 100644 --- a/src/server/api/endpoints/users/stats.ts +++ b/src/server/api/endpoints/users/stats.ts @@ -1,8 +1,8 @@ import $ from 'cafy'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { ID } from '@/misc/cafy-id.js'; -import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, ReversiGames, Users } from '@/models/index.js'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { ID } from '@/misc/cafy-id'; +import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, ReversiGames, Users } from '@/models/index'; export const meta = { tags: ['users'], diff --git a/src/server/api/index.ts b/src/server/api/index.ts index b967f70b3a..55083261ee 100644 --- a/src/server/api/index.ts +++ b/src/server/api/index.ts @@ -8,14 +8,14 @@ import * as multer from '@koa/multer'; import * as bodyParser from 'koa-bodyparser'; import * as cors from '@koa/cors'; -import endpoints from './endpoints.js'; -import handler from './api-handler.js'; -import signup from './private/signup.js'; -import signin from './private/signin.js'; -import discord from './service/discord.js'; -import github from './service/github.js'; -import twitter from './service/twitter.js'; -import { Instances, AccessTokens, Users } from '@/models/index.js'; +import endpoints from './endpoints'; +import handler from './api-handler'; +import signup from './private/signup'; +import signin from './private/signin'; +import discord from './service/discord'; +import github from './service/github'; +import twitter from './service/twitter'; +import { Instances, AccessTokens, Users } from '@/models/index'; // Init app const app = new Koa(); diff --git a/src/server/api/limiter.ts b/src/server/api/limiter.ts index f624bd1166..e677aad0b6 100644 --- a/src/server/api/limiter.ts +++ b/src/server/api/limiter.ts @@ -1,9 +1,9 @@ import * as Limiter from 'ratelimiter'; -import { redisClient } from '../../db/redis.js'; -import { IEndpoint } from './endpoints.js'; -import { getAcct } from '@/misc/acct.js'; -import { User } from '@/models/entities/user.js'; -import Logger from '@/services/logger.js'; +import { redisClient } from '../../db/redis'; +import { IEndpoint } from './endpoints'; +import { getAcct } from '@/misc/acct'; +import { User } from '@/models/entities/user'; +import Logger from '@/services/logger'; const logger = new Logger('limiter'); diff --git a/src/server/api/logger.ts b/src/server/api/logger.ts index ec22d6c3e2..750defe547 100644 --- a/src/server/api/logger.ts +++ b/src/server/api/logger.ts @@ -1,3 +1,3 @@ -import Logger from '@/services/logger.js'; +import Logger from '@/services/logger'; export const apiLogger = new Logger('api'); diff --git a/src/server/api/openapi/description.ts b/src/server/api/openapi/description.ts index b9e544b04c..e51b312259 100644 --- a/src/server/api/openapi/description.ts +++ b/src/server/api/openapi/description.ts @@ -1,6 +1,6 @@ -import endpoints from '../endpoints.js'; -import * as locale from '../../../../locales/index.js'; -import { kinds as kindsList } from '@/misc/api-permissions.js'; +import endpoints from '../endpoints'; +import * as locale from '../../../../locales/index'; +import { kinds as kindsList } from '@/misc/api-permissions'; export interface IKindInfo { endpoints: string[]; diff --git a/src/server/api/openapi/gen-spec.ts b/src/server/api/openapi/gen-spec.ts index de87288b42..9db47c6dfc 100644 --- a/src/server/api/openapi/gen-spec.ts +++ b/src/server/api/openapi/gen-spec.ts @@ -1,9 +1,9 @@ -import endpoints from '../endpoints.js'; +import endpoints from '../endpoints'; import { Context } from 'cafy'; -import config from '@/config/index.js'; -import { errors as basicErrors } from './errors.js'; -import { schemas, convertSchemaToOpenApiSchema } from './schemas.js'; -import { getDescription } from './description.js'; +import config from '@/config/index'; +import { errors as basicErrors } from './errors'; +import { schemas, convertSchemaToOpenApiSchema } from './schemas'; +import { getDescription } from './description'; export function genOpenapiSpec(lang = 'ja-JP') { const spec = { diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts index e8bbfe5277..5402dc6f48 100644 --- a/src/server/api/openapi/schemas.ts +++ b/src/server/api/openapi/schemas.ts @@ -1,26 +1,26 @@ -import { packedUserSchema } from '@/models/repositories/user.js'; -import { Schema } from '@/misc/schema.js'; -import { packedNoteSchema } from '@/models/repositories/note.js'; -import { packedUserListSchema } from '@/models/repositories/user-list.js'; -import { packedAppSchema } from '@/models/repositories/app.js'; -import { packedMessagingMessageSchema } from '@/models/repositories/messaging-message.js'; -import { packedNotificationSchema } from '@/models/repositories/notification.js'; -import { packedDriveFileSchema } from '@/models/repositories/drive-file.js'; -import { packedDriveFolderSchema } from '@/models/repositories/drive-folder.js'; -import { packedFollowingSchema } from '@/models/repositories/following.js'; -import { packedMutingSchema } from '@/models/repositories/muting.js'; -import { packedBlockingSchema } from '@/models/repositories/blocking.js'; -import { packedNoteReactionSchema } from '@/models/repositories/note-reaction.js'; -import { packedHashtagSchema } from '@/models/repositories/hashtag.js'; -import { packedPageSchema } from '@/models/repositories/page.js'; -import { packedUserGroupSchema } from '@/models/repositories/user-group.js'; -import { packedNoteFavoriteSchema } from '@/models/repositories/note-favorite.js'; -import { packedChannelSchema } from '@/models/repositories/channel.js'; -import { packedAntennaSchema } from '@/models/repositories/antenna.js'; -import { packedClipSchema } from '@/models/repositories/clip.js'; -import { packedFederationInstanceSchema } from '@/models/repositories/federation-instance.js'; -import { packedQueueCountSchema } from '@/models/repositories/queue.js'; -import { packedGalleryPostSchema } from '@/models/repositories/gallery-post.js'; +import { packedUserSchema } from '@/models/repositories/user'; +import { Schema } from '@/misc/schema'; +import { packedNoteSchema } from '@/models/repositories/note'; +import { packedUserListSchema } from '@/models/repositories/user-list'; +import { packedAppSchema } from '@/models/repositories/app'; +import { packedMessagingMessageSchema } from '@/models/repositories/messaging-message'; +import { packedNotificationSchema } from '@/models/repositories/notification'; +import { packedDriveFileSchema } from '@/models/repositories/drive-file'; +import { packedDriveFolderSchema } from '@/models/repositories/drive-folder'; +import { packedFollowingSchema } from '@/models/repositories/following'; +import { packedMutingSchema } from '@/models/repositories/muting'; +import { packedBlockingSchema } from '@/models/repositories/blocking'; +import { packedNoteReactionSchema } from '@/models/repositories/note-reaction'; +import { packedHashtagSchema } from '@/models/repositories/hashtag'; +import { packedPageSchema } from '@/models/repositories/page'; +import { packedUserGroupSchema } from '@/models/repositories/user-group'; +import { packedNoteFavoriteSchema } from '@/models/repositories/note-favorite'; +import { packedChannelSchema } from '@/models/repositories/channel'; +import { packedAntennaSchema } from '@/models/repositories/antenna'; +import { packedClipSchema } from '@/models/repositories/clip'; +import { packedFederationInstanceSchema } from '@/models/repositories/federation-instance'; +import { packedQueueCountSchema } from '@/models/repositories/queue'; +import { packedGalleryPostSchema } from '@/models/repositories/gallery-post'; export function convertSchemaToOpenApiSchema(schema: Schema) { const res: any = schema; diff --git a/src/server/api/private/signin.ts b/src/server/api/private/signin.ts index 1eda141919..fff1037ff9 100644 --- a/src/server/api/private/signin.ts +++ b/src/server/api/private/signin.ts @@ -1,12 +1,12 @@ import * as Koa from 'koa'; import * as bcrypt from 'bcryptjs'; import * as speakeasy from 'speakeasy'; -import signin from '../common/signin.js'; -import config from '@/config/index.js'; -import { Users, Signins, UserProfiles, UserSecurityKeys, AttestationChallenges } from '@/models/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; -import { genId } from '@/misc/gen-id.js'; -import { verifyLogin, hash } from '../2fa.js'; +import signin from '../common/signin'; +import config from '@/config/index'; +import { Users, Signins, UserProfiles, UserSecurityKeys, AttestationChallenges } from '@/models/index'; +import { ILocalUser } from '@/models/entities/user'; +import { genId } from '@/misc/gen-id'; +import { verifyLogin, hash } from '../2fa'; import { randomBytes } from 'crypto'; export default async (ctx: Koa.Context) => { diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index e554b49a63..ef61767f65 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -1,8 +1,8 @@ import * as Koa from 'koa'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { verifyHcaptcha, verifyRecaptcha } from '@/misc/captcha.js'; -import { Users, RegistrationTickets } from '@/models/index.js'; -import { signup } from '../common/signup.js'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { verifyHcaptcha, verifyRecaptcha } from '@/misc/captcha'; +import { Users, RegistrationTickets } from '@/models/index'; +import { signup } from '../common/signup'; export default async (ctx: Koa.Context) => { const body = ctx.request.body; diff --git a/src/server/api/service/discord.ts b/src/server/api/service/discord.ts index 986a4d184c..dd52a23376 100644 --- a/src/server/api/service/discord.ts +++ b/src/server/api/service/discord.ts @@ -1,15 +1,15 @@ import * as Koa from 'koa'; import * as Router from '@koa/router'; -import { getJson } from '@/misc/fetch.js'; +import { getJson } from '@/misc/fetch'; import { OAuth2 } from 'oauth'; -import config from '@/config/index.js'; -import { publishMainStream } from '@/services/stream.js'; -import { redisClient } from '../../../db/redis.js'; +import config from '@/config/index'; +import { publishMainStream } from '@/services/stream'; +import { redisClient } from '../../../db/redis'; import { v4 as uuid } from 'uuid'; -import signin from '../common/signin.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Users, UserProfiles } from '@/models/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; +import signin from '../common/signin'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Users, UserProfiles } from '@/models/index'; +import { ILocalUser } from '@/models/entities/user'; function getUserToken(ctx: Koa.Context) { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts index 841b8e5d12..0616f3f773 100644 --- a/src/server/api/service/github.ts +++ b/src/server/api/service/github.ts @@ -1,15 +1,15 @@ import * as Koa from 'koa'; import * as Router from '@koa/router'; -import { getJson } from '@/misc/fetch.js'; +import { getJson } from '@/misc/fetch'; import { OAuth2 } from 'oauth'; -import config from '@/config/index.js'; -import { publishMainStream } from '@/services/stream.js'; -import { redisClient } from '../../../db/redis.js'; +import config from '@/config/index'; +import { publishMainStream } from '@/services/stream'; +import { redisClient } from '../../../db/redis'; import { v4 as uuid } from 'uuid'; -import signin from '../common/signin.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Users, UserProfiles } from '@/models/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; +import signin from '../common/signin'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Users, UserProfiles } from '@/models/index'; +import { ILocalUser } from '@/models/entities/user'; function getUserToken(ctx: Koa.Context) { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; diff --git a/src/server/api/service/twitter.ts b/src/server/api/service/twitter.ts index 5b08e0533a..8a6a58aeee 100644 --- a/src/server/api/service/twitter.ts +++ b/src/server/api/service/twitter.ts @@ -2,13 +2,13 @@ import * as Koa from 'koa'; import * as Router from '@koa/router'; import { v4 as uuid } from 'uuid'; import autwh from 'autwh'; -import { redisClient } from '../../../db/redis.js'; -import { publishMainStream } from '@/services/stream.js'; -import config from '@/config/index.js'; -import signin from '../common/signin.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Users, UserProfiles } from '@/models/index.js'; -import { ILocalUser } from '@/models/entities/user.js'; +import { redisClient } from '../../../db/redis'; +import { publishMainStream } from '@/services/stream'; +import config from '@/config/index'; +import signin from '../common/signin'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Users, UserProfiles } from '@/models/index'; +import { ILocalUser } from '@/models/entities/user'; function getUserToken(ctx: Koa.Context) { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; diff --git a/src/server/api/stream/channels/admin.ts b/src/server/api/stream/channels/admin.ts index e68490d05c..1ff932d1dd 100644 --- a/src/server/api/stream/channels/admin.ts +++ b/src/server/api/stream/channels/admin.ts @@ -1,5 +1,5 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel.js'; +import Channel from '../channel'; export default class extends Channel { public readonly chName = 'admin'; diff --git a/src/server/api/stream/channels/antenna.ts b/src/server/api/stream/channels/antenna.ts index 6c672ffd65..bf9c53c453 100644 --- a/src/server/api/stream/channels/antenna.ts +++ b/src/server/api/stream/channels/antenna.ts @@ -1,8 +1,8 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel.js'; -import { Notes } from '@/models/index.js'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import Channel from '../channel'; +import { Notes } from '@/models/index'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; export default class extends Channel { public readonly chName = 'antenna'; diff --git a/src/server/api/stream/channels/channel.ts b/src/server/api/stream/channels/channel.ts index 8665c8253d..e6a9a6c696 100644 --- a/src/server/api/stream/channels/channel.ts +++ b/src/server/api/stream/channels/channel.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel.js'; -import { Notes, Users } from '@/models/index.js'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { User } from '@/models/entities/user.js'; +import Channel from '../channel'; +import { Notes, Users } from '@/models/index'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; +import { PackedNote } from '@/models/repositories/note'; +import { User } from '@/models/entities/user'; export default class extends Channel { public readonly chName = 'channel'; diff --git a/src/server/api/stream/channels/drive.ts b/src/server/api/stream/channels/drive.ts index 66f2647942..4112dd9b04 100644 --- a/src/server/api/stream/channels/drive.ts +++ b/src/server/api/stream/channels/drive.ts @@ -1,5 +1,5 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel.js'; +import Channel from '../channel'; export default class extends Channel { public readonly chName = 'drive'; diff --git a/src/server/api/stream/channels/games/reversi-game.ts b/src/server/api/stream/channels/games/reversi-game.ts index a13d79d3c3..bfdbf1d266 100644 --- a/src/server/api/stream/channels/games/reversi-game.ts +++ b/src/server/api/stream/channels/games/reversi-game.ts @@ -1,12 +1,12 @@ import autobind from 'autobind-decorator'; import * as CRC32 from 'crc-32'; -import { publishReversiGameStream } from '@/services/stream.js'; -import Reversi from '../../../../../games/reversi/core.js'; -import * as maps from '../../../../../games/reversi/maps.js'; -import Channel from '../../channel.js'; -import { ReversiGame } from '@/models/entities/games/reversi/game.js'; -import { ReversiGames, Users } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; +import { publishReversiGameStream } from '@/services/stream'; +import Reversi from '../../../../../games/reversi/core'; +import * as maps from '../../../../../games/reversi/maps'; +import Channel from '../../channel'; +import { ReversiGame } from '@/models/entities/games/reversi/game'; +import { ReversiGames, Users } from '@/models/index'; +import { User } from '@/models/entities/user'; export default class extends Channel { public readonly chName = 'gamesReversiGame'; diff --git a/src/server/api/stream/channels/games/reversi.ts b/src/server/api/stream/channels/games/reversi.ts index f8fa7b94e1..3b89aac35c 100644 --- a/src/server/api/stream/channels/games/reversi.ts +++ b/src/server/api/stream/channels/games/reversi.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import { publishMainStream } from '@/services/stream.js'; -import Channel from '../../channel.js'; -import { ReversiMatchings } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream'; +import Channel from '../../channel'; +import { ReversiMatchings } from '@/models/index'; export default class extends Channel { public readonly chName = 'gamesReversi'; diff --git a/src/server/api/stream/channels/global-timeline.ts b/src/server/api/stream/channels/global-timeline.ts index 1e1e8b5c96..2cb138966f 100644 --- a/src/server/api/stream/channels/global-timeline.ts +++ b/src/server/api/stream/channels/global-timeline.ts @@ -1,11 +1,11 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import Channel from '../channel.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Notes } from '@/models/index.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { checkWordMute } from '@/misc/check-word-mute.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import Channel from '../channel'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Notes } from '@/models/index'; +import { PackedNote } from '@/models/repositories/note'; +import { checkWordMute } from '@/misc/check-word-mute'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; export default class extends Channel { public readonly chName = 'globalTimeline'; diff --git a/src/server/api/stream/channels/hashtag.ts b/src/server/api/stream/channels/hashtag.ts index 8a5b7a267d..997ab75f6d 100644 --- a/src/server/api/stream/channels/hashtag.ts +++ b/src/server/api/stream/channels/hashtag.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import Channel from '../channel.js'; -import { Notes } from '@/models/index.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import Channel from '../channel'; +import { Notes } from '@/models/index'; +import { PackedNote } from '@/models/repositories/note'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; export default class extends Channel { public readonly chName = 'hashtag'; diff --git a/src/server/api/stream/channels/home-timeline.ts b/src/server/api/stream/channels/home-timeline.ts index e19cd077c3..c7a9728741 100644 --- a/src/server/api/stream/channels/home-timeline.ts +++ b/src/server/api/stream/channels/home-timeline.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import Channel from '../channel.js'; -import { Notes } from '@/models/index.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { checkWordMute } from '@/misc/check-word-mute.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import Channel from '../channel'; +import { Notes } from '@/models/index'; +import { PackedNote } from '@/models/repositories/note'; +import { checkWordMute } from '@/misc/check-word-mute'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; export default class extends Channel { public readonly chName = 'homeTimeline'; diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts index 4d48075af6..5c454764ec 100644 --- a/src/server/api/stream/channels/hybrid-timeline.ts +++ b/src/server/api/stream/channels/hybrid-timeline.ts @@ -1,12 +1,12 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import Channel from '../channel.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Notes } from '@/models/index.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { PackedUser } from '@/models/repositories/user.js'; -import { checkWordMute } from '@/misc/check-word-mute.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import Channel from '../channel'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Notes } from '@/models/index'; +import { PackedNote } from '@/models/repositories/note'; +import { PackedUser } from '@/models/repositories/user'; +import { checkWordMute } from '@/misc/check-word-mute'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; export default class extends Channel { public readonly chName = 'hybridTimeline'; diff --git a/src/server/api/stream/channels/index.ts b/src/server/api/stream/channels/index.ts index 39f4d235f1..1841573043 100644 --- a/src/server/api/stream/channels/index.ts +++ b/src/server/api/stream/channels/index.ts @@ -1,20 +1,20 @@ -import main from './main.js'; -import homeTimeline from './home-timeline.js'; -import localTimeline from './local-timeline.js'; -import hybridTimeline from './hybrid-timeline.js'; -import globalTimeline from './global-timeline.js'; -import serverStats from './server-stats.js'; -import queueStats from './queue-stats.js'; -import userList from './user-list.js'; -import antenna from './antenna.js'; -import messaging from './messaging.js'; -import messagingIndex from './messaging-index.js'; -import drive from './drive.js'; -import hashtag from './hashtag.js'; -import channel from './channel.js'; -import admin from './admin.js'; -import gamesReversi from './games/reversi.js'; -import gamesReversiGame from './games/reversi-game.js'; +import main from './main'; +import homeTimeline from './home-timeline'; +import localTimeline from './local-timeline'; +import hybridTimeline from './hybrid-timeline'; +import globalTimeline from './global-timeline'; +import serverStats from './server-stats'; +import queueStats from './queue-stats'; +import userList from './user-list'; +import antenna from './antenna'; +import messaging from './messaging'; +import messagingIndex from './messaging-index'; +import drive from './drive'; +import hashtag from './hashtag'; +import channel from './channel'; +import admin from './admin'; +import gamesReversi from './games/reversi'; +import gamesReversiGame from './games/reversi-game'; export default { main, diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts index c01ca5347b..4bf0d02ed3 100644 --- a/src/server/api/stream/channels/local-timeline.ts +++ b/src/server/api/stream/channels/local-timeline.ts @@ -1,12 +1,12 @@ import autobind from 'autobind-decorator'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import Channel from '../channel.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Notes } from '@/models/index.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { PackedUser } from '@/models/repositories/user.js'; -import { checkWordMute } from '@/misc/check-word-mute.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import Channel from '../channel'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Notes } from '@/models/index'; +import { PackedNote } from '@/models/repositories/note'; +import { PackedUser } from '@/models/repositories/user'; +import { checkWordMute } from '@/misc/check-word-mute'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; export default class extends Channel { public readonly chName = 'localTimeline'; diff --git a/src/server/api/stream/channels/main.ts b/src/server/api/stream/channels/main.ts index 103c61a0fb..b99cb931da 100644 --- a/src/server/api/stream/channels/main.ts +++ b/src/server/api/stream/channels/main.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel.js'; -import { Notes } from '@/models/index.js'; +import Channel from '../channel'; +import { Notes } from '@/models/index'; export default class extends Channel { public readonly chName = 'main'; diff --git a/src/server/api/stream/channels/messaging-index.ts b/src/server/api/stream/channels/messaging-index.ts index 24f8aad400..0c495398ab 100644 --- a/src/server/api/stream/channels/messaging-index.ts +++ b/src/server/api/stream/channels/messaging-index.ts @@ -1,5 +1,5 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel.js'; +import Channel from '../channel'; export default class extends Channel { public readonly chName = 'messagingIndex'; diff --git a/src/server/api/stream/channels/messaging.ts b/src/server/api/stream/channels/messaging.ts index c16507a5f3..015b0a7650 100644 --- a/src/server/api/stream/channels/messaging.ts +++ b/src/server/api/stream/channels/messaging.ts @@ -1,8 +1,8 @@ import autobind from 'autobind-decorator'; -import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message.js'; -import Channel from '../channel.js'; -import { UserGroupJoinings, Users, MessagingMessages } from '@/models/index.js'; -import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; +import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message'; +import Channel from '../channel'; +import { UserGroupJoinings, Users, MessagingMessages } from '@/models/index'; +import { User, ILocalUser, IRemoteUser } from '@/models/entities/user'; export default class extends Channel { public readonly chName = 'messaging'; diff --git a/src/server/api/stream/channels/queue-stats.ts b/src/server/api/stream/channels/queue-stats.ts index f05e619b96..0bda0cfcb9 100644 --- a/src/server/api/stream/channels/queue-stats.ts +++ b/src/server/api/stream/channels/queue-stats.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Xev from 'xev'; -import Channel from '../channel.js'; +import Channel from '../channel'; const ev = new Xev(); diff --git a/src/server/api/stream/channels/server-stats.ts b/src/server/api/stream/channels/server-stats.ts index 76eb5b0f26..d245a7f70c 100644 --- a/src/server/api/stream/channels/server-stats.ts +++ b/src/server/api/stream/channels/server-stats.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Xev from 'xev'; -import Channel from '../channel.js'; +import Channel from '../channel'; const ev = new Xev(); diff --git a/src/server/api/stream/channels/user-list.ts b/src/server/api/stream/channels/user-list.ts index ca8e46d507..0ca83cd658 100644 --- a/src/server/api/stream/channels/user-list.ts +++ b/src/server/api/stream/channels/user-list.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Channel from '../channel.js'; -import { Notes, UserListJoinings, UserLists } from '@/models/index.js'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import { User } from '@/models/entities/user.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { isBlockerUserRelated } from '@/misc/is-blocker-user-related.js'; +import Channel from '../channel'; +import { Notes, UserListJoinings, UserLists } from '@/models/index'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import { User } from '@/models/entities/user'; +import { PackedNote } from '@/models/repositories/note'; +import { isBlockerUserRelated } from '@/misc/is-blocker-user-related'; export default class extends Channel { public readonly chName = 'userList'; diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index 1947be0a75..469f28f11c 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -1,20 +1,20 @@ import autobind from 'autobind-decorator'; import * as websocket from 'websocket'; -import { readNotification } from '../common/read-notification.js'; -import call from '../call.js'; -import readNote from '@/services/note/read.js'; -import Channel from './channel.js'; -import channels from './channels/index.js'; +import { readNotification } from '../common/read-notification'; +import call from '../call'; +import readNote from '@/services/note/read'; +import Channel from './channel'; +import channels from './channels/index'; import { EventEmitter } from 'events'; -import { User } from '@/models/entities/user.js'; -import { Channel as ChannelModel } from '@/models/entities/channel.js'; -import { Users, Followings, Mutings, UserProfiles, ChannelFollowings, Blockings } from '@/models/index.js'; -import { ApiError } from '../error.js'; -import { AccessToken } from '@/models/entities/access-token.js'; -import { UserProfile } from '@/models/entities/user-profile.js'; -import { publishChannelStream, publishGroupMessagingStream, publishMessagingStream } from '@/services/stream.js'; -import { UserGroup } from '@/models/entities/user-group.js'; -import { PackedNote } from '@/models/repositories/note.js'; +import { User } from '@/models/entities/user'; +import { Channel as ChannelModel } from '@/models/entities/channel'; +import { Users, Followings, Mutings, UserProfiles, ChannelFollowings, Blockings } from '@/models/index'; +import { ApiError } from '../error'; +import { AccessToken } from '@/models/entities/access-token'; +import { UserProfile } from '@/models/entities/user-profile'; +import { publishChannelStream, publishGroupMessagingStream, publishMessagingStream } from '@/services/stream'; +import { UserGroup } from '@/models/entities/user-group'; +import { PackedNote } from '@/models/repositories/note'; /** * Main stream connection diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index 115692bed0..8808bc9860 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -1,12 +1,12 @@ import * as http from 'http'; import * as websocket from 'websocket'; -import MainStreamConnection from './stream/index.js'; +import MainStreamConnection from './stream/index'; import { ParsedUrlQuery } from 'querystring'; -import authenticate from './authenticate.js'; +import authenticate from './authenticate'; import { EventEmitter } from 'events'; -import { subsdcriber as redisClient } from '../../db/redis.js'; -import { Users } from '@/models/index.js'; +import { subsdcriber as redisClient } from '../../db/redis'; +import { Users } from '@/models/index'; module.exports = (server: http.Server) => { // Init websocket server diff --git a/src/server/file/index.ts b/src/server/file/index.ts index c58c3cbf25..9b5d8f7267 100644 --- a/src/server/file/index.ts +++ b/src/server/file/index.ts @@ -8,7 +8,7 @@ import { dirname } from 'path'; import * as Koa from 'koa'; import * as cors from '@koa/cors'; import * as Router from '@koa/router'; -import sendDriveFile from './send-drive-file.js'; +import sendDriveFile from './send-drive-file'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; diff --git a/src/server/file/send-drive-file.ts b/src/server/file/send-drive-file.ts index f4f4bdb3c7..c455de6447 100644 --- a/src/server/file/send-drive-file.ts +++ b/src/server/file/send-drive-file.ts @@ -5,14 +5,14 @@ import * as Koa from 'koa'; import * as send from 'koa-send'; import * as rename from 'rename'; import * as tmp from 'tmp'; -import { serverLogger } from '../index.js'; -import { contentDisposition } from '@/misc/content-disposition.js'; -import { DriveFiles } from '@/models/index.js'; -import { InternalStorage } from '@/services/drive/internal-storage.js'; -import { downloadUrl } from '@/misc/download-url.js'; -import { detectType } from '@/misc/get-file-info.js'; -import { convertToJpeg, convertToPngOrJpeg } from '@/services/drive/image-processor.js'; -import { GenerateVideoThumbnail } from '@/services/drive/generate-video-thumbnail.js'; +import { serverLogger } from '../index'; +import { contentDisposition } from '@/misc/content-disposition'; +import { DriveFiles } from '@/models/index'; +import { InternalStorage } from '@/services/drive/internal-storage'; +import { downloadUrl } from '@/misc/download-url'; +import { detectType } from '@/misc/get-file-info'; +import { convertToJpeg, convertToPngOrJpeg } from '@/services/drive/image-processor'; +import { GenerateVideoThumbnail } from '@/services/drive/generate-video-thumbnail'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; diff --git a/src/server/index.ts b/src/server/index.ts index bf83b7dd42..a9904accb4 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -13,19 +13,19 @@ import * as koaLogger from 'koa-logger'; import * as requestStats from 'request-stats'; import * as slow from 'koa-slow'; -import activityPub from './activitypub.js'; -import nodeinfo from './nodeinfo.js'; -import wellKnown from './well-known.js'; -import config from '@/config/index.js'; -import apiServer from './api/index.js'; -import { sum } from '../prelude/array.js'; -import Logger from '@/services/logger.js'; -import { program } from '../argv.js'; -import { UserProfiles, Users } from '@/models/index.js'; -import { networkChart } from '@/services/chart/index.js'; -import { genAvatar } from '@/misc/gen-avatar.js'; -import { createTemp } from '@/misc/create-temp.js'; -import { publishMainStream } from '@/services/stream.js'; +import activityPub from './activitypub'; +import nodeinfo from './nodeinfo'; +import wellKnown from './well-known'; +import config from '@/config/index'; +import apiServer from './api/index'; +import { sum } from '../prelude/array'; +import Logger from '@/services/logger'; +import { program } from '../argv'; +import { UserProfiles, Users } from '@/models/index'; +import { networkChart } from '@/services/chart/index'; +import { genAvatar } from '@/misc/gen-avatar'; +import { createTemp } from '@/misc/create-temp'; +import { publishMainStream } from '@/services/stream'; export const serverLogger = new Logger('server', 'gray', false); diff --git a/src/server/nodeinfo.ts b/src/server/nodeinfo.ts index 3600bd2acd..dec2615086 100644 --- a/src/server/nodeinfo.ts +++ b/src/server/nodeinfo.ts @@ -1,9 +1,9 @@ import * as Router from '@koa/router'; -import config from '@/config/index.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { Users } from '@/models/index.js'; -// import User from '../models/user.js'; -// import Note from '../models/note.js'; +import config from '@/config/index'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { Users } from '@/models/index'; +// import User from '../models/user'; +// import Note from '../models/note'; const router = new Router(); diff --git a/src/server/proxy/index.ts b/src/server/proxy/index.ts index 210c2fcf12..9ef198d31b 100644 --- a/src/server/proxy/index.ts +++ b/src/server/proxy/index.ts @@ -5,7 +5,7 @@ import * as Koa from 'koa'; import * as cors from '@koa/cors'; import * as Router from '@koa/router'; -import { proxyMedia } from './proxy-media.js'; +import { proxyMedia } from './proxy-media'; // Init app const app = new Koa(); diff --git a/src/server/proxy/proxy-media.ts b/src/server/proxy/proxy-media.ts index 3200266bed..fb38a5c07b 100644 --- a/src/server/proxy/proxy-media.ts +++ b/src/server/proxy/proxy-media.ts @@ -1,10 +1,10 @@ import * as fs from 'fs'; import * as Koa from 'koa'; -import { serverLogger } from '../index.js'; -import { IImage, convertToPng, convertToJpeg } from '@/services/drive/image-processor.js'; -import { createTemp } from '@/misc/create-temp.js'; -import { downloadUrl } from '@/misc/download-url.js'; -import { detectType } from '@/misc/get-file-info.js'; +import { serverLogger } from '../index'; +import { IImage, convertToPng, convertToJpeg } from '@/services/drive/image-processor'; +import { createTemp } from '@/misc/create-temp'; +import { downloadUrl } from '@/misc/download-url'; +import { detectType } from '@/misc/get-file-info'; export async function proxyMedia(ctx: Koa.Context) { const url = 'url' in ctx.query ? ctx.query.url : 'https://' + ctx.params.url; diff --git a/src/server/web/feed.ts b/src/server/web/feed.ts index 57b1401e35..4b6de517b7 100644 --- a/src/server/web/feed.ts +++ b/src/server/web/feed.ts @@ -1,7 +1,7 @@ import { Feed } from 'feed'; -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; -import { Notes, DriveFiles, UserProfiles } from '@/models/index.js'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; +import { Notes, DriveFiles, UserProfiles } from '@/models/index'; import { In } from 'typeorm'; export default async function(user: User) { diff --git a/src/server/web/index.ts b/src/server/web/index.ts index 68cfc5d0f0..eae00588c6 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -15,16 +15,16 @@ import * as views from 'koa-views'; import * as glob from 'glob'; import * as MarkdownIt from 'markdown-it'; -import packFeed from './feed.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { genOpenapiSpec } from '../api/openapi/gen-spec.js'; -import config from '@/config/index.js'; -import { Users, Notes, Emojis, UserProfiles, Pages, Channels, Clips, GalleryPosts } from '@/models/index.js'; -import { parseAcct } from '@/misc/acct.js'; -import { getNoteSummary } from '@/misc/get-note-summary.js'; +import packFeed from './feed'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { genOpenapiSpec } from '../api/openapi/gen-spec'; +import config from '@/config/index'; +import { Users, Notes, Emojis, UserProfiles, Pages, Channels, Clips, GalleryPosts } from '@/models/index'; +import { parseAcct } from '@/misc/acct'; +import { getNoteSummary } from '@/misc/get-note-summary'; import { getConnection } from 'typeorm'; -import { redisClient } from '../../db/redis.js'; -import locales from '../../../locales/index.js'; +import { redisClient } from '../../db/redis'; +import locales from '../../../locales/index'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; diff --git a/src/server/web/manifest.ts b/src/server/web/manifest.ts index a35b2a5696..918fe27c03 100644 --- a/src/server/web/manifest.ts +++ b/src/server/web/manifest.ts @@ -1,6 +1,6 @@ import * as Koa from 'koa'; import * as manifest from './manifest.json'; -import { fetchMeta } from '@/misc/fetch-meta.js'; +import { fetchMeta } from '@/misc/fetch-meta'; module.exports = async (ctx: Koa.Context) => { const json = JSON.parse(JSON.stringify(manifest)); diff --git a/src/server/web/url-preview.ts b/src/server/web/url-preview.ts index af9e2c77f5..619335634c 100644 --- a/src/server/web/url-preview.ts +++ b/src/server/web/url-preview.ts @@ -1,10 +1,10 @@ import * as Koa from 'koa'; import summaly from 'summaly'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import Logger from '@/services/logger.js'; -import config from '@/config/index.js'; -import { query } from '../../prelude/url.js'; -import { getJson } from '@/misc/fetch.js'; +import { fetchMeta } from '@/misc/fetch-meta'; +import Logger from '@/services/logger'; +import config from '@/config/index'; +import { query } from '../../prelude/url'; +import { getJson } from '@/misc/fetch'; const logger = new Logger('url-preview'); diff --git a/src/server/well-known.ts b/src/server/well-known.ts index d5fd44069d..11ad22c580 100644 --- a/src/server/well-known.ts +++ b/src/server/well-known.ts @@ -1,11 +1,11 @@ import * as Router from '@koa/router'; -import config from '@/config/index.js'; -import { parseAcct, Acct } from '@/misc/acct.js'; -import { links } from './nodeinfo.js'; -import { escapeAttribute, escapeValue } from '../prelude/xml.js'; -import { Users } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; +import config from '@/config/index'; +import { parseAcct, Acct } from '@/misc/acct'; +import { links } from './nodeinfo'; +import { escapeAttribute, escapeValue } from '../prelude/xml'; +import { Users } from '@/models/index'; +import { User } from '@/models/entities/user'; // Init router const router = new Router(); diff --git a/src/services/add-note-to-antenna.ts b/src/services/add-note-to-antenna.ts index f285b7a605..3aedbd2c32 100644 --- a/src/services/add-note-to-antenna.ts +++ b/src/services/add-note-to-antenna.ts @@ -1,10 +1,10 @@ -import { Antenna } from '@/models/entities/antenna.js'; -import { Note } from '@/models/entities/note.js'; -import { AntennaNotes, Mutings, Notes } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { isMutedUserRelated } from '@/misc/is-muted-user-related.js'; -import { publishAntennaStream, publishMainStream } from '@/services/stream.js'; -import { User } from '@/models/entities/user.js'; +import { Antenna } from '@/models/entities/antenna'; +import { Note } from '@/models/entities/note'; +import { AntennaNotes, Mutings, Notes } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { isMutedUserRelated } from '@/misc/is-muted-user-related'; +import { publishAntennaStream, publishMainStream } from '@/services/stream'; +import { User } from '@/models/entities/user'; export async function addNoteToAntenna(antenna: Antenna, note: Note, noteUser: { id: User['id']; }) { // 通知しない設定になっているか、自分自身の投稿なら既読にする diff --git a/src/services/blocking/create.ts b/src/services/blocking/create.ts index 415223f089..76c4bda9dc 100644 --- a/src/services/blocking/create.ts +++ b/src/services/blocking/create.ts @@ -1,14 +1,14 @@ -import { publishMainStream, publishUserEvent } from '@/services/stream.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderFollow from '@/remote/activitypub/renderer/follow.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import renderBlock from '@/remote/activitypub/renderer/block.js'; -import { deliver } from '@/queue/index.js'; -import renderReject from '@/remote/activitypub/renderer/reject.js'; -import { User } from '@/models/entities/user.js'; -import { Blockings, Users, FollowRequests, Followings, UserListJoinings, UserLists } from '@/models/index.js'; -import { perUserFollowingChart } from '@/services/chart/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { publishMainStream, publishUserEvent } from '@/services/stream'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderFollow from '@/remote/activitypub/renderer/follow'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import renderBlock from '@/remote/activitypub/renderer/block'; +import { deliver } from '@/queue/index'; +import renderReject from '@/remote/activitypub/renderer/reject'; +import { User } from '@/models/entities/user'; +import { Blockings, Users, FollowRequests, Followings, UserListJoinings, UserLists } from '@/models/index'; +import { perUserFollowingChart } from '@/services/chart/index'; +import { genId } from '@/misc/gen-id'; export default async function(blocker: User, blockee: User) { await Promise.all([ diff --git a/src/services/blocking/delete.ts b/src/services/blocking/delete.ts index 240c0b15d1..de7efb1558 100644 --- a/src/services/blocking/delete.ts +++ b/src/services/blocking/delete.ts @@ -1,10 +1,10 @@ -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderBlock from '@/remote/activitypub/renderer/block.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import { deliver } from '@/queue/index.js'; -import Logger from '../logger.js'; -import { User } from '@/models/entities/user.js'; -import { Blockings, Users } from '@/models/index.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderBlock from '@/remote/activitypub/renderer/block'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import { deliver } from '@/queue/index'; +import Logger from '../logger'; +import { User } from '@/models/entities/user'; +import { Blockings, Users } from '@/models/index'; const logger = new Logger('blocking/delete'); diff --git a/src/services/chart/charts/classes/active-users.ts b/src/services/chart/charts/classes/active-users.ts index 959eb0f8e1..f80d8a3322 100644 --- a/src/services/chart/charts/classes/active-users.ts +++ b/src/services/chart/charts/classes/active-users.ts @@ -1,9 +1,9 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { User } from '@/models/entities/user.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Users } from '@/models/index.js'; -import { name, schema } from '../schemas/active-users.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { User } from '@/models/entities/user'; +import { SchemaType } from '@/misc/schema'; +import { Users } from '@/models/index'; +import { name, schema } from '../schemas/active-users'; type ActiveUsersLog = SchemaType; diff --git a/src/services/chart/charts/classes/drive.ts b/src/services/chart/charts/classes/drive.ts index 9bd64074ed..93eabf3096 100644 --- a/src/services/chart/charts/classes/drive.ts +++ b/src/services/chart/charts/classes/drive.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { DriveFiles } from '@/models/index.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { DriveFiles } from '@/models/index'; import { Not, IsNull } from 'typeorm'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { name, schema } from '../schemas/drive.js'; +import { DriveFile } from '@/models/entities/drive-file'; +import { name, schema } from '../schemas/drive'; type DriveLog = SchemaType; diff --git a/src/services/chart/charts/classes/federation.ts b/src/services/chart/charts/classes/federation.ts index 39feed7b14..5f918b294f 100644 --- a/src/services/chart/charts/classes/federation.ts +++ b/src/services/chart/charts/classes/federation.ts @@ -1,8 +1,8 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Instances } from '@/models/index.js'; -import { name, schema } from '../schemas/federation.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { Instances } from '@/models/index'; +import { name, schema } from '../schemas/federation'; type FederationLog = SchemaType; diff --git a/src/services/chart/charts/classes/hashtag.ts b/src/services/chart/charts/classes/hashtag.ts index 13f4598499..f7f5e17dec 100644 --- a/src/services/chart/charts/classes/hashtag.ts +++ b/src/services/chart/charts/classes/hashtag.ts @@ -1,9 +1,9 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { User } from '@/models/entities/user.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Users } from '@/models/index.js'; -import { name, schema } from '../schemas/hashtag.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { User } from '@/models/entities/user'; +import { SchemaType } from '@/misc/schema'; +import { Users } from '@/models/index'; +import { name, schema } from '../schemas/hashtag'; type HashtagLog = SchemaType; diff --git a/src/services/chart/charts/classes/instance.ts b/src/services/chart/charts/classes/instance.ts index 429d4067bd..1032de7bc0 100644 --- a/src/services/chart/charts/classes/instance.ts +++ b/src/services/chart/charts/classes/instance.ts @@ -1,11 +1,11 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { DriveFiles, Followings, Users, Notes } from '@/models/index.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { name, schema } from '../schemas/instance.js'; -import { Note } from '@/models/entities/note.js'; -import { toPuny } from '@/misc/convert-host.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { DriveFiles, Followings, Users, Notes } from '@/models/index'; +import { DriveFile } from '@/models/entities/drive-file'; +import { name, schema } from '../schemas/instance'; +import { Note } from '@/models/entities/note'; +import { toPuny } from '@/misc/convert-host'; type InstanceLog = SchemaType; diff --git a/src/services/chart/charts/classes/network.ts b/src/services/chart/charts/classes/network.ts index 1e39115b02..2ce75e0b34 100644 --- a/src/services/chart/charts/classes/network.ts +++ b/src/services/chart/charts/classes/network.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { name, schema } from '../schemas/network.js'; +import Chart, { DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { name, schema } from '../schemas/network'; type NetworkLog = SchemaType; diff --git a/src/services/chart/charts/classes/notes.ts b/src/services/chart/charts/classes/notes.ts index 7cc3c7de83..0675d346d1 100644 --- a/src/services/chart/charts/classes/notes.ts +++ b/src/services/chart/charts/classes/notes.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Notes } from '@/models/index.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { Notes } from '@/models/index'; import { Not, IsNull } from 'typeorm'; -import { Note } from '@/models/entities/note.js'; -import { name, schema } from '../schemas/notes.js'; +import { Note } from '@/models/entities/note'; +import { name, schema } from '../schemas/notes'; type NotesLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-drive.ts b/src/services/chart/charts/classes/per-user-drive.ts index 04b29c0abe..f28987191b 100644 --- a/src/services/chart/charts/classes/per-user-drive.ts +++ b/src/services/chart/charts/classes/per-user-drive.ts @@ -1,9 +1,9 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { DriveFiles } from '@/models/index.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { name, schema } from '../schemas/per-user-drive.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { DriveFiles } from '@/models/index'; +import { DriveFile } from '@/models/entities/drive-file'; +import { name, schema } from '../schemas/per-user-drive'; type PerUserDriveLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-following.ts b/src/services/chart/charts/classes/per-user-following.ts index 43ca9d3b6c..08a9ad1d2b 100644 --- a/src/services/chart/charts/classes/per-user-following.ts +++ b/src/services/chart/charts/classes/per-user-following.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Followings, Users } from '@/models/index.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { Followings, Users } from '@/models/index'; import { Not, IsNull } from 'typeorm'; -import { User } from '@/models/entities/user.js'; -import { name, schema } from '../schemas/per-user-following.js'; +import { User } from '@/models/entities/user'; +import { name, schema } from '../schemas/per-user-following'; type PerUserFollowingLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-notes.ts b/src/services/chart/charts/classes/per-user-notes.ts index 3da16f8139..0e808766f5 100644 --- a/src/services/chart/charts/classes/per-user-notes.ts +++ b/src/services/chart/charts/classes/per-user-notes.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { User } from '@/models/entities/user.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Notes } from '@/models/index.js'; -import { Note } from '@/models/entities/note.js'; -import { name, schema } from '../schemas/per-user-notes.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { User } from '@/models/entities/user'; +import { SchemaType } from '@/misc/schema'; +import { Notes } from '@/models/index'; +import { Note } from '@/models/entities/note'; +import { name, schema } from '../schemas/per-user-notes'; type PerUserNotesLog = SchemaType; diff --git a/src/services/chart/charts/classes/per-user-reactions.ts b/src/services/chart/charts/classes/per-user-reactions.ts index d4665c0677..e71bcb71c4 100644 --- a/src/services/chart/charts/classes/per-user-reactions.ts +++ b/src/services/chart/charts/classes/per-user-reactions.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { DeepPartial } from '../../core.js'; -import { User } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Users } from '@/models/index.js'; -import { name, schema } from '../schemas/per-user-reactions.js'; +import Chart, { DeepPartial } from '../../core'; +import { User } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { SchemaType } from '@/misc/schema'; +import { Users } from '@/models/index'; +import { name, schema } from '../schemas/per-user-reactions'; type PerUserReactionsLog = SchemaType; diff --git a/src/services/chart/charts/classes/test-grouped.ts b/src/services/chart/charts/classes/test-grouped.ts index a667aaff15..84e6d5e33f 100644 --- a/src/services/chart/charts/classes/test-grouped.ts +++ b/src/services/chart/charts/classes/test-grouped.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { name, schema } from '../schemas/test-grouped.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { name, schema } from '../schemas/test-grouped'; type TestGroupedLog = SchemaType; diff --git a/src/services/chart/charts/classes/test-unique.ts b/src/services/chart/charts/classes/test-unique.ts index c0ca5f625c..559fda13c9 100644 --- a/src/services/chart/charts/classes/test-unique.ts +++ b/src/services/chart/charts/classes/test-unique.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { name, schema } from '../schemas/test-unique.js'; +import Chart, { DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { name, schema } from '../schemas/test-unique'; type TestUniqueLog = SchemaType; diff --git a/src/services/chart/charts/classes/test.ts b/src/services/chart/charts/classes/test.ts index 829867f5ed..a91d5e1895 100644 --- a/src/services/chart/charts/classes/test.ts +++ b/src/services/chart/charts/classes/test.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { name, schema } from '../schemas/test.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { name, schema } from '../schemas/test'; type TestLog = SchemaType; diff --git a/src/services/chart/charts/classes/users.ts b/src/services/chart/charts/classes/users.ts index be279cb8c1..89b480ef77 100644 --- a/src/services/chart/charts/classes/users.ts +++ b/src/services/chart/charts/classes/users.ts @@ -1,10 +1,10 @@ import autobind from 'autobind-decorator'; -import Chart, { Obj, DeepPartial } from '../../core.js'; -import { SchemaType } from '@/misc/schema.js'; -import { Users } from '@/models/index.js'; +import Chart, { Obj, DeepPartial } from '../../core'; +import { SchemaType } from '@/misc/schema'; +import { Users } from '@/models/index'; import { Not, IsNull } from 'typeorm'; -import { User } from '@/models/entities/user.js'; -import { name, schema } from '../schemas/users.js'; +import { User } from '@/models/entities/user'; +import { name, schema } from '../schemas/users'; type UsersLog = SchemaType; diff --git a/src/services/chart/core.ts b/src/services/chart/core.ts index 109d75933b..3c0526d2e5 100644 --- a/src/services/chart/core.ts +++ b/src/services/chart/core.ts @@ -6,11 +6,11 @@ import * as nestedProperty from 'nested-property'; import autobind from 'autobind-decorator'; -import Logger from '../logger.js'; -import { Schema } from '@/misc/schema.js'; +import Logger from '../logger'; +import { Schema } from '@/misc/schema'; import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm'; -import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time.js'; -import { getChartInsertLock } from '@/misc/app-lock.js'; +import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time'; +import { getChartInsertLock } from '@/misc/app-lock'; const logger = new Logger('chart', 'white', process.env.NODE_ENV !== 'test'); diff --git a/src/services/chart/entities.ts b/src/services/chart/entities.ts index 357a4a5b58..23a97607eb 100644 --- a/src/services/chart/entities.ts +++ b/src/services/chart/entities.ts @@ -1,6 +1,6 @@ import { fileURLToPath } from 'url'; import { dirname } from 'path'; -import Chart from './core.js'; +import Chart from './core'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; diff --git a/src/services/chart/index.ts b/src/services/chart/index.ts index b070ed8637..61eb431ea3 100644 --- a/src/services/chart/index.ts +++ b/src/services/chart/index.ts @@ -1,16 +1,16 @@ -import FederationChart from './charts/classes/federation.js'; -import NotesChart from './charts/classes/notes.js'; -import UsersChart from './charts/classes/users.js'; -import NetworkChart from './charts/classes/network.js'; -import ActiveUsersChart from './charts/classes/active-users.js'; -import InstanceChart from './charts/classes/instance.js'; -import PerUserNotesChart from './charts/classes/per-user-notes.js'; -import DriveChart from './charts/classes/drive.js'; -import PerUserReactionsChart from './charts/classes/per-user-reactions.js'; -import HashtagChart from './charts/classes/hashtag.js'; -import PerUserFollowingChart from './charts/classes/per-user-following.js'; -import PerUserDriveChart from './charts/classes/per-user-drive.js'; -import { beforeShutdown } from '@/misc/before-shutdown.js'; +import FederationChart from './charts/classes/federation'; +import NotesChart from './charts/classes/notes'; +import UsersChart from './charts/classes/users'; +import NetworkChart from './charts/classes/network'; +import ActiveUsersChart from './charts/classes/active-users'; +import InstanceChart from './charts/classes/instance'; +import PerUserNotesChart from './charts/classes/per-user-notes'; +import DriveChart from './charts/classes/drive'; +import PerUserReactionsChart from './charts/classes/per-user-reactions'; +import HashtagChart from './charts/classes/hashtag'; +import PerUserFollowingChart from './charts/classes/per-user-following'; +import PerUserDriveChart from './charts/classes/per-user-drive'; +import { beforeShutdown } from '@/misc/before-shutdown'; export const federationChart = new FederationChart(); export const notesChart = new NotesChart(); diff --git a/src/services/create-notification.ts b/src/services/create-notification.ts index d0ee0e0481..5398d486c0 100644 --- a/src/services/create-notification.ts +++ b/src/services/create-notification.ts @@ -1,10 +1,10 @@ -import { publishMainStream } from '@/services/stream.js'; -import pushSw from './push-notification.js'; -import { Notifications, Mutings, UserProfiles, Users } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { User } from '@/models/entities/user.js'; -import { Notification } from '@/models/entities/notification.js'; -import { sendEmailNotification } from './send-email-notification.js'; +import { publishMainStream } from '@/services/stream'; +import pushSw from './push-notification'; +import { Notifications, Mutings, UserProfiles, Users } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { User } from '@/models/entities/user'; +import { Notification } from '@/models/entities/notification'; +import { sendEmailNotification } from './send-email-notification'; export async function createNotification( notifieeId: User['id'], diff --git a/src/services/create-system-user.ts b/src/services/create-system-user.ts index de03dd4890..71be8d4abf 100644 --- a/src/services/create-system-user.ts +++ b/src/services/create-system-user.ts @@ -1,13 +1,13 @@ import * as bcrypt from 'bcryptjs'; import { v4 as uuid } from 'uuid'; -import generateNativeUserToken from '../server/api/common/generate-native-user-token.js'; -import { genRsaKeyPair } from '@/misc/gen-key-pair.js'; -import { User } from '@/models/entities/user.js'; -import { UserProfile } from '@/models/entities/user-profile.js'; +import generateNativeUserToken from '../server/api/common/generate-native-user-token'; +import { genRsaKeyPair } from '@/misc/gen-key-pair'; +import { User } from '@/models/entities/user'; +import { UserProfile } from '@/models/entities/user-profile'; import { getConnection } from 'typeorm'; -import { genId } from '@/misc/gen-id.js'; -import { UserKeypair } from '@/models/entities/user-keypair.js'; -import { UsedUsername } from '@/models/entities/used-username.js'; +import { genId } from '@/misc/gen-id'; +import { UserKeypair } from '@/models/entities/user-keypair'; +import { UsedUsername } from '@/models/entities/used-username'; export async function createSystemUser(username: string) { const password = uuid(); diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index e1092d068d..6c5fefd4ad 100644 --- a/src/services/drive/add-file.ts +++ b/src/services/drive/add-file.ts @@ -2,23 +2,23 @@ import * as fs from 'fs'; import { v4 as uuid } from 'uuid'; -import { publishMainStream, publishDriveStream } from '@/services/stream.js'; -import { deleteFile } from './delete-file.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { GenerateVideoThumbnail } from './generate-video-thumbnail.js'; -import { driveLogger } from './logger.js'; -import { IImage, convertSharpToJpeg, convertSharpToWebp, convertSharpToPng, convertSharpToPngOrJpeg } from './image-processor.js'; -import { contentDisposition } from '@/misc/content-disposition.js'; -import { getFileInfo } from '@/misc/get-file-info.js'; -import { DriveFiles, DriveFolders, Users, Instances, UserProfiles } from '@/models/index.js'; -import { InternalStorage } from './internal-storage.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { IRemoteUser, User } from '@/models/entities/user.js'; -import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; +import { publishMainStream, publishDriveStream } from '@/services/stream'; +import { deleteFile } from './delete-file'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { GenerateVideoThumbnail } from './generate-video-thumbnail'; +import { driveLogger } from './logger'; +import { IImage, convertSharpToJpeg, convertSharpToWebp, convertSharpToPng, convertSharpToPngOrJpeg } from './image-processor'; +import { contentDisposition } from '@/misc/content-disposition'; +import { getFileInfo } from '@/misc/get-file-info'; +import { DriveFiles, DriveFolders, Users, Instances, UserProfiles } from '@/models/index'; +import { InternalStorage } from './internal-storage'; +import { DriveFile } from '@/models/entities/drive-file'; +import { IRemoteUser, User } from '@/models/entities/user'; +import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index'; +import { genId } from '@/misc/gen-id'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; import * as S3 from 'aws-sdk/clients/s3'; -import { getS3 } from './s3.js'; +import { getS3 } from './s3'; import * as sharp from 'sharp'; const logger = driveLogger.createSubLogger('register', 'yellow'); diff --git a/src/services/drive/delete-file.ts b/src/services/drive/delete-file.ts index 9deb1768b6..2eab17ac1c 100644 --- a/src/services/drive/delete-file.ts +++ b/src/services/drive/delete-file.ts @@ -1,19 +1,19 @@ -import { DriveFile } from '@/models/entities/drive-file.js'; -import { InternalStorage } from './internal-storage.js'; -import { DriveFiles, Instances, Notes, Users } from '@/models/index.js'; -import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index.js'; -import { createDeleteObjectStorageFileJob } from '@/queue/index.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { getS3 } from './s3.js'; +import { DriveFile } from '@/models/entities/drive-file'; +import { InternalStorage } from './internal-storage'; +import { DriveFiles, Instances, Notes, Users } from '@/models/index'; +import { driveChart, perUserDriveChart, instanceChart } from '@/services/chart/index'; +import { createDeleteObjectStorageFileJob } from '@/queue/index'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { getS3 } from './s3'; import { v4 as uuid } from 'uuid'; -import { Note } from '@/models/entities/note.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderDelete from '@/remote/activitypub/renderer/delete.js'; -import renderTombstone from '@/remote/activitypub/renderer/tombstone.js'; -import config from '@/config/index.js'; -import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; +import { Note } from '@/models/entities/note'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderDelete from '@/remote/activitypub/renderer/delete'; +import renderTombstone from '@/remote/activitypub/renderer/tombstone'; +import config from '@/config/index'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager'; import { Brackets } from 'typeorm'; -import { deliverToRelays } from '../relay.js'; +import { deliverToRelays } from '../relay'; export async function deleteFile(file: DriveFile, isExpired = false) { if (file.storedInternal) { diff --git a/src/services/drive/generate-video-thumbnail.ts b/src/services/drive/generate-video-thumbnail.ts index e5cb243d4d..f0adc7c338 100644 --- a/src/services/drive/generate-video-thumbnail.ts +++ b/src/services/drive/generate-video-thumbnail.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; import * as tmp from 'tmp'; -import { IImage, convertToJpeg } from './image-processor.js'; +import { IImage, convertToJpeg } from './image-processor'; import * as FFmpeg from 'fluent-ffmpeg'; export async function GenerateVideoThumbnail(path: string): Promise { diff --git a/src/services/drive/internal-storage.ts b/src/services/drive/internal-storage.ts index e857f942cc..deaf3dc831 100644 --- a/src/services/drive/internal-storage.ts +++ b/src/services/drive/internal-storage.ts @@ -2,7 +2,7 @@ import * as fs from 'fs'; import * as Path from 'path'; import { fileURLToPath } from 'url'; import { dirname } from 'path'; -import config from '@/config/index.js'; +import config from '@/config/index'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; diff --git a/src/services/drive/logger.ts b/src/services/drive/logger.ts index 917a8317e2..655d074d6e 100644 --- a/src/services/drive/logger.ts +++ b/src/services/drive/logger.ts @@ -1,3 +1,3 @@ -import Logger from '../logger.js'; +import Logger from '../logger'; export const driveLogger = new Logger('drive', 'blue'); diff --git a/src/services/drive/s3.ts b/src/services/drive/s3.ts index 89fad70dc5..f473c4a203 100644 --- a/src/services/drive/s3.ts +++ b/src/services/drive/s3.ts @@ -1,7 +1,7 @@ import { URL } from 'url'; import * as S3 from 'aws-sdk/clients/s3'; -import { Meta } from '@/models/entities/meta.js'; -import { getAgentByUrl } from '@/misc/fetch.js'; +import { Meta } from '@/models/entities/meta'; +import { getAgentByUrl } from '@/misc/fetch'; export function getS3(meta: Meta) { const u = meta.objectStorageEndpoint != null diff --git a/src/services/drive/upload-from-url.ts b/src/services/drive/upload-from-url.ts index 21b294142b..29788c4af4 100644 --- a/src/services/drive/upload-from-url.ts +++ b/src/services/drive/upload-from-url.ts @@ -1,12 +1,12 @@ import { URL } from 'url'; -import create from './add-file.js'; -import { User } from '@/models/entities/user.js'; -import { driveLogger } from './logger.js'; -import { createTemp } from '@/misc/create-temp.js'; -import { downloadUrl } from '@/misc/download-url.js'; -import { DriveFolder } from '@/models/entities/drive-folder.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { DriveFiles } from '@/models/index.js'; +import create from './add-file'; +import { User } from '@/models/entities/user'; +import { driveLogger } from './logger'; +import { createTemp } from '@/misc/create-temp'; +import { downloadUrl } from '@/misc/download-url'; +import { DriveFolder } from '@/models/entities/drive-folder'; +import { DriveFile } from '@/models/entities/drive-file'; +import { DriveFiles } from '@/models/index'; const logger = driveLogger.createSubLogger('downloader'); diff --git a/src/services/fetch-instance-metadata.ts b/src/services/fetch-instance-metadata.ts index d21064868c..2c401508a9 100644 --- a/src/services/fetch-instance-metadata.ts +++ b/src/services/fetch-instance-metadata.ts @@ -1,10 +1,10 @@ import { DOMWindow, JSDOM } from 'jsdom'; import fetch from 'node-fetch'; -import { getJson, getHtml, getAgentByUrl } from '@/misc/fetch.js'; -import { Instance } from '@/models/entities/instance.js'; -import { Instances } from '@/models/index.js'; -import { getFetchInstanceMetadataLock } from '@/misc/app-lock.js'; -import Logger from './logger.js'; +import { getJson, getHtml, getAgentByUrl } from '@/misc/fetch'; +import { Instance } from '@/models/entities/instance'; +import { Instances } from '@/models/index'; +import { getFetchInstanceMetadataLock } from '@/misc/app-lock'; +import Logger from './logger'; import { URL } from 'url'; const logger = new Logger('metadata', 'cyan'); diff --git a/src/services/following/create.ts b/src/services/following/create.ts index 194b95dea0..4d0754b504 100644 --- a/src/services/following/create.ts +++ b/src/services/following/create.ts @@ -1,19 +1,19 @@ -import { publishMainStream, publishUserEvent } from '@/services/stream.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderFollow from '@/remote/activitypub/renderer/follow.js'; -import renderAccept from '@/remote/activitypub/renderer/accept.js'; -import renderReject from '@/remote/activitypub/renderer/reject.js'; -import { deliver } from '@/queue/index.js'; -import createFollowRequest from './requests/create.js'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; -import Logger from '../logger.js'; -import { IdentifiableError } from '@/misc/identifiable-error.js'; -import { User } from '@/models/entities/user.js'; -import { Followings, Users, FollowRequests, Blockings, Instances, UserProfiles } from '@/models/index.js'; -import { instanceChart, perUserFollowingChart } from '@/services/chart/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { createNotification } from '../create-notification.js'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; +import { publishMainStream, publishUserEvent } from '@/services/stream'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderFollow from '@/remote/activitypub/renderer/follow'; +import renderAccept from '@/remote/activitypub/renderer/accept'; +import renderReject from '@/remote/activitypub/renderer/reject'; +import { deliver } from '@/queue/index'; +import createFollowRequest from './requests/create'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; +import Logger from '../logger'; +import { IdentifiableError } from '@/misc/identifiable-error'; +import { User } from '@/models/entities/user'; +import { Followings, Users, FollowRequests, Blockings, Instances, UserProfiles } from '@/models/index'; +import { instanceChart, perUserFollowingChart } from '@/services/chart/index'; +import { genId } from '@/misc/gen-id'; +import { createNotification } from '../create-notification'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; const logger = new Logger('following/create'); diff --git a/src/services/following/delete.ts b/src/services/following/delete.ts index 3ea226744c..29e3372b6a 100644 --- a/src/services/following/delete.ts +++ b/src/services/following/delete.ts @@ -1,13 +1,13 @@ -import { publishMainStream, publishUserEvent } from '@/services/stream.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderFollow from '@/remote/activitypub/renderer/follow.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import { deliver } from '@/queue/index.js'; -import Logger from '../logger.js'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; -import { User } from '@/models/entities/user.js'; -import { Followings, Users, Instances } from '@/models/index.js'; -import { instanceChart, perUserFollowingChart } from '@/services/chart/index.js'; +import { publishMainStream, publishUserEvent } from '@/services/stream'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderFollow from '@/remote/activitypub/renderer/follow'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import { deliver } from '@/queue/index'; +import Logger from '../logger'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; +import { User } from '@/models/entities/user'; +import { Followings, Users, Instances } from '@/models/index'; +import { instanceChart, perUserFollowingChart } from '@/services/chart/index'; const logger = new Logger('following/delete'); diff --git a/src/services/following/requests/accept-all.ts b/src/services/following/requests/accept-all.ts index 8025a134f3..23b4fd0a46 100644 --- a/src/services/following/requests/accept-all.ts +++ b/src/services/following/requests/accept-all.ts @@ -1,6 +1,6 @@ -import accept from './accept.js'; -import { User } from '@/models/entities/user.js'; -import { FollowRequests, Users } from '@/models/index.js'; +import accept from './accept'; +import { User } from '@/models/entities/user'; +import { FollowRequests, Users } from '@/models/index'; /** * 指定したユーザー宛てのフォローリクエストをすべて承認 diff --git a/src/services/following/requests/accept.ts b/src/services/following/requests/accept.ts index ff4d0ff998..316a6f1c12 100644 --- a/src/services/following/requests/accept.ts +++ b/src/services/following/requests/accept.ts @@ -1,12 +1,12 @@ -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderFollow from '@/remote/activitypub/renderer/follow.js'; -import renderAccept from '@/remote/activitypub/renderer/accept.js'; -import { deliver } from '@/queue/index.js'; -import { publishMainStream } from '@/services/stream.js'; -import { insertFollowingDoc } from '../create.js'; -import { User, ILocalUser } from '@/models/entities/user.js'; -import { FollowRequests, Users } from '@/models/index.js'; -import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderFollow from '@/remote/activitypub/renderer/follow'; +import renderAccept from '@/remote/activitypub/renderer/accept'; +import { deliver } from '@/queue/index'; +import { publishMainStream } from '@/services/stream'; +import { insertFollowingDoc } from '../create'; +import { User, ILocalUser } from '@/models/entities/user'; +import { FollowRequests, Users } from '@/models/index'; +import { IdentifiableError } from '@/misc/identifiable-error'; export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, follower: User) { const request = await FollowRequests.findOne({ diff --git a/src/services/following/requests/cancel.ts b/src/services/following/requests/cancel.ts index 3f60fefd10..8895849857 100644 --- a/src/services/following/requests/cancel.ts +++ b/src/services/following/requests/cancel.ts @@ -1,11 +1,11 @@ -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderFollow from '@/remote/activitypub/renderer/follow.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import { deliver } from '@/queue/index.js'; -import { publishMainStream } from '@/services/stream.js'; -import { IdentifiableError } from '@/misc/identifiable-error.js'; -import { User, ILocalUser } from '@/models/entities/user.js'; -import { Users, FollowRequests } from '@/models/index.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderFollow from '@/remote/activitypub/renderer/follow'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import { deliver } from '@/queue/index'; +import { publishMainStream } from '@/services/stream'; +import { IdentifiableError } from '@/misc/identifiable-error'; +import { User, ILocalUser } from '@/models/entities/user'; +import { Users, FollowRequests } from '@/models/index'; export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox'] }, follower: { id: User['id']; host: User['host']; uri: User['host'] }) { if (Users.isRemoteUser(followee)) { diff --git a/src/services/following/requests/create.ts b/src/services/following/requests/create.ts index 8f26a66119..507cb2b7d1 100644 --- a/src/services/following/requests/create.ts +++ b/src/services/following/requests/create.ts @@ -1,11 +1,11 @@ -import { publishMainStream } from '@/services/stream.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderFollow from '@/remote/activitypub/renderer/follow.js'; -import { deliver } from '@/queue/index.js'; -import { User } from '@/models/entities/user.js'; -import { Blockings, FollowRequests, Users } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { createNotification } from '../../create-notification.js'; +import { publishMainStream } from '@/services/stream'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderFollow from '@/remote/activitypub/renderer/follow'; +import { deliver } from '@/queue/index'; +import { User } from '@/models/entities/user'; +import { Blockings, FollowRequests, Users } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { createNotification } from '../../create-notification'; export default async function(follower: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, requestId?: string) { if (follower.id === followee.id) return; diff --git a/src/services/following/requests/reject.ts b/src/services/following/requests/reject.ts index e180f1dc4a..41cebd9e41 100644 --- a/src/services/following/requests/reject.ts +++ b/src/services/following/requests/reject.ts @@ -1,11 +1,11 @@ -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderFollow from '@/remote/activitypub/renderer/follow.js'; -import renderReject from '@/remote/activitypub/renderer/reject.js'; -import { deliver } from '@/queue/index.js'; -import { publishMainStream, publishUserEvent } from '@/services/stream.js'; -import { User, ILocalUser } from '@/models/entities/user.js'; -import { Users, FollowRequests, Followings } from '@/models/index.js'; -import { decrementFollowing } from '../delete.js'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderFollow from '@/remote/activitypub/renderer/follow'; +import renderReject from '@/remote/activitypub/renderer/reject'; +import { deliver } from '@/queue/index'; +import { publishMainStream, publishUserEvent } from '@/services/stream'; +import { User, ILocalUser } from '@/models/entities/user'; +import { Users, FollowRequests, Followings } from '@/models/index'; +import { decrementFollowing } from '../delete'; export default async function(followee: { id: User['id']; host: User['host']; uri: User['host'] }, follower: User) { if (Users.isRemoteUser(follower) && Users.isLocalUser(followee)) { diff --git a/src/services/i/pin.ts b/src/services/i/pin.ts index da95b60707..b31beb6e1a 100644 --- a/src/services/i/pin.ts +++ b/src/services/i/pin.ts @@ -1,15 +1,15 @@ -import config from '@/config/index.js'; -import renderAdd from '@/remote/activitypub/renderer/add.js'; -import renderRemove from '@/remote/activitypub/renderer/remove.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { IdentifiableError } from '@/misc/identifiable-error.js'; -import { User } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { Notes, UserNotePinings, Users } from '@/models/index.js'; -import { UserNotePining } from '@/models/entities/user-note-pining.js'; -import { genId } from '@/misc/gen-id.js'; -import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; -import { deliverToRelays } from '../relay.js'; +import config from '@/config/index'; +import renderAdd from '@/remote/activitypub/renderer/add'; +import renderRemove from '@/remote/activitypub/renderer/remove'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { IdentifiableError } from '@/misc/identifiable-error'; +import { User } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { Notes, UserNotePinings, Users } from '@/models/index'; +import { UserNotePining } from '@/models/entities/user-note-pining'; +import { genId } from '@/misc/gen-id'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager'; +import { deliverToRelays } from '../relay'; /** * 指定した投稿をピン留めします diff --git a/src/services/i/update.ts b/src/services/i/update.ts index 1fbaf40df1..f700d9b48b 100644 --- a/src/services/i/update.ts +++ b/src/services/i/update.ts @@ -1,10 +1,10 @@ -import renderUpdate from '@/remote/activitypub/renderer/update.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { Users } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; -import { renderPerson } from '@/remote/activitypub/renderer/person.js'; -import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; -import { deliverToRelays } from '../relay.js'; +import renderUpdate from '@/remote/activitypub/renderer/update'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { Users } from '@/models/index'; +import { User } from '@/models/entities/user'; +import { renderPerson } from '@/remote/activitypub/renderer/person'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager'; +import { deliverToRelays } from '../relay'; export async function publishToFollowers(userId: User['id']) { const user = await Users.findOne(userId); diff --git a/src/services/insert-moderation-log.ts b/src/services/insert-moderation-log.ts index 1d8fe9a9d7..00397652ee 100644 --- a/src/services/insert-moderation-log.ts +++ b/src/services/insert-moderation-log.ts @@ -1,6 +1,6 @@ -import { ModerationLogs } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { User } from '@/models/entities/user.js'; +import { ModerationLogs } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { User } from '@/models/entities/user'; export async function insertModerationLog(moderator: { id: User['id'] }, type: string, info?: Record) { await ModerationLogs.insert({ diff --git a/src/services/instance-actor.ts b/src/services/instance-actor.ts index 6a592363ed..b3625226c3 100644 --- a/src/services/instance-actor.ts +++ b/src/services/instance-actor.ts @@ -1,7 +1,7 @@ -import { createSystemUser } from './create-system-user.js'; -import { ILocalUser } from '@/models/entities/user.js'; -import { Users } from '@/models/index.js'; -import { Cache } from '@/misc/cache.js'; +import { createSystemUser } from './create-system-user'; +import { ILocalUser } from '@/models/entities/user'; +import { Users } from '@/models/index'; +import { Cache } from '@/misc/cache'; const ACTOR_USERNAME = 'instance.actor' as const; diff --git a/src/services/logger.ts b/src/services/logger.ts index ac74c13af9..032e43c9ca 100644 --- a/src/services/logger.ts +++ b/src/services/logger.ts @@ -2,11 +2,11 @@ import * as cluster from 'cluster'; import * as os from 'os'; import * as chalk from 'chalk'; import * as dateformat from 'dateformat'; -import { program } from '../argv.js'; +import { program } from '../argv'; import { getRepository } from 'typeorm'; -import { Log } from '@/models/entities/log.js'; -import { genId } from '@/misc/gen-id.js'; -import config from '@/config/index.js'; +import { Log } from '@/models/entities/log'; +import { genId } from '@/misc/gen-id'; +import config from '@/config/index'; import SyslogPro from 'syslog-pro'; diff --git a/src/services/messages/create.ts b/src/services/messages/create.ts index c6430f07be..948b6726b9 100644 --- a/src/services/messages/create.ts +++ b/src/services/messages/create.ts @@ -1,17 +1,17 @@ -import { User } from '@/models/entities/user.js'; -import { UserGroup } from '@/models/entities/user-group.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { MessagingMessages, UserGroupJoinings, Mutings, Users } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { MessagingMessage } from '@/models/entities/messaging-message.js'; -import { publishMessagingStream, publishMessagingIndexStream, publishMainStream, publishGroupMessagingStream } from '@/services/stream.js'; -import pushNotification from '../push-notification.js'; +import { User } from '@/models/entities/user'; +import { UserGroup } from '@/models/entities/user-group'; +import { DriveFile } from '@/models/entities/drive-file'; +import { MessagingMessages, UserGroupJoinings, Mutings, Users } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { MessagingMessage } from '@/models/entities/messaging-message'; +import { publishMessagingStream, publishMessagingIndexStream, publishMainStream, publishGroupMessagingStream } from '@/services/stream'; +import pushNotification from '../push-notification'; import { Not } from 'typeorm'; -import { Note } from '@/models/entities/note.js'; -import renderNote from '@/remote/activitypub/renderer/note.js'; -import renderCreate from '@/remote/activitypub/renderer/create.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { deliver } from '@/queue/index.js'; +import { Note } from '@/models/entities/note'; +import renderNote from '@/remote/activitypub/renderer/note'; +import renderCreate from '@/remote/activitypub/renderer/create'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { deliver } from '@/queue/index'; export async function createMessage(user: { id: User['id']; host: User['host']; }, recipientUser: User | undefined, recipientGroup: UserGroup | undefined, text: string | undefined, file: DriveFile | null, uri?: string) { const message = { diff --git a/src/services/messages/delete.ts b/src/services/messages/delete.ts index 82eb6cb21c..5c299c9a50 100644 --- a/src/services/messages/delete.ts +++ b/src/services/messages/delete.ts @@ -1,11 +1,11 @@ -import config from '@/config/index.js'; -import { MessagingMessages, Users } from '@/models/index.js'; -import { MessagingMessage } from '@/models/entities/messaging-message.js'; -import { publishGroupMessagingStream, publishMessagingStream } from '@/services/stream.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderDelete from '@/remote/activitypub/renderer/delete.js'; -import renderTombstone from '@/remote/activitypub/renderer/tombstone.js'; -import { deliver } from '@/queue/index.js'; +import config from '@/config/index'; +import { MessagingMessages, Users } from '@/models/index'; +import { MessagingMessage } from '@/models/entities/messaging-message'; +import { publishGroupMessagingStream, publishMessagingStream } from '@/services/stream'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderDelete from '@/remote/activitypub/renderer/delete'; +import renderTombstone from '@/remote/activitypub/renderer/tombstone'; +import { deliver } from '@/queue/index'; export async function deleteMessage(message: MessagingMessage) { await MessagingMessages.delete(message.id); diff --git a/src/services/note/create.ts b/src/services/note/create.ts index d89663c784..56cdec4a51 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -1,39 +1,39 @@ import * as mfm from 'mfm-js'; -import es from '../../db/elasticsearch.js'; -import { publishMainStream, publishNotesStream } from '@/services/stream.js'; -import DeliverManager from '@/remote/activitypub/deliver-manager.js'; -import renderNote from '@/remote/activitypub/renderer/note.js'; -import renderCreate from '@/remote/activitypub/renderer/create.js'; -import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { resolveUser } from '@/remote/resolve-user.js'; -import config from '@/config/index.js'; -import { updateHashtags } from '../update-hashtag.js'; -import { concat } from '../../prelude/array.js'; -import insertNoteUnread from './unread.js'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; -import { extractMentions } from '@/misc/extract-mentions.js'; -import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; -import { extractHashtags } from '@/misc/extract-hashtags.js'; -import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; -import { Mutings, Users, NoteWatchings, Notes, Instances, UserProfiles, Antennas, Followings, MutedNotes, Channels, ChannelFollowings, Blockings } from '@/models/index.js'; -import { DriveFile } from '@/models/entities/drive-file.js'; -import { App } from '@/models/entities/app.js'; +import es from '../../db/elasticsearch'; +import { publishMainStream, publishNotesStream } from '@/services/stream'; +import DeliverManager from '@/remote/activitypub/deliver-manager'; +import renderNote from '@/remote/activitypub/renderer/note'; +import renderCreate from '@/remote/activitypub/renderer/create'; +import renderAnnounce from '@/remote/activitypub/renderer/announce'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { resolveUser } from '@/remote/resolve-user'; +import config from '@/config/index'; +import { updateHashtags } from '../update-hashtag'; +import { concat } from '../../prelude/array'; +import insertNoteUnread from './unread'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; +import { extractMentions } from '@/misc/extract-mentions'; +import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm'; +import { extractHashtags } from '@/misc/extract-hashtags'; +import { Note, IMentionedRemoteUsers } from '@/models/entities/note'; +import { Mutings, Users, NoteWatchings, Notes, Instances, UserProfiles, Antennas, Followings, MutedNotes, Channels, ChannelFollowings, Blockings } from '@/models/index'; +import { DriveFile } from '@/models/entities/drive-file'; +import { App } from '@/models/entities/app'; import { Not, getConnection, In } from 'typeorm'; -import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; -import { genId } from '@/misc/gen-id.js'; -import { notesChart, perUserNotesChart, activeUsersChart, instanceChart } from '@/services/chart/index.js'; -import { Poll, IPoll } from '@/models/entities/poll.js'; -import { createNotification } from '../create-notification.js'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; -import { checkHitAntenna } from '@/misc/check-hit-antenna.js'; -import { checkWordMute } from '@/misc/check-word-mute.js'; -import { addNoteToAntenna } from '../add-note-to-antenna.js'; -import { countSameRenotes } from '@/misc/count-same-renotes.js'; -import { deliverToRelays } from '../relay.js'; -import { Channel } from '@/models/entities/channel.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; -import { getAntennas } from '@/misc/antenna-cache.js'; +import { User, ILocalUser, IRemoteUser } from '@/models/entities/user'; +import { genId } from '@/misc/gen-id'; +import { notesChart, perUserNotesChart, activeUsersChart, instanceChart } from '@/services/chart/index'; +import { Poll, IPoll } from '@/models/entities/poll'; +import { createNotification } from '../create-notification'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; +import { checkHitAntenna } from '@/misc/check-hit-antenna'; +import { checkWordMute } from '@/misc/check-word-mute'; +import { addNoteToAntenna } from '../add-note-to-antenna'; +import { countSameRenotes } from '@/misc/count-same-renotes'; +import { deliverToRelays } from '../relay'; +import { Channel } from '@/models/entities/channel'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; +import { getAntennas } from '@/misc/antenna-cache'; type NotificationType = 'reply' | 'renote' | 'quote' | 'mention'; diff --git a/src/services/note/delete.ts b/src/services/note/delete.ts index 353cd88034..a14d84e7b2 100644 --- a/src/services/note/delete.ts +++ b/src/services/note/delete.ts @@ -1,18 +1,18 @@ -import { publishNoteStream } from '@/services/stream.js'; -import renderDelete from '@/remote/activitypub/renderer/delete.js'; -import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderTombstone from '@/remote/activitypub/renderer/tombstone.js'; -import config from '@/config/index.js'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; -import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; -import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; -import { Notes, Users, Instances } from '@/models/index.js'; -import { notesChart, perUserNotesChart, instanceChart } from '@/services/chart/index.js'; -import { deliverToFollowers, deliverToUser } from '@/remote/activitypub/deliver-manager.js'; -import { countSameRenotes } from '@/misc/count-same-renotes.js'; -import { deliverToRelays } from '../relay.js'; +import { publishNoteStream } from '@/services/stream'; +import renderDelete from '@/remote/activitypub/renderer/delete'; +import renderAnnounce from '@/remote/activitypub/renderer/announce'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderTombstone from '@/remote/activitypub/renderer/tombstone'; +import config from '@/config/index'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; +import { User, ILocalUser, IRemoteUser } from '@/models/entities/user'; +import { Note, IMentionedRemoteUsers } from '@/models/entities/note'; +import { Notes, Users, Instances } from '@/models/index'; +import { notesChart, perUserNotesChart, instanceChart } from '@/services/chart/index'; +import { deliverToFollowers, deliverToUser } from '@/remote/activitypub/deliver-manager'; +import { countSameRenotes } from '@/misc/count-same-renotes'; +import { deliverToRelays } from '../relay'; import { Brackets, In } from 'typeorm'; /** diff --git a/src/services/note/polls/update.ts b/src/services/note/polls/update.ts index 88baf16b64..a22ce8e373 100644 --- a/src/services/note/polls/update.ts +++ b/src/services/note/polls/update.ts @@ -1,10 +1,10 @@ -import renderUpdate from '@/remote/activitypub/renderer/update.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import renderNote from '@/remote/activitypub/renderer/note.js'; -import { Users, Notes } from '@/models/index.js'; -import { Note } from '@/models/entities/note.js'; -import { deliverToFollowers } from '@/remote/activitypub/deliver-manager.js'; -import { deliverToRelays } from '../../relay.js'; +import renderUpdate from '@/remote/activitypub/renderer/update'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import renderNote from '@/remote/activitypub/renderer/note'; +import { Users, Notes } from '@/models/index'; +import { Note } from '@/models/entities/note'; +import { deliverToFollowers } from '@/remote/activitypub/deliver-manager'; +import { deliverToRelays } from '../../relay'; export async function deliverQuestionUpdate(noteId: Note['id']) { const note = await Notes.findOne(noteId); diff --git a/src/services/note/polls/vote.ts b/src/services/note/polls/vote.ts index 36e06cb6a2..886a09dde9 100644 --- a/src/services/note/polls/vote.ts +++ b/src/services/note/polls/vote.ts @@ -1,10 +1,10 @@ -import { publishNoteStream } from '@/services/stream.js'; -import { User } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { PollVotes, NoteWatchings, Polls, Blockings } from '@/models/index.js'; +import { publishNoteStream } from '@/services/stream'; +import { User } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { PollVotes, NoteWatchings, Polls, Blockings } from '@/models/index'; import { Not } from 'typeorm'; -import { genId } from '@/misc/gen-id.js'; -import { createNotification } from '../../create-notification.js'; +import { genId } from '@/misc/gen-id'; +import { createNotification } from '../../create-notification'; export default async function(user: User, note: Note, choice: number) { const poll = await Polls.findOne(note.id); diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index f2dd273c42..308bd4dff7 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -1,19 +1,19 @@ -import { publishNoteStream } from '@/services/stream.js'; -import { renderLike } from '@/remote/activitypub/renderer/like.js'; -import DeliverManager from '@/remote/activitypub/deliver-manager.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { toDbReaction, decodeReaction } from '@/misc/reaction-lib.js'; -import { User, IRemoteUser } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { NoteReactions, Users, NoteWatchings, Notes, Emojis, Blockings } from '@/models/index.js'; +import { publishNoteStream } from '@/services/stream'; +import { renderLike } from '@/remote/activitypub/renderer/like'; +import DeliverManager from '@/remote/activitypub/deliver-manager'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { toDbReaction, decodeReaction } from '@/misc/reaction-lib'; +import { User, IRemoteUser } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { NoteReactions, Users, NoteWatchings, Notes, Emojis, Blockings } from '@/models/index'; import { Not } from 'typeorm'; -import { perUserReactionsChart } from '@/services/chart/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { createNotification } from '../../create-notification.js'; -import deleteReaction from './delete.js'; -import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js'; -import { NoteReaction } from '@/models/entities/note-reaction.js'; -import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { perUserReactionsChart } from '@/services/chart/index'; +import { genId } from '@/misc/gen-id'; +import { createNotification } from '../../create-notification'; +import deleteReaction from './delete'; +import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; +import { NoteReaction } from '@/models/entities/note-reaction'; +import { IdentifiableError } from '@/misc/identifiable-error'; export default async (user: { id: User['id']; host: User['host']; }, note: Note, reaction?: string) => { // Check blocking diff --git a/src/services/note/reaction/delete.ts b/src/services/note/reaction/delete.ts index 86e7b640ee..062dbad6f1 100644 --- a/src/services/note/reaction/delete.ts +++ b/src/services/note/reaction/delete.ts @@ -1,13 +1,13 @@ -import { publishNoteStream } from '@/services/stream.js'; -import { renderLike } from '@/remote/activitypub/renderer/like.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import DeliverManager from '@/remote/activitypub/deliver-manager.js'; -import { IdentifiableError } from '@/misc/identifiable-error.js'; -import { User, IRemoteUser } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { NoteReactions, Users, Notes } from '@/models/index.js'; -import { decodeReaction } from '@/misc/reaction-lib.js'; +import { publishNoteStream } from '@/services/stream'; +import { renderLike } from '@/remote/activitypub/renderer/like'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import DeliverManager from '@/remote/activitypub/deliver-manager'; +import { IdentifiableError } from '@/misc/identifiable-error'; +import { User, IRemoteUser } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { NoteReactions, Users, Notes } from '@/models/index'; +import { decodeReaction } from '@/misc/reaction-lib'; export default async (user: { id: User['id']; host: User['host']; }, note: Note) => { // if already unreacted diff --git a/src/services/note/read.ts b/src/services/note/read.ts index ac450af78b..2e221d553a 100644 --- a/src/services/note/read.ts +++ b/src/services/note/read.ts @@ -1,13 +1,13 @@ -import { publishMainStream } from '@/services/stream.js'; -import { Note } from '@/models/entities/note.js'; -import { User } from '@/models/entities/user.js'; -import { NoteUnreads, AntennaNotes, Users, Followings, ChannelFollowings } from '@/models/index.js'; +import { publishMainStream } from '@/services/stream'; +import { Note } from '@/models/entities/note'; +import { User } from '@/models/entities/user'; +import { NoteUnreads, AntennaNotes, Users, Followings, ChannelFollowings } from '@/models/index'; import { Not, IsNull, In } from 'typeorm'; -import { Channel } from '@/models/entities/channel.js'; -import { checkHitAntenna } from '@/misc/check-hit-antenna.js'; -import { getAntennas } from '@/misc/antenna-cache.js'; -import { PackedNote } from '@/models/repositories/note.js'; -import { readNotificationByQuery } from '@/server/api/common/read-notification.js'; +import { Channel } from '@/models/entities/channel'; +import { checkHitAntenna } from '@/misc/check-hit-antenna'; +import { getAntennas } from '@/misc/antenna-cache'; +import { PackedNote } from '@/models/repositories/note'; +import { readNotificationByQuery } from '@/server/api/common/read-notification'; /** * Mark notes as read diff --git a/src/services/note/unread.ts b/src/services/note/unread.ts index b68ff7974f..4a9df6083c 100644 --- a/src/services/note/unread.ts +++ b/src/services/note/unread.ts @@ -1,8 +1,8 @@ -import { Note } from '@/models/entities/note.js'; -import { publishMainStream } from '@/services/stream.js'; -import { User } from '@/models/entities/user.js'; -import { Mutings, NoteUnreads } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { Note } from '@/models/entities/note'; +import { publishMainStream } from '@/services/stream'; +import { User } from '@/models/entities/user'; +import { Mutings, NoteUnreads } from '@/models/index'; +import { genId } from '@/misc/gen-id'; export default async function(userId: User['id'], note: Note, params: { // NOTE: isSpecifiedがtrueならisMentionedは必ずfalse diff --git a/src/services/note/unwatch.ts b/src/services/note/unwatch.ts index 32da2cf148..8ea02fe33c 100644 --- a/src/services/note/unwatch.ts +++ b/src/services/note/unwatch.ts @@ -1,6 +1,6 @@ -import { User } from '@/models/entities/user.js'; -import { NoteWatchings } from '@/models/index.js'; -import { Note } from '@/models/entities/note.js'; +import { User } from '@/models/entities/user'; +import { NoteWatchings } from '@/models/index'; +import { Note } from '@/models/entities/note'; export default async (me: User['id'], note: Note) => { await NoteWatchings.delete({ diff --git a/src/services/note/watch.ts b/src/services/note/watch.ts index 12d97c8458..e457191d99 100644 --- a/src/services/note/watch.ts +++ b/src/services/note/watch.ts @@ -1,8 +1,8 @@ -import { User } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { NoteWatchings } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { NoteWatching } from '@/models/entities/note-watching.js'; +import { User } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { NoteWatchings } from '@/models/index'; +import { genId } from '@/misc/gen-id'; +import { NoteWatching } from '@/models/entities/note-watching'; export default async (me: User['id'], note: Note) => { // 自分の投稿はwatchできない diff --git a/src/services/push-notification.ts b/src/services/push-notification.ts index bedfa0533d..5bd7499692 100644 --- a/src/services/push-notification.ts +++ b/src/services/push-notification.ts @@ -1,9 +1,9 @@ import * as push from 'web-push'; -import config from '@/config/index.js'; -import { SwSubscriptions } from '@/models/index.js'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import { PackedNotification } from '../models/repositories/notification.js'; -import { PackedMessagingMessage } from '../models/repositories/messaging-message.js'; +import config from '@/config/index'; +import { SwSubscriptions } from '@/models/index'; +import { fetchMeta } from '@/misc/fetch-meta'; +import { PackedNotification } from '../models/repositories/notification'; +import { PackedMessagingMessage } from '../models/repositories/messaging-message'; type notificationType = 'notification' | 'unreadMessagingMessage'; type notificationBody = PackedNotification | PackedMessagingMessage; diff --git a/src/services/register-or-fetch-instance-doc.ts b/src/services/register-or-fetch-instance-doc.ts index 0bbc9ab275..a548ab0497 100644 --- a/src/services/register-or-fetch-instance-doc.ts +++ b/src/services/register-or-fetch-instance-doc.ts @@ -1,9 +1,9 @@ -import { Instance } from '@/models/entities/instance.js'; -import { Instances } from '@/models/index.js'; -import { federationChart } from '@/services/chart/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { toPuny } from '@/misc/convert-host.js'; -import { Cache } from '@/misc/cache.js'; +import { Instance } from '@/models/entities/instance'; +import { Instances } from '@/models/index'; +import { federationChart } from '@/services/chart/index'; +import { genId } from '@/misc/gen-id'; +import { toPuny } from '@/misc/convert-host'; +import { Cache } from '@/misc/cache'; const cache = new Cache(1000 * 60 * 60); diff --git a/src/services/relay.ts b/src/services/relay.ts index 8e0fa12fb3..04775524fa 100644 --- a/src/services/relay.ts +++ b/src/services/relay.ts @@ -1,11 +1,11 @@ -import { createSystemUser } from './create-system-user.js'; -import { renderFollowRelay } from '@/remote/activitypub/renderer/follow-relay.js'; -import { renderActivity, attachLdSignature } from '@/remote/activitypub/renderer/index.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import { deliver } from '@/queue/index.js'; -import { ILocalUser, User } from '@/models/entities/user.js'; -import { Users, Relays } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { createSystemUser } from './create-system-user'; +import { renderFollowRelay } from '@/remote/activitypub/renderer/follow-relay'; +import { renderActivity, attachLdSignature } from '@/remote/activitypub/renderer/index'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import { deliver } from '@/queue/index'; +import { ILocalUser, User } from '@/models/entities/user'; +import { Users, Relays } from '@/models/index'; +import { genId } from '@/misc/gen-id'; const ACTOR_USERNAME = 'relay.actor' as const; diff --git a/src/services/send-email-notification.ts b/src/services/send-email-notification.ts index 18f5b76074..519d56a06b 100644 --- a/src/services/send-email-notification.ts +++ b/src/services/send-email-notification.ts @@ -1,9 +1,9 @@ -import { UserProfiles } from '@/models/index.js'; -import { User } from '@/models/entities/user.js'; -import { sendEmail } from './send-email.js'; -import * as locales from '../../locales/index.js'; -import { I18n } from '@/misc/i18n.js'; -import { getAcct } from '@/misc/acct.js'; +import { UserProfiles } from '@/models/index'; +import { User } from '@/models/entities/user'; +import { sendEmail } from './send-email'; +import * as locales from '../../locales/index'; +import { I18n } from '@/misc/i18n'; +import { getAcct } from '@/misc/acct'; // TODO: locale ファイルをクライアント用とサーバー用で分けたい diff --git a/src/services/send-email.ts b/src/services/send-email.ts index 135fb3d329..d24168ec46 100644 --- a/src/services/send-email.ts +++ b/src/services/send-email.ts @@ -1,7 +1,7 @@ import * as nodemailer from 'nodemailer'; -import { fetchMeta } from '@/misc/fetch-meta.js'; -import Logger from './logger.js'; -import config from '@/config/index.js'; +import { fetchMeta } from '@/misc/fetch-meta'; +import Logger from './logger'; +import config from '@/config/index'; export const logger = new Logger('email'); diff --git a/src/services/stream.ts b/src/services/stream.ts index e334944533..4db1a77395 100644 --- a/src/services/stream.ts +++ b/src/services/stream.ts @@ -1,12 +1,12 @@ -import { redisClient } from '../db/redis.js'; -import { User } from '@/models/entities/user.js'; -import { Note } from '@/models/entities/note.js'; -import { UserList } from '@/models/entities/user-list.js'; -import { ReversiGame } from '@/models/entities/games/reversi/game.js'; -import { UserGroup } from '@/models/entities/user-group.js'; -import config from '@/config/index.js'; -import { Antenna } from '@/models/entities/antenna.js'; -import { Channel } from '@/models/entities/channel.js'; +import { redisClient } from '../db/redis'; +import { User } from '@/models/entities/user'; +import { Note } from '@/models/entities/note'; +import { UserList } from '@/models/entities/user-list'; +import { ReversiGame } from '@/models/entities/games/reversi/game'; +import { UserGroup } from '@/models/entities/user-group'; +import config from '@/config/index'; +import { Antenna } from '@/models/entities/antenna'; +import { Channel } from '@/models/entities/channel'; class Publisher { private publish = (channel: string, type: string | null, value?: any): void => { diff --git a/src/services/suspend-user.ts b/src/services/suspend-user.ts index 5ec639b1b8..55be63172f 100644 --- a/src/services/suspend-user.ts +++ b/src/services/suspend-user.ts @@ -1,9 +1,9 @@ -import renderDelete from '@/remote/activitypub/renderer/delete.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { deliver } from '@/queue/index.js'; -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; -import { Users, Followings } from '@/models/index.js'; +import renderDelete from '@/remote/activitypub/renderer/delete'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { deliver } from '@/queue/index'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; +import { Users, Followings } from '@/models/index'; import { Not, IsNull } from 'typeorm'; export async function doPostSuspend(user: { id: User['id']; host: User['host'] }) { diff --git a/src/services/unsuspend-user.ts b/src/services/unsuspend-user.ts index 3728e05392..bfffa036e5 100644 --- a/src/services/unsuspend-user.ts +++ b/src/services/unsuspend-user.ts @@ -1,10 +1,10 @@ -import renderDelete from '@/remote/activitypub/renderer/delete.js'; -import renderUndo from '@/remote/activitypub/renderer/undo.js'; -import { renderActivity } from '@/remote/activitypub/renderer/index.js'; -import { deliver } from '@/queue/index.js'; -import config from '@/config/index.js'; -import { User } from '@/models/entities/user.js'; -import { Users, Followings } from '@/models/index.js'; +import renderDelete from '@/remote/activitypub/renderer/delete'; +import renderUndo from '@/remote/activitypub/renderer/undo'; +import { renderActivity } from '@/remote/activitypub/renderer/index'; +import { deliver } from '@/queue/index'; +import config from '@/config/index'; +import { User } from '@/models/entities/user'; +import { Users, Followings } from '@/models/index'; import { Not, IsNull } from 'typeorm'; export async function doPostUnsuspend(user: User) { diff --git a/src/services/update-hashtag.ts b/src/services/update-hashtag.ts index b6fb38bc5a..e8504f6ff0 100644 --- a/src/services/update-hashtag.ts +++ b/src/services/update-hashtag.ts @@ -1,9 +1,9 @@ -import { User } from '@/models/entities/user.js'; -import { Hashtags, Users } from '@/models/index.js'; -import { hashtagChart } from '@/services/chart/index.js'; -import { genId } from '@/misc/gen-id.js'; -import { Hashtag } from '@/models/entities/hashtag.js'; -import { normalizeForSearch } from '@/misc/normalize-for-search.js'; +import { User } from '@/models/entities/user'; +import { Hashtags, Users } from '@/models/index'; +import { hashtagChart } from '@/services/chart/index'; +import { genId } from '@/misc/gen-id'; +import { Hashtag } from '@/models/entities/hashtag'; +import { normalizeForSearch } from '@/misc/normalize-for-search'; export async function updateHashtags(user: { id: User['id']; host: User['host']; }, tags: string[]) { for (const tag of tags) { diff --git a/src/services/user-list/push.ts b/src/services/user-list/push.ts index 01e9243c12..29d561b519 100644 --- a/src/services/user-list/push.ts +++ b/src/services/user-list/push.ts @@ -1,11 +1,11 @@ -import { publishUserListStream } from '@/services/stream.js'; -import { User } from '@/models/entities/user.js'; -import { UserList } from '@/models/entities/user-list.js'; -import { UserListJoinings, Users } from '@/models/index.js'; -import { UserListJoining } from '@/models/entities/user-list-joining.js'; -import { genId } from '@/misc/gen-id.js'; -import { fetchProxyAccount } from '@/misc/fetch-proxy-account.js'; -import createFollowing from '../following/create.js'; +import { publishUserListStream } from '@/services/stream'; +import { User } from '@/models/entities/user'; +import { UserList } from '@/models/entities/user-list'; +import { UserListJoinings, Users } from '@/models/index'; +import { UserListJoining } from '@/models/entities/user-list-joining'; +import { genId } from '@/misc/gen-id'; +import { fetchProxyAccount } from '@/misc/fetch-proxy-account'; +import createFollowing from '../following/create'; export async function pushUserToUserList(target: User, list: UserList) { await UserListJoinings.insert({ diff --git a/src/tools/accept-migration.ts b/src/tools/accept-migration.ts index adbfcdadf7..2e54fc129f 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/index.js'; +import config from '@/config/index'; createConnection({ type: 'postgres', diff --git a/src/tools/add-emoji.ts b/src/tools/add-emoji.ts index 054286c647..9ffe7dfa81 100644 --- a/src/tools/add-emoji.ts +++ b/src/tools/add-emoji.ts @@ -1,5 +1,5 @@ -import { Emojis } from '@/models/index.js'; -import { genId } from '@/misc/gen-id.js'; +import { Emojis } from '@/models/index'; +import { genId } from '@/misc/gen-id'; async function main(name: string, url: string, alias?: string): Promise { const aliases = alias != null ? [ alias ] : []; diff --git a/src/tools/demote-admin.ts b/src/tools/demote-admin.ts index 37bd5007a8..d7c6d1cec2 100644 --- a/src/tools/demote-admin.ts +++ b/src/tools/demote-admin.ts @@ -1,6 +1,6 @@ -import { initDb } from '../db/postgre.js'; +import { initDb } from '../db/postgre'; import { getRepository } from 'typeorm'; -import { User } from '@/models/entities/user.js'; +import { User } from '@/models/entities/user'; 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 4c583926eb..62ed0f09ee 100644 --- a/src/tools/mark-admin.ts +++ b/src/tools/mark-admin.ts @@ -1,6 +1,6 @@ -import { initDb } from '../db/postgre.js'; +import { initDb } from '../db/postgre'; import { getRepository } from 'typeorm'; -import { User } from '@/models/entities/user.js'; +import { User } from '@/models/entities/user'; 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 3e850ba83c..98a3c2865f 100644 --- a/src/tools/refresh-question.ts +++ b/src/tools/refresh-question.ts @@ -1,4 +1,4 @@ -import { updateQuestion } from '@/remote/activitypub/models/question.js'; +import { updateQuestion } from '@/remote/activitypub/models/question'; async function main(uri: string): Promise { return await updateQuestion(uri); diff --git a/src/tools/resync-remote-user.ts b/src/tools/resync-remote-user.ts index 3c02fb94c7..bc43e250cb 100644 --- a/src/tools/resync-remote-user.ts +++ b/src/tools/resync-remote-user.ts @@ -1,5 +1,5 @@ -import { initDb } from '@/db/postgre.js'; -import { parseAcct } from '@/misc/acct.js'; +import { initDb } from '@/db/postgre'; +import { parseAcct } from '@/misc/acct'; async function main(acct: string): Promise { await initDb(); diff --git a/src/tools/show-signin-history.ts b/src/tools/show-signin-history.ts index 6fdff3902e..ad92316314 100644 --- a/src/tools/show-signin-history.ts +++ b/src/tools/show-signin-history.ts @@ -1,4 +1,4 @@ -import { Users, Signins } from '@/models/index.js'; +import { Users, Signins } from '@/models/index'; // node built/tools/show-signin-history username // => {Success} {Date} {IPAddrsss} From 6d881d4570da11927616cb2ce5deda8c8a45baa5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 21:57:36 +0900 Subject: [PATCH 10/32] fix import --- src/server/web/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/web/index.ts b/src/server/web/index.ts index eae00588c6..8f9b6add6e 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -24,7 +24,7 @@ import { parseAcct } from '@/misc/acct'; import { getNoteSummary } from '@/misc/get-note-summary'; import { getConnection } from 'typeorm'; import { redisClient } from '../../db/redis'; -import locales from '../../../locales/index'; +import * as locales from '../../../locales/index'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; From 97f2675d404eb073a447ea9b3c7678b5e560a095 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 22:04:15 +0900 Subject: [PATCH 11/32] refactor: use path alias to improve readability --- src/boot/master.ts | 2 +- src/games/reversi/core.ts | 2 +- src/mfm/to-html.ts | 2 +- src/models/repositories/abuse-user-report.ts | 4 ++-- src/models/repositories/antenna.ts | 2 +- src/models/repositories/app.ts | 2 +- src/models/repositories/auth-session.ts | 6 +++--- src/models/repositories/blocking.ts | 6 +++--- src/models/repositories/channel.ts | 4 ++-- src/models/repositories/clip.ts | 4 ++-- src/models/repositories/drive-file.ts | 10 +++++----- src/models/repositories/drive-folder.ts | 4 ++-- src/models/repositories/emoji.ts | 2 +- src/models/repositories/follow-request.ts | 4 ++-- src/models/repositories/following.ts | 6 +++--- src/models/repositories/gallery-like.ts | 2 +- src/models/repositories/gallery-post.ts | 6 +++--- src/models/repositories/games/reversi/game.ts | 2 +- src/models/repositories/games/reversi/matching.ts | 4 ++-- src/models/repositories/hashtag.ts | 2 +- src/models/repositories/messaging-message.ts | 4 ++-- src/models/repositories/moderation-logs.ts | 4 ++-- src/models/repositories/muting.ts | 6 +++--- src/models/repositories/note-favorite.ts | 4 ++-- src/models/repositories/note-reaction.ts | 4 ++-- src/models/repositories/note.ts | 8 ++++---- src/models/repositories/notification.ts | 10 +++++----- src/models/repositories/page-like.ts | 4 ++-- src/models/repositories/page.ts | 8 ++++---- src/models/repositories/relay.ts | 2 +- src/models/repositories/signin.ts | 2 +- src/models/repositories/user-group-invitation.ts | 2 +- src/models/repositories/user-group.ts | 2 +- src/models/repositories/user-list.ts | 2 +- src/models/repositories/user.ts | 4 ++-- src/remote/activitypub/audience.ts | 2 +- src/remote/activitypub/kernel/create/index.ts | 2 +- src/remote/activitypub/kernel/delete/index.ts | 2 +- src/remote/activitypub/kernel/index.ts | 2 +- src/remote/activitypub/models/mention.ts | 2 +- src/remote/activitypub/models/note.ts | 2 +- src/remote/activitypub/models/person.ts | 2 +- src/remote/activitypub/models/tag.ts | 2 +- src/remote/webfinger.ts | 2 +- src/server/activitypub/followers.ts | 2 +- src/server/activitypub/following.ts | 2 +- src/server/activitypub/outbox.ts | 4 ++-- src/server/api/common/read-messaging-message.ts | 2 +- src/server/api/endpoints/app/create.ts | 2 +- .../endpoints/users/get-frequently-replied-users.ts | 2 +- src/server/index.ts | 2 +- src/server/web/url-preview.ts | 2 +- src/server/well-known.ts | 2 +- src/services/chart/core.ts | 2 +- src/services/note/create.ts | 2 +- 55 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/boot/master.ts b/src/boot/master.ts index 4cd91dc66a..03a28c339b 100644 --- a/src/boot/master.ts +++ b/src/boot/master.ts @@ -7,7 +7,7 @@ import { getConnection } from 'typeorm'; import Logger from '@/services/logger'; import loadConfig from '@/config/load'; import { Config } from '@/config/types'; -import { lessThan } from '../prelude/array'; +import { lessThan } from '@/prelude/array'; import { program } from '../argv'; import { showMachineInfo } from '@/misc/show-machine-info'; import { initDb } from '../db/postgre'; diff --git a/src/games/reversi/core.ts b/src/games/reversi/core.ts index e7ae1af7a2..9bfce9834a 100644 --- a/src/games/reversi/core.ts +++ b/src/games/reversi/core.ts @@ -1,4 +1,4 @@ -import { count, concat } from '../../prelude/array'; +import { count, concat } from '@/prelude/array'; // MISSKEY REVERSI ENGINE diff --git a/src/mfm/to-html.ts b/src/mfm/to-html.ts index 6dbcc17d29..b3678a0dda 100644 --- a/src/mfm/to-html.ts +++ b/src/mfm/to-html.ts @@ -1,7 +1,7 @@ import { JSDOM } from 'jsdom'; import * as mfm from 'mfm-js'; import config from '@/config/index'; -import { intersperse } from '../prelude/array'; +import { intersperse } from '@/prelude/array'; import { IMentionedRemoteUsers } from '@/models/entities/note'; import { wellKnownServices } from '../well-known-services'; diff --git a/src/models/repositories/abuse-user-report.ts b/src/models/repositories/abuse-user-report.ts index a8c6344966..039a9924d2 100644 --- a/src/models/repositories/abuse-user-report.ts +++ b/src/models/repositories/abuse-user-report.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; import { Users } from '../index'; -import { AbuseUserReport } from '../entities/abuse-user-report'; -import { awaitAll } from '../../prelude/await-all'; +import { AbuseUserReport } from '@/models/entities/abuse-user-report'; +import { awaitAll } from '@/prelude/await-all'; @EntityRepository(AbuseUserReport) export class AbuseUserReportRepository extends Repository { diff --git a/src/models/repositories/antenna.ts b/src/models/repositories/antenna.ts index afda5ccaaa..e61eed5e08 100644 --- a/src/models/repositories/antenna.ts +++ b/src/models/repositories/antenna.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Antenna } from '../entities/antenna'; +import { Antenna } from '@/models/entities/antenna'; import { SchemaType } from '@/misc/schema'; import { AntennaNotes, UserGroupJoinings } from '../index'; diff --git a/src/models/repositories/app.ts b/src/models/repositories/app.ts index 698191de7e..2287bd4390 100644 --- a/src/models/repositories/app.ts +++ b/src/models/repositories/app.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { App } from '../entities/app'; +import { App } from '@/models/entities/app'; import { AccessTokens } from '../index'; import { SchemaType } from '@/misc/schema'; diff --git a/src/models/repositories/auth-session.ts b/src/models/repositories/auth-session.ts index aa1cddebcf..c8f4c10f2a 100644 --- a/src/models/repositories/auth-session.ts +++ b/src/models/repositories/auth-session.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; import { Apps } from '../index'; -import { AuthSession } from '../entities/auth-session'; -import { awaitAll } from '../../prelude/await-all'; -import { User } from '../entities/user'; +import { AuthSession } from '@/models/entities/auth-session'; +import { awaitAll } from '@/prelude/await-all'; +import { User } from '@/models/entities/user'; @EntityRepository(AuthSession) export class AuthSessionRepository extends Repository { diff --git a/src/models/repositories/blocking.ts b/src/models/repositories/blocking.ts index 3349a54ae9..dd3a10905c 100644 --- a/src/models/repositories/blocking.ts +++ b/src/models/repositories/blocking.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; import { Users } from '../index'; -import { Blocking } from '../entities/blocking'; -import { awaitAll } from '../../prelude/await-all'; +import { Blocking } from '@/models/entities/blocking'; +import { awaitAll } from '@/prelude/await-all'; import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; export type PackedBlocking = SchemaType; diff --git a/src/models/repositories/channel.ts b/src/models/repositories/channel.ts index 1b1a30e7a2..4bb829f570 100644 --- a/src/models/repositories/channel.ts +++ b/src/models/repositories/channel.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Channel } from '../entities/channel'; +import { Channel } from '@/models/entities/channel'; import { SchemaType } from '@/misc/schema'; import { DriveFiles, ChannelFollowings, NoteUnreads } from '../index'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; export type PackedChannel = SchemaType; diff --git a/src/models/repositories/clip.ts b/src/models/repositories/clip.ts index 608101d34b..49dc3a332e 100644 --- a/src/models/repositories/clip.ts +++ b/src/models/repositories/clip.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Clip } from '../entities/clip'; +import { Clip } from '@/models/entities/clip'; import { SchemaType } from '@/misc/schema'; import { Users } from '../index'; -import { awaitAll } from '../../prelude/await-all'; +import { awaitAll } from '@/prelude/await-all'; export type PackedClip = SchemaType; diff --git a/src/models/repositories/drive-file.ts b/src/models/repositories/drive-file.ts index eecb477ac0..42a60ff03c 100644 --- a/src/models/repositories/drive-file.ts +++ b/src/models/repositories/drive-file.ts @@ -1,13 +1,13 @@ import { EntityRepository, Repository } from 'typeorm'; -import { DriveFile } from '../entities/drive-file'; +import { DriveFile } from '@/models/entities/drive-file'; import { Users, DriveFolders } from '../index'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; import { toPuny } from '@/misc/convert-host'; -import { awaitAll } from '../../prelude/await-all'; +import { awaitAll } from '@/prelude/await-all'; import { SchemaType } from '@/misc/schema'; import config from '@/config/index'; -import { query, appendQuery } from '../../prelude/url'; -import { Meta } from '../entities/meta'; +import { query, appendQuery } from '@/prelude/url'; +import { Meta } from '@/models/entities/meta'; import { fetchMeta } from '@/misc/fetch-meta'; export type PackedDriveFile = SchemaType; diff --git a/src/models/repositories/drive-folder.ts b/src/models/repositories/drive-folder.ts index de286ba218..4228284f82 100644 --- a/src/models/repositories/drive-folder.ts +++ b/src/models/repositories/drive-folder.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; import { DriveFolders, DriveFiles } from '../index'; -import { DriveFolder } from '../entities/drive-folder'; -import { awaitAll } from '../../prelude/await-all'; +import { DriveFolder } from '@/models/entities/drive-folder'; +import { awaitAll } from '@/prelude/await-all'; import { SchemaType } from '@/misc/schema'; export type PackedDriveFolder = SchemaType; diff --git a/src/models/repositories/emoji.ts b/src/models/repositories/emoji.ts index 3490a6ac86..c3d7184ec9 100644 --- a/src/models/repositories/emoji.ts +++ b/src/models/repositories/emoji.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Emoji } from '../entities/emoji'; +import { Emoji } from '@/models/entities/emoji'; @EntityRepository(Emoji) export class EmojiRepository extends Repository { diff --git a/src/models/repositories/follow-request.ts b/src/models/repositories/follow-request.ts index 253e03ca7b..d6ee58e235 100644 --- a/src/models/repositories/follow-request.ts +++ b/src/models/repositories/follow-request.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { FollowRequest } from '../entities/follow-request'; +import { FollowRequest } from '@/models/entities/follow-request'; import { Users } from '../index'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; @EntityRepository(FollowRequest) export class FollowRequestRepository extends Repository { diff --git a/src/models/repositories/following.ts b/src/models/repositories/following.ts index dbbb0e6c75..3bb120bc4b 100644 --- a/src/models/repositories/following.ts +++ b/src/models/repositories/following.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; import { Users } from '../index'; -import { Following } from '../entities/following'; -import { awaitAll } from '../../prelude/await-all'; +import { Following } from '@/models/entities/following'; +import { awaitAll } from '@/prelude/await-all'; import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; type LocalFollowerFollowing = Following & { followerHost: null; diff --git a/src/models/repositories/gallery-like.ts b/src/models/repositories/gallery-like.ts index d0de01d8fd..79123e5eec 100644 --- a/src/models/repositories/gallery-like.ts +++ b/src/models/repositories/gallery-like.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { GalleryLike } from '../entities/gallery-like'; +import { GalleryLike } from '@/models/entities/gallery-like'; import { GalleryPosts } from '../index'; @EntityRepository(GalleryLike) diff --git a/src/models/repositories/gallery-post.ts b/src/models/repositories/gallery-post.ts index fe44d7c93e..03edb35213 100644 --- a/src/models/repositories/gallery-post.ts +++ b/src/models/repositories/gallery-post.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { GalleryPost } from '../entities/gallery-post'; +import { GalleryPost } from '@/models/entities/gallery-post'; import { SchemaType } from '../../misc/schema'; import { Users, DriveFiles, GalleryLikes } from '../index'; -import { awaitAll } from '../../prelude/await-all'; -import { User } from '../entities/user'; +import { awaitAll } from '@/prelude/await-all'; +import { User } from '@/models/entities/user'; export type PackedGalleryPost = SchemaType; diff --git a/src/models/repositories/games/reversi/game.ts b/src/models/repositories/games/reversi/game.ts index 021eba1da3..dc91ad51b8 100644 --- a/src/models/repositories/games/reversi/game.ts +++ b/src/models/repositories/games/reversi/game.ts @@ -1,7 +1,7 @@ import { User } from '@/models/entities/user'; import { EntityRepository, Repository } from 'typeorm'; import { Users } from '../../../index'; -import { ReversiGame } from '../../../entities/games/reversi/game'; +import { ReversiGame } from '@/models/entities/games/reversi/game'; @EntityRepository(ReversiGame) export class ReversiGameRepository extends Repository { diff --git a/src/models/repositories/games/reversi/matching.ts b/src/models/repositories/games/reversi/matching.ts index f8ee646cb7..148221dee5 100644 --- a/src/models/repositories/games/reversi/matching.ts +++ b/src/models/repositories/games/reversi/matching.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { ReversiMatching } from '../../../entities/games/reversi/matching'; +import { ReversiMatching } from '@/models/entities/games/reversi/matching'; import { Users } from '../../../index'; -import { awaitAll } from '../../../../prelude/await-all'; +import { awaitAll } from '@/prelude/await-all'; import { User } from '@/models/entities/user'; @EntityRepository(ReversiMatching) diff --git a/src/models/repositories/hashtag.ts b/src/models/repositories/hashtag.ts index 3fee2f771d..ee42ad16b6 100644 --- a/src/models/repositories/hashtag.ts +++ b/src/models/repositories/hashtag.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Hashtag } from '../entities/hashtag'; +import { Hashtag } from '@/models/entities/hashtag'; import { SchemaType } from '@/misc/schema'; export type PackedHashtag = SchemaType; diff --git a/src/models/repositories/messaging-message.ts b/src/models/repositories/messaging-message.ts index 47f6d4227a..1a4a8eecc4 100644 --- a/src/models/repositories/messaging-message.ts +++ b/src/models/repositories/messaging-message.ts @@ -1,8 +1,8 @@ import { EntityRepository, Repository } from 'typeorm'; -import { MessagingMessage } from '../entities/messaging-message'; +import { MessagingMessage } from '@/models/entities/messaging-message'; import { Users, DriveFiles, UserGroups } from '../index'; import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; export type PackedMessagingMessage = SchemaType; diff --git a/src/models/repositories/moderation-logs.ts b/src/models/repositories/moderation-logs.ts index 4e9ef1b31b..c7df3afdc9 100644 --- a/src/models/repositories/moderation-logs.ts +++ b/src/models/repositories/moderation-logs.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; import { Users } from '../index'; -import { ModerationLog } from '../entities/moderation-log'; -import { awaitAll } from '../../prelude/await-all'; +import { ModerationLog } from '@/models/entities/moderation-log'; +import { awaitAll } from '@/prelude/await-all'; @EntityRepository(ModerationLog) export class ModerationLogRepository extends Repository { diff --git a/src/models/repositories/muting.ts b/src/models/repositories/muting.ts index 806a7accd2..e46f4ae448 100644 --- a/src/models/repositories/muting.ts +++ b/src/models/repositories/muting.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; import { Users } from '../index'; -import { Muting } from '../entities/muting'; -import { awaitAll } from '../../prelude/await-all'; +import { Muting } from '@/models/entities/muting'; +import { awaitAll } from '@/prelude/await-all'; import { SchemaType } from '@/misc/schema'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; export type PackedMuting = SchemaType; diff --git a/src/models/repositories/note-favorite.ts b/src/models/repositories/note-favorite.ts index 624e125ddf..3248c32ded 100644 --- a/src/models/repositories/note-favorite.ts +++ b/src/models/repositories/note-favorite.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { NoteFavorite } from '../entities/note-favorite'; +import { NoteFavorite } from '@/models/entities/note-favorite'; import { Notes } from '../index'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; @EntityRepository(NoteFavorite) export class NoteFavoriteRepository extends Repository { diff --git a/src/models/repositories/note-reaction.ts b/src/models/repositories/note-reaction.ts index 6671b0cd75..c349edf182 100644 --- a/src/models/repositories/note-reaction.ts +++ b/src/models/repositories/note-reaction.ts @@ -1,9 +1,9 @@ import { EntityRepository, Repository } from 'typeorm'; -import { NoteReaction } from '../entities/note-reaction'; +import { NoteReaction } from '@/models/entities/note-reaction'; import { Users } from '../index'; import { SchemaType } from '@/misc/schema'; import { convertLegacyReaction } from '@/misc/reaction-lib'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; export type PackedNoteReaction = SchemaType; diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index f178c091f1..a8e356abf2 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -1,13 +1,13 @@ import { EntityRepository, Repository, In } from 'typeorm'; import * as mfm from 'mfm-js'; -import { Note } from '../entities/note'; -import { User } from '../entities/user'; +import { Note } from '@/models/entities/note'; +import { User } from '@/models/entities/user'; import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index'; import { SchemaType } from '@/misc/schema'; import { nyaize } from '@/misc/nyaize'; -import { awaitAll } from '../../prelude/await-all'; +import { awaitAll } from '@/prelude/await-all'; import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '@/misc/reaction-lib'; -import { NoteReaction } from '../entities/note-reaction'; +import { NoteReaction } from '@/models/entities/note-reaction'; import { aggregateNoteEmojis, populateEmojis, prefetchEmojis } from '@/misc/populate-emojis'; export type PackedNote = SchemaType; diff --git a/src/models/repositories/notification.ts b/src/models/repositories/notification.ts index 2b2ae22602..55af96b6d7 100644 --- a/src/models/repositories/notification.ts +++ b/src/models/repositories/notification.ts @@ -1,11 +1,11 @@ import { EntityRepository, In, Repository } from 'typeorm'; import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '../index'; -import { Notification } from '../entities/notification'; -import { awaitAll } from '../../prelude/await-all'; +import { Notification } from '@/models/entities/notification'; +import { awaitAll } from '@/prelude/await-all'; import { SchemaType } from '@/misc/schema'; -import { Note } from '../entities/note'; -import { NoteReaction } from '../entities/note-reaction'; -import { User } from '../entities/user'; +import { Note } from '@/models/entities/note'; +import { NoteReaction } from '@/models/entities/note-reaction'; +import { User } from '@/models/entities/user'; import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis'; export type PackedNotification = SchemaType; diff --git a/src/models/repositories/page-like.ts b/src/models/repositories/page-like.ts index 2f9977de93..28f34254d9 100644 --- a/src/models/repositories/page-like.ts +++ b/src/models/repositories/page-like.ts @@ -1,7 +1,7 @@ import { EntityRepository, Repository } from 'typeorm'; -import { PageLike } from '../entities/page-like'; +import { PageLike } from '@/models/entities/page-like'; import { Pages } from '../index'; -import { User } from '../entities/user'; +import { User } from '@/models/entities/user'; @EntityRepository(PageLike) export class PageLikeRepository extends Repository { diff --git a/src/models/repositories/page.ts b/src/models/repositories/page.ts index cac1a9545f..757aaa5a3f 100644 --- a/src/models/repositories/page.ts +++ b/src/models/repositories/page.ts @@ -1,10 +1,10 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Page } from '../entities/page'; +import { Page } from '@/models/entities/page'; import { SchemaType } from '@/misc/schema'; import { Users, DriveFiles, PageLikes } from '../index'; -import { awaitAll } from '../../prelude/await-all'; -import { DriveFile } from '../entities/drive-file'; -import { User } from '../entities/user'; +import { awaitAll } from '@/prelude/await-all'; +import { DriveFile } from '@/models/entities/drive-file'; +import { User } from '@/models/entities/user'; export type PackedPage = SchemaType; diff --git a/src/models/repositories/relay.ts b/src/models/repositories/relay.ts index 601bb5eb39..72ead899f1 100644 --- a/src/models/repositories/relay.ts +++ b/src/models/repositories/relay.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Relay } from '../entities/relay'; +import { Relay } from '@/models/entities/relay'; @EntityRepository(Relay) export class RelayRepository extends Repository { diff --git a/src/models/repositories/signin.ts b/src/models/repositories/signin.ts index f5b90c0e9e..9942d2d962 100644 --- a/src/models/repositories/signin.ts +++ b/src/models/repositories/signin.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { Signin } from '../entities/signin'; +import { Signin } from '@/models/entities/signin'; @EntityRepository(Signin) export class SigninRepository extends Repository { diff --git a/src/models/repositories/user-group-invitation.ts b/src/models/repositories/user-group-invitation.ts index fb34dc9c29..638603d6ea 100644 --- a/src/models/repositories/user-group-invitation.ts +++ b/src/models/repositories/user-group-invitation.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserGroupInvitation } from '../entities/user-group-invitation'; +import { UserGroupInvitation } from '@/models/entities/user-group-invitation'; import { UserGroups } from '../index'; @EntityRepository(UserGroupInvitation) diff --git a/src/models/repositories/user-group.ts b/src/models/repositories/user-group.ts index ad144290ab..a76ac7b9d3 100644 --- a/src/models/repositories/user-group.ts +++ b/src/models/repositories/user-group.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserGroup } from '../entities/user-group'; +import { UserGroup } from '@/models/entities/user-group'; import { UserGroupJoinings } from '../index'; import { SchemaType } from '@/misc/schema'; diff --git a/src/models/repositories/user-list.ts b/src/models/repositories/user-list.ts index 38b8c2f1b7..809dbe0268 100644 --- a/src/models/repositories/user-list.ts +++ b/src/models/repositories/user-list.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm'; -import { UserList } from '../entities/user-list'; +import { UserList } from '@/models/entities/user-list'; import { UserListJoinings } from '../index'; import { SchemaType } from '@/misc/schema'; diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index a4e5a43a00..f56090bb82 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; import { EntityRepository, Repository, In, Not } from 'typeorm'; -import { User, ILocalUser, IRemoteUser } from '../entities/user'; +import { User, ILocalUser, IRemoteUser } from '@/models/entities/user'; import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index'; import config from '@/config/index'; import { SchemaType } from '@/misc/schema'; -import { awaitAll } from '../../prelude/await-all'; +import { awaitAll } from '@/prelude/await-all'; import { populateEmojis } from '@/misc/populate-emojis'; import { getAntennas } from '@/misc/antenna-cache'; import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const'; diff --git a/src/remote/activitypub/audience.ts b/src/remote/activitypub/audience.ts index 7feef5ee7a..3d2dab1459 100644 --- a/src/remote/activitypub/audience.ts +++ b/src/remote/activitypub/audience.ts @@ -1,7 +1,7 @@ import { ApObject, getApIds } from './type'; import Resolver from './resolver'; import { resolvePerson } from './models/person'; -import { unique, concat } from '../../prelude/array'; +import { unique, concat } from '@/prelude/array'; import * as promiseLimit from 'promise-limit'; import { User, IRemoteUser } from '@/models/entities/user'; diff --git a/src/remote/activitypub/kernel/create/index.ts b/src/remote/activitypub/kernel/create/index.ts index a44a6ced2b..ce039a363b 100644 --- a/src/remote/activitypub/kernel/create/index.ts +++ b/src/remote/activitypub/kernel/create/index.ts @@ -3,7 +3,7 @@ import { IRemoteUser } from '@/models/entities/user'; import createNote from './note'; import { ICreate, getApId, isPost, getApType } from '../../type'; import { apLogger } from '../../logger'; -import { toArray, concat, unique } from '../../../../prelude/array'; +import { toArray, concat, unique } from '@/prelude/array'; const logger = apLogger; diff --git a/src/remote/activitypub/kernel/delete/index.ts b/src/remote/activitypub/kernel/delete/index.ts index fe919975e7..474f3f6d60 100644 --- a/src/remote/activitypub/kernel/delete/index.ts +++ b/src/remote/activitypub/kernel/delete/index.ts @@ -1,7 +1,7 @@ import deleteNote from './note'; import { IRemoteUser } from '@/models/entities/user'; import { IDelete, getApId, isTombstone, IObject, validPost, validActor } from '../../type'; -import { toSingle } from '../../../../prelude/array'; +import { toSingle } from '@/prelude/array'; /** * 削除アクティビティを捌きます diff --git a/src/remote/activitypub/kernel/index.ts b/src/remote/activitypub/kernel/index.ts index 0bd0814340..20df28eec6 100644 --- a/src/remote/activitypub/kernel/index.ts +++ b/src/remote/activitypub/kernel/index.ts @@ -16,7 +16,7 @@ import block from './block/index'; import flag from './flag/index'; import { apLogger } from '../logger'; import Resolver from '../resolver'; -import { toArray } from '../../../prelude/array'; +import { toArray } from '@/prelude/array'; export async function performActivity(actor: IRemoteUser, activity: IObject) { if (isCollectionOrOrderedCollection(activity)) { diff --git a/src/remote/activitypub/models/mention.ts b/src/remote/activitypub/models/mention.ts index 0db0324aba..ade9c90806 100644 --- a/src/remote/activitypub/models/mention.ts +++ b/src/remote/activitypub/models/mention.ts @@ -1,4 +1,4 @@ -import { toArray, unique } from '../../../prelude/array'; +import { toArray, unique } from '@/prelude/array'; import { IObject, isMention, IApMention } from '../type'; import { resolvePerson } from './person'; import * as promiseLimit from 'promise-limit'; diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index d28d642a0a..25004cb4d2 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -8,7 +8,7 @@ import { resolveImage } from './image'; import { IRemoteUser } from '@/models/entities/user'; import { htmlToMfm } from '../misc/html-to-mfm'; import { extractApHashtags } from './tag'; -import { unique, toArray, toSingle } from '../../../prelude/array'; +import { unique, toArray, toSingle } from '@/prelude/array'; import { extractPollFromQuestion } from './question'; import vote from '@/services/note/polls/vote'; import { apLogger } from '../logger'; diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 3ae13135e3..4823def7cb 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -25,7 +25,7 @@ import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error'; import { toPuny } from '@/misc/convert-host'; import { UserProfile } from '@/models/entities/user-profile'; import { getConnection } from 'typeorm'; -import { toArray } from '../../../prelude/array'; +import { toArray } from '@/prelude/array'; import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata'; import { normalizeForSearch } from '@/misc/normalize-for-search'; diff --git a/src/remote/activitypub/models/tag.ts b/src/remote/activitypub/models/tag.ts index d25cb463fe..fbc6b9b428 100644 --- a/src/remote/activitypub/models/tag.ts +++ b/src/remote/activitypub/models/tag.ts @@ -1,4 +1,4 @@ -import { toArray } from '../../../prelude/array'; +import { toArray } from '@/prelude/array'; import { IObject, isHashtag, IApHashtag } from '../type'; export function extractApHashtags(tags: IObject | IObject[] | null | undefined) { diff --git a/src/remote/webfinger.ts b/src/remote/webfinger.ts index 744ab3639a..f63fd03628 100644 --- a/src/remote/webfinger.ts +++ b/src/remote/webfinger.ts @@ -1,6 +1,6 @@ import { URL } from 'url'; import { getJson } from '@/misc/fetch'; -import { query as urlQuery } from '../prelude/url'; +import { query as urlQuery } from '@/prelude/url'; type ILink = { href: string; diff --git a/src/server/activitypub/followers.ts b/src/server/activitypub/followers.ts index 0fad6b13c1..8b6a066bf0 100644 --- a/src/server/activitypub/followers.ts +++ b/src/server/activitypub/followers.ts @@ -2,7 +2,7 @@ import * as Router from '@koa/router'; import config from '@/config/index'; import $ from 'cafy'; import { ID } from '@/misc/cafy-id'; -import * as url from '../../prelude/url'; +import * as url from '@/prelude/url'; import { renderActivity } from '@/remote/activitypub/renderer/index'; import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection'; import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page'; diff --git a/src/server/activitypub/following.ts b/src/server/activitypub/following.ts index e7316d3e4d..5fc5d68a9c 100644 --- a/src/server/activitypub/following.ts +++ b/src/server/activitypub/following.ts @@ -2,7 +2,7 @@ import * as Router from '@koa/router'; import config from '@/config/index'; import $ from 'cafy'; import { ID } from '@/misc/cafy-id'; -import * as url from '../../prelude/url'; +import * as url from '@/prelude/url'; import { renderActivity } from '@/remote/activitypub/renderer/index'; import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection'; import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page'; diff --git a/src/server/activitypub/outbox.ts b/src/server/activitypub/outbox.ts index c6cf10de5e..df528e8b5a 100644 --- a/src/server/activitypub/outbox.ts +++ b/src/server/activitypub/outbox.ts @@ -9,8 +9,8 @@ import { setResponseType } from '../activitypub'; import renderNote from '@/remote/activitypub/renderer/note'; import renderCreate from '@/remote/activitypub/renderer/create'; import renderAnnounce from '@/remote/activitypub/renderer/announce'; -import { countIf } from '../../prelude/array'; -import * as url from '../../prelude/url'; +import { countIf } from '@/prelude/array'; +import * as url from '@/prelude/url'; import { Users, Notes } from '@/models/index'; import { makePaginationQuery } from '../api/common/make-pagination-query'; import { Brackets } from 'typeorm'; diff --git a/src/server/api/common/read-messaging-message.ts b/src/server/api/common/read-messaging-message.ts index 8e030faa3d..1dce76d2a9 100644 --- a/src/server/api/common/read-messaging-message.ts +++ b/src/server/api/common/read-messaging-message.ts @@ -7,7 +7,7 @@ import { MessagingMessages, UserGroupJoinings, Users } from '@/models/index'; import { In } from 'typeorm'; import { IdentifiableError } from '@/misc/identifiable-error'; import { UserGroup } from '@/models/entities/user-group'; -import { toArray } from '../../../prelude/array'; +import { toArray } from '@/prelude/array'; import { renderReadActivity } from '@/remote/activitypub/renderer/read'; import { renderActivity } from '@/remote/activitypub/renderer/index'; import { deliver } from '@/queue/index'; diff --git a/src/server/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts index 5dbafa07ee..c2ce943dcc 100644 --- a/src/server/api/endpoints/app/create.ts +++ b/src/server/api/endpoints/app/create.ts @@ -2,7 +2,7 @@ import $ from 'cafy'; import define from '../../define'; import { Apps } from '@/models/index'; import { genId } from '@/misc/gen-id'; -import { unique } from '../../../../prelude/array'; +import { unique } from '@/prelude/array'; import { secureRndstr } from '@/misc/secure-rndstr'; export const meta = { diff --git a/src/server/api/endpoints/users/get-frequently-replied-users.ts b/src/server/api/endpoints/users/get-frequently-replied-users.ts index 921d30c82e..32ebfd683a 100644 --- a/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -1,7 +1,7 @@ import $ from 'cafy'; import { ID } from '@/misc/cafy-id'; import define from '../../define'; -import { maximum } from '../../../../prelude/array'; +import { maximum } from '@/prelude/array'; import { ApiError } from '../../error'; import { getUser } from '../../common/getters'; import { Not, In, IsNull } from 'typeorm'; diff --git a/src/server/index.ts b/src/server/index.ts index a9904accb4..fb4e48c1c6 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -18,7 +18,7 @@ import nodeinfo from './nodeinfo'; import wellKnown from './well-known'; import config from '@/config/index'; import apiServer from './api/index'; -import { sum } from '../prelude/array'; +import { sum } from '@/prelude/array'; import Logger from '@/services/logger'; import { program } from '../argv'; import { UserProfiles, Users } from '@/models/index'; diff --git a/src/server/web/url-preview.ts b/src/server/web/url-preview.ts index 619335634c..1375420c0a 100644 --- a/src/server/web/url-preview.ts +++ b/src/server/web/url-preview.ts @@ -3,7 +3,7 @@ import summaly from 'summaly'; import { fetchMeta } from '@/misc/fetch-meta'; import Logger from '@/services/logger'; import config from '@/config/index'; -import { query } from '../../prelude/url'; +import { query } from '@/prelude/url'; import { getJson } from '@/misc/fetch'; const logger = new Logger('url-preview'); diff --git a/src/server/well-known.ts b/src/server/well-known.ts index 11ad22c580..a2e6bc0bc4 100644 --- a/src/server/well-known.ts +++ b/src/server/well-known.ts @@ -3,7 +3,7 @@ import * as Router from '@koa/router'; import config from '@/config/index'; import { parseAcct, Acct } from '@/misc/acct'; import { links } from './nodeinfo'; -import { escapeAttribute, escapeValue } from '../prelude/xml'; +import { escapeAttribute, escapeValue } from '@/prelude/xml'; import { Users } from '@/models/index'; import { User } from '@/models/entities/user'; diff --git a/src/services/chart/core.ts b/src/services/chart/core.ts index 3c0526d2e5..eee7d20efb 100644 --- a/src/services/chart/core.ts +++ b/src/services/chart/core.ts @@ -9,7 +9,7 @@ import autobind from 'autobind-decorator'; import Logger from '../logger'; import { Schema } from '@/misc/schema'; import { EntitySchema, getRepository, Repository, LessThan, Between } from 'typeorm'; -import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '../../prelude/time'; +import { dateUTC, isTimeSame, isTimeBefore, subtractTime, addTime } from '@/prelude/time'; import { getChartInsertLock } from '@/misc/app-lock'; const logger = new Logger('chart', 'white', process.env.NODE_ENV !== 'test'); diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 56cdec4a51..8c996bdba6 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -9,7 +9,7 @@ import { renderActivity } from '@/remote/activitypub/renderer/index'; import { resolveUser } from '@/remote/resolve-user'; import config from '@/config/index'; import { updateHashtags } from '../update-hashtag'; -import { concat } from '../../prelude/array'; +import { concat } from '@/prelude/array'; import insertNoteUnread from './unread'; import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; import { extractMentions } from '@/misc/extract-mentions'; From 84f2192cde8ab921425e2b7de76aa09d64993cc8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Aug 2021 22:40:39 +0900 Subject: [PATCH 12/32] update deps --- CHANGELOG.md | 1 + package.json | 42 ++--- yarn.lock | 483 ++++++++++++++++++++++++--------------------------- 3 files changed, 245 insertions(+), 281 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce3065a10..159de1dea4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ## 12.x.x (unreleased) ### Improvements +- 依存関係の更新 ### Bugfixes - チャンネルを作成しているとアカウントを削除できないのを修正 diff --git a/package.json b/package.json index 935359a90c..4135c47303 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@types/markdown-it": "12.0.3", "@types/matter-js": "0.17.5", "@types/mocha": "8.2.3", - "@types/node": "16.6.0", + "@types/node": "16.6.2", "@types/node-fetch": "2.5.12", "@types/nodemailer": "6.4.4", "@types/nprogress": "0.2.0", @@ -89,7 +89,7 @@ "@types/redis": "2.8.31", "@types/rename": "1.0.4", "@types/request-stats": "3.0.0", - "@types/rimraf": "3.0.1", + "@types/rimraf": "3.0.2", "@types/seedrandom": "2.4.28", "@types/sharp": "0.28.5", "@types/sinonjs__fake-timers": "6.0.3", @@ -103,8 +103,8 @@ "@types/webpack-stream": "3.2.12", "@types/websocket": "1.0.4", "@types/ws": "7.4.7", - "@typescript-eslint/parser": "4.29.1", - "@vue/compiler-sfc": "3.2.3", + "@typescript-eslint/parser": "4.29.2", + "@vue/compiler-sfc": "3.2.4", "abort-controller": "3.0.0", "apexcharts": "3.27.3", "autobind-decorator": "2.4.0", @@ -112,22 +112,22 @@ "autwh": "0.1.0", "aws-sdk": "2.966.0", "bcryptjs": "2.4.3", - "blurhash": "1.1.3", - "broadcast-channel": "3.7.0", - "bull": "3.26.0", + "blurhash": "1.1.4", + "broadcast-channel": "4.2.0", + "bull": "3.28.1", "cacheable-lookup": "6.0.0", "cafy": "15.2.1", "cbor": "8.0.0", "chalk": "4.1.2", "chart.js": "2.9.4", "cli-highlight": "2.1.11", - "commander": "7.2.0", + "commander": "8.1.0", "compare-versions": "3.6.0", - "concurrently": "6.2.0", + "concurrently": "6.2.1", "content-disposition": "0.5.3", "crc-32": "1.2.0", "css-loader": "6.2.0", - "cssnano": "5.0.7", + "cssnano": "5.0.8", "dateformat": "4.5.1", "escape-regexp": "0.0.1", "eslint": "7.32.0", @@ -179,7 +179,7 @@ "nodemailer": "6.6.3", "os-utils": "0.0.14", "parse5": "6.0.1", - "pg": "8.6.0", + "pg": "8.7.1", "portscanner": "2.2.0", "postcss": "8.3.6", "postcss-loader": "6.1.1", @@ -202,10 +202,10 @@ "rimraf": "3.0.2", "rndstr": "1.0.0", "s-age": "1.1.2", - "sass": "1.37.5", + "sass": "1.38.0", "sass-loader": "12.1.0", "seedrandom": "3.0.5", - "sharp": "0.28.3", + "sharp": "0.29.0", "speakeasy": "2.0.0", "stringz": "2.1.0", "style-loader": "3.2.1", @@ -219,18 +219,18 @@ "tinycolor2": "1.4.2", "tmp": "0.2.1", "ts-loader": "9.2.5", - "ts-node": "10.2.0", - "tsc-alias": "1.3.8", + "ts-node": "10.2.1", + "tsc-alias": "1.3.9", "tsconfig-paths": "3.10.1", "tslint": "6.1.3", "tslint-sonarts": "1.9.0", "twemoji-parser": "13.1.0", - "typeorm": "0.2.32", + "typeorm": "0.2.37", "typescript": "4.3.5", "ulid": "2.3.0", "uuid": "8.3.2", "v-debounce": "0.1.2", - "vue": "3.2.3", + "vue": "3.2.4", "vue-loader": "16.5.0", "vue-prism-editor": "2.0.0-alpha.2", "vue-router": "4.0.5", @@ -238,17 +238,17 @@ "vue-svg-loader": "0.17.0-beta.2", "vuedraggable": "4.0.1", "web-push": "3.4.5", - "webpack": "5.50.0", - "webpack-cli": "4.7.2", + "webpack": "5.51.0", + "webpack-cli": "4.8.0", "websocket": "1.0.34", - "ws": "8.1.0", + "ws": "8.2.0", "xev": "2.0.1" }, "devDependencies": { "@redocly/openapi-core": "1.0.0-beta.44", "@types/fluent-ffmpeg": "2.1.17", "cross-env": "7.0.3", - "cypress": "8.2.0", + "cypress": "8.3.0", "start-server-and-test": "1.13.1" } } diff --git a/yarn.lock b/yarn.lock index 30dee08f86..09fd32f7aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -869,10 +869,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055" integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== -"@types/node@16.6.0": - version "16.6.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.0.tgz#0d5685f85066f94e97f19e8a67fe003c5fadacc4" - integrity sha512-OyiZPohMMjZEYqcVo/UJ04GyAxXOJEZO/FpzyXxcH4r/ArrVoXHf4MbUrkLp0Tz7/p1mMKpo5zJ6ZHl8XBNthQ== +"@types/node@16.6.2": + version "16.6.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.2.tgz#331b7b9f8621c638284787c5559423822fdffc50" + integrity sha512-LSw8TZt12ZudbpHc6EkIyDM3nHVWKYrAvGy6EAJfNfjusbwnThqjqxUKKRwuV3iWYeW/LYMzNgaq3MaLffQ2xA== "@types/node@^14.11.8": version "14.14.44" @@ -1014,10 +1014,10 @@ dependencies: "@types/node" "*" -"@types/rimraf@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.1.tgz#1bbc106f0978742289103e080d4b41b3b4656e58" - integrity sha512-CAoSlbco40aKZ0CkelBF2g3JeN6aioRaTVnqSX5pWsn/WApm6IDxI4e4tD9D0dY/meCkyyleP1IQDVN13F4maA== +"@types/rimraf@3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.2.tgz#a63d175b331748e5220ad48c901d7bbf1f44eef8" + integrity sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ== dependencies: "@types/glob" "*" "@types/node" "*" @@ -1206,48 +1206,48 @@ resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.2.tgz#808c9fa7e4517274ed555fa158f2de4b4f468e71" integrity sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg== -"@typescript-eslint/parser@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.1.tgz#17dfbb45c9032ffa0fe15881d20fbc2a4bdeb02d" - integrity sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg== +"@typescript-eslint/parser@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.2.tgz#1c7744f4c27aeb74610c955d3dce9250e95c370a" + integrity sha512-WQ6BPf+lNuwteUuyk1jD/aHKqMQ9jrdCn7Gxt9vvBnzbpj7aWEf+aZsJ1zvTjx5zFxGCt000lsbD9tQPEL8u6g== dependencies: - "@typescript-eslint/scope-manager" "4.29.1" - "@typescript-eslint/types" "4.29.1" - "@typescript-eslint/typescript-estree" "4.29.1" + "@typescript-eslint/scope-manager" "4.29.2" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/typescript-estree" "4.29.2" debug "^4.3.1" -"@typescript-eslint/scope-manager@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz#f25da25bc6512812efa2ce5ebd36619d68e61358" - integrity sha512-Hzv/uZOa9zrD/W5mftZa54Jd5Fed3tL6b4HeaOpwVSabJK8CJ+2MkDasnX/XK4rqP5ZTWngK1ZDeCi6EnxPQ7A== +"@typescript-eslint/scope-manager@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz#442b0f029d981fa402942715b1718ac7fcd5aa1b" + integrity sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA== dependencies: - "@typescript-eslint/types" "4.29.1" - "@typescript-eslint/visitor-keys" "4.29.1" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/visitor-keys" "4.29.2" -"@typescript-eslint/types@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.1.tgz#94cce6cf7cc83451df03339cda99d326be2feaf5" - integrity sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA== +"@typescript-eslint/types@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.2.tgz#fc0489c6b89773f99109fb0aa0aaddff21f52fcd" + integrity sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ== -"@typescript-eslint/typescript-estree@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz#7b32a25ff8e51f2671ccc6b26cdbee3b1e6c5e7f" - integrity sha512-lIkkrR9E4lwZkzPiRDNq0xdC3f2iVCUjw/7WPJ4S2Sl6C3nRWkeE1YXCQ0+KsiaQRbpY16jNaokdWnm9aUIsfw== +"@typescript-eslint/typescript-estree@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz#a0ea8b98b274adbb2577100ba545ddf8bf7dc219" + integrity sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg== dependencies: - "@typescript-eslint/types" "4.29.1" - "@typescript-eslint/visitor-keys" "4.29.1" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/visitor-keys" "4.29.2" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.29.1": - version "4.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz#0615be8b55721f5e854f3ee99f1a714f2d093e5d" - integrity sha512-zLqtjMoXvgdZY/PG6gqA73V8BjqPs4af1v2kiiETBObp+uC6gRYnJLmJHxC0QyUrrHDLJPIWNYxoBV3wbcRlag== +"@typescript-eslint/visitor-keys@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz#d2da7341f3519486f50655159f4e5ecdcb2cd1df" + integrity sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag== dependencies: - "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/types" "4.29.2" eslint-visitor-keys "^2.0.0" "@ungap/promise-all-settled@1.1.2": @@ -1255,37 +1255,37 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== -"@vue/compiler-core@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.3.tgz#96aa6692ad3819127f9f6256757f67f1c400ceb4" - integrity sha512-qQpACs40hClYqghS209OBh6NDArKPrS5emWMOH/hzDy0KtOV7Kfyy2ILWRfamIsygq8mg+xHcqtVXOjr21WvQw== +"@vue/compiler-core@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.4.tgz#a98d295771998c1e8dccc4ee3d52feb14b02aea9" + integrity sha512-c8NuQq7mUXXxA4iqD5VUKpyVeklK53+DMbojYMyZ0VPPrb0BUWrZWFiqSDT+MFDv0f6Hv3QuLiHWb1BWMXBbrw== dependencies: "@babel/parser" "^7.12.0" "@babel/types" "^7.12.0" - "@vue/shared" "3.2.3" + "@vue/shared" "3.2.4" estree-walker "^2.0.1" source-map "^0.6.1" -"@vue/compiler-dom@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.3.tgz#2576959b979dd8a765171943cfa5409437eb1e80" - integrity sha512-hEKd+h9eIT+et/l0Nmiup5CWFHC4KuhUcrdAIPLcv1uskVQA3gSDAAx9UGB/G9cRB2gmBpFONHEi8zKrlnsaWQ== +"@vue/compiler-dom@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.4.tgz#3a43de243eba127abbe57e796a0b969d2df78c08" + integrity sha512-uj1nwO4794fw2YsYas5QT+FU/YGrXbS0Qk+1c7Kp1kV7idhZIghWLTjyvYibpGoseFbYLPd+sW2/noJG5H04EQ== dependencies: - "@vue/compiler-core" "3.2.3" - "@vue/shared" "3.2.3" + "@vue/compiler-core" "3.2.4" + "@vue/shared" "3.2.4" -"@vue/compiler-sfc@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.3.tgz#49195959e168cd7fbecb6c46badb5756b8edaf10" - integrity sha512-TlaDOChFUzt3lqqaFNRD2XI0lrRWYA0/jTgWKUrCLVEPZ0tNP8Vyjmml3+1QlAo4pyjaOjYacq0OS4eCGVFJ3w== +"@vue/compiler-sfc@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.4.tgz#9807868cc950291f163c3930a81bb16e870df097" + integrity sha512-GM+ouDdDzhqgkLmBH4bgq4kiZxJQArSppJiZHWHIx9XRaefHLmc1LBNPmN8ivm4SVfi2i7M2t9k8ZnjsScgzPQ== dependencies: "@babel/parser" "^7.13.9" "@babel/types" "^7.13.0" "@types/estree" "^0.0.48" - "@vue/compiler-core" "3.2.3" - "@vue/compiler-dom" "3.2.3" - "@vue/compiler-ssr" "3.2.3" - "@vue/shared" "3.2.3" + "@vue/compiler-core" "3.2.4" + "@vue/compiler-dom" "3.2.4" + "@vue/compiler-ssr" "3.2.4" + "@vue/shared" "3.2.4" consolidate "^0.16.0" estree-walker "^2.0.1" hash-sum "^2.0.0" @@ -1297,42 +1297,42 @@ postcss-selector-parser "^6.0.4" source-map "^0.6.1" -"@vue/compiler-ssr@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.3.tgz#75518e43e52c3d50db2e06cbdf37b981d3b4e711" - integrity sha512-VMYXYBXPohxlPvg42tT8Gcc58Wo1fPP4IE+aLgpmnNmMFuTsGEKOBK4mZqtNpv9dxgF6ooro9gQlA6BfOy3lGg== +"@vue/compiler-ssr@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.4.tgz#be51f219c2042b3e530373e60bc126ada6bb1cc0" + integrity sha512-bKZuXu9/4XwsFHFWIKQK+5kN7mxIIWmMmT2L4VVek7cvY/vm3p4WTsXYDGZJy0htOTXvM2ifr6sflg012T0hsw== dependencies: - "@vue/compiler-dom" "3.2.3" - "@vue/shared" "3.2.3" + "@vue/compiler-dom" "3.2.4" + "@vue/shared" "3.2.4" -"@vue/reactivity@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.3.tgz#df466543542a2ae20553dea1efd57bec1da634f3" - integrity sha512-HGmciaVNb3VKn4f4wCswFWLXBcopKQbO1oEs+WunBtt5tym0SS2wFNEGvWfW0dzzlXRbM507ys09m68L+JTa/Q== +"@vue/reactivity@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.4.tgz#a020ad7e50f674219a07764b105b5922e61597ea" + integrity sha512-ljWTR0hr8Tn09hM2tlmWxZzCBPlgGLnq/k8K8X6EcJhtV+C8OzFySnbWqMWataojbrQOocThwsC8awKthSl2uQ== dependencies: - "@vue/shared" "3.2.3" + "@vue/shared" "3.2.4" -"@vue/runtime-core@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.3.tgz#6f34ec620d6d75c255a1e75e64a4b6f90a4a2039" - integrity sha512-yn6FL2fCKi5dauJYm8u6iiGs7VoXoIWdr+icIFtEW4eObUKOzDwYpBaqCf8orhI1LEnyZO7rLplbfoJJColBwg== +"@vue/runtime-core@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.4.tgz#da5dde3dc1e48df99dd31ea9a972f5c02acdc3f5" + integrity sha512-W6PtEOs8P8jKYPo3JwaMAozZQivxInUleGfNwI2pK1t8ZLZIxn4kAf7p4VF4jJdQB8SZBzpfWdLUc06j7IOmpQ== dependencies: - "@vue/reactivity" "3.2.3" - "@vue/shared" "3.2.3" + "@vue/reactivity" "3.2.4" + "@vue/shared" "3.2.4" -"@vue/runtime-dom@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.3.tgz#4f0930681efd9d11d99a593221bcae9423f69fcb" - integrity sha512-YpulzSn0ydzgbfE1i9O1MJAspUHTA9q6AmqRrDLIR5AP9jmoGA//TmnB90IhA7OOGpuSVm4f1VUZ+gm/URPPgA== +"@vue/runtime-dom@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.4.tgz#1025595f2ae99a12fe0e1e6bce8df6761efec24b" + integrity sha512-HcVtLyn2SGwsf6BFPwkvDPDOhOqkOKcfHDpBp5R1coX+qMsOFrY8lJnGXIY+JnxqFjND00E9+u+lq5cs/W7ooA== dependencies: - "@vue/runtime-core" "3.2.3" - "@vue/shared" "3.2.3" + "@vue/runtime-core" "3.2.4" + "@vue/shared" "3.2.4" csstype "^2.6.8" -"@vue/shared@3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.3.tgz#89e338a5524450c876d3512b4cc6ba80a4205e2c" - integrity sha512-1f8kyoabSgoga0E89itGIoaCo2Ayr6i6jQq/kHhhYrrBxoK7LNNwuWQghW0k/bapimyIzQiN891XzquYP78aqg== +"@vue/shared@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.4.tgz#ba2a09527afff27b28d08f921b4a597e9504ca7a" + integrity sha512-j2j1MRmjalVKr3YBTxl/BClSIc8UQ8NnPpLYclxerK65JIowI4O7n8O8lElveEtEoHxy1d7BelPUDI0Q4bumqg== "@webassemblyjs/ast@1.11.0": version "1.11.0" @@ -1588,10 +1588,10 @@ dependencies: envinfo "^7.7.3" -"@webpack-cli/serve@^1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.1.tgz#b5fde2f0f79c1e120307c415a4c1d5eb15a6f278" - integrity sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw== +"@webpack-cli/serve@^1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec" + integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -2237,10 +2237,10 @@ bluebird@3.7.2, bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -blurhash@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/blurhash/-/blurhash-1.1.3.tgz#dc325af7da836d07a0861d830bdd63694382483e" - integrity sha512-yUhPJvXexbqbyijCIE/T2NCXcj9iNPhWmOKbPTuR/cm7Q5snXYIfnVnz6m7MWOXxODMz/Cr3UcVkRdHiuDVRDw== +blurhash@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/blurhash/-/blurhash-1.1.4.tgz#a7010ceb3019cd2c9809b17c910ebf6175d29244" + integrity sha512-MXIPz6zwYUKayju+Uidf83KhH0vodZfeRl6Ich8Gu+KGl0JgKiFq9LsfqV7cVU5fKD/AotmduZqvOfrGKOfTaA== bn.js@^4.0.0: version "4.11.8" @@ -2283,10 +2283,10 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" -broadcast-channel@3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-3.7.0.tgz#2dfa5c7b4289547ac3f6705f9c00af8723889937" - integrity sha512-cIAKJXAxGJceNZGTZSBzMxzyOn72cVgPnKx4dc6LRjQgbaJUQqhy5rzL3zbMxkMWsGKkv2hSFkPRMEXfoMZ2Mg== +broadcast-channel@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-4.2.0.tgz#9ca93a23a31036266c2c9b0f8f55bd21594b8f82" + integrity sha512-XX9yNnIy/v2T+HR5EKIH7ziM2mYTefsrzZ2lkCmFZxwCDG7Ns7HLIooUXA114sCeFRJ4MEXEgdMapxfPDh9Xkg== dependencies: "@babel/runtime" "^7.7.2" detect-node "^2.1.0" @@ -2428,10 +2428,10 @@ builtin-modules@^1.1.1: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -bull@3.26.0: - version "3.26.0" - resolved "https://registry.yarnpkg.com/bull/-/bull-3.26.0.tgz#c6198cf4f3a2fa5f3044cbe462b452c77a3df94f" - integrity sha512-W1ohwMBApLW9dhKHEwgzr8YnpScTOGC9KtKP2DrvjnWTQFWbaEnKlrDHKp3SJwvAB0C3jDsO579O/Hys/UmAiQ== +bull@3.28.1: + version "3.28.1" + resolved "https://registry.yarnpkg.com/bull/-/bull-3.28.1.tgz#33bc7bbe640e71258a2a800935a692a24a2d7236" + integrity sha512-TasVWD1410Q8druRG6SIAN5hwAT3F4QICcGszReD859qAerq+VwbW3vPg6lV60reJkWyWBK11FHa2FsQ8iDBmQ== dependencies: cron-parser "^2.13.0" debuglog "^1.0.0" @@ -2822,7 +2822,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-highlight@2.1.11: +cli-highlight@2.1.11, cli-highlight@^2.1.11: version "2.1.11" resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.11.tgz#49736fa452f0aaf4fae580e30acb26828d2dc1bf" integrity sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg== @@ -2834,18 +2834,6 @@ cli-highlight@2.1.11: parse5-htmlparser2-tree-adapter "^6.0.0" yargs "^16.0.0" -cli-highlight@^2.1.10: - version "2.1.10" - resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.10.tgz#26a087da9209dce4fcb8cf5427dc97cd96ac173a" - integrity sha512-CcPFD3JwdQ2oSzy+AMG6j3LRTkNjM82kzcSKzoVw6cLanDCJNlsLjeqVTOTfOfucnWv5F0rmBemVf1m9JiIasw== - dependencies: - chalk "^4.0.0" - highlight.js "^10.0.0" - mz "^2.4.0" - parse5 "^5.1.1" - parse5-htmlparser2-tree-adapter "^6.0.0" - yargs "^16.0.0" - cli-table3@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.0.tgz#b7b1bc65ca8e7b5cef9124e13dc2b21e2ce4faee" @@ -3004,7 +2992,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.3.0, color-convert@^1.9.0, color-convert@^1.9.1, color-convert@^1.9.3: +color-convert@^1.3.0, color-convert@^1.9.0, color-convert@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -3035,10 +3023,10 @@ color-string@^0.3.0: dependencies: color-name "^1.0.0" -color-string@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.4.tgz#dd51cd25cfee953d138fe4002372cc3d0e504cb6" - integrity sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw== +color-string@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312" + integrity sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA== dependencies: color-name "^1.0.0" simple-swizzle "^0.2.2" @@ -3057,19 +3045,24 @@ color@^0.11.0: color-convert "^1.3.0" color-string "^0.3.0" -color@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e" - integrity sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ== +color@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/color/-/color-4.0.1.tgz#21df44cd10245a91b1ccf5ba031609b0e10e7d67" + integrity sha512-rpZjOKN5O7naJxkH2Rx1sZzzBgaiWECc6BYXjeCE6kF0kcASJYbUq02u7JqIHwCb/j3NhV+QhRL2683aICeGZA== dependencies: - color-convert "^1.9.1" - color-string "^1.5.4" + color-convert "^2.0.1" + color-string "^1.6.0" colord@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/colord/-/colord-2.0.1.tgz#1e7fb1f9fa1cf74f42c58cb9c20320bab8435aa0" integrity sha512-vm5YpaWamD0Ov6TSG0GGmUIwstrWcfKQV/h2CmbR7PbNu41+qdB5PW9lpzhjedrpm08uuYvcXi0Oel1RLZIJuA== +colord@^2.6: + version "2.7.0" + resolved "https://registry.yarnpkg.com/colord/-/colord-2.7.0.tgz#706ea36fe0cd651b585eb142fe64b6480185270e" + integrity sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q== + colorette@^1.2.0, colorette@^1.2.1, colorette@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" @@ -3101,10 +3094,10 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@7.2.0, commander@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commander@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.1.0.tgz#db36e3e66edf24ff591d639862c6ab2c52664362" + integrity sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA== commander@^2.12.1, commander@^2.19.0, commander@^2.20.0: version "2.20.3" @@ -3126,6 +3119,11 @@ commander@^7.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2" integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA== +commander@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + comment-json@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.1.0.tgz#09d08f0fbc4ad5eeccbac20f469adbb967dcbd2c" @@ -3167,10 +3165,10 @@ concat-stream@^1.5.2, concat-stream@^1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" -concurrently@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-6.2.0.tgz#587e2cb8afca7234172d8ea55176088632c4c56d" - integrity sha512-v9I4Y3wFoXCSY2L73yYgwA9ESrQMpRn80jMcqMgHx720Hecz2GZAvTI6bREVST6lkddNypDKRN22qhK0X8Y00g== +concurrently@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-6.2.1.tgz#d880fc1d77559084732fa514092a3d5109a0d5bf" + integrity sha512-emgwhH+ezkuYKSHZQ+AkgEpoUZZlbpPVYCVv7YZx0r+T7fny1H03r2nYRebpi2DudHR4n1Rgbo2YTxKOxVJ4+g== dependencies: chalk "^4.1.0" date-fns "^2.16.1" @@ -3317,7 +3315,7 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-color-names@0.0.4, css-color-names@^0.0.4: +css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= @@ -3428,10 +3426,10 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-default@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.3.tgz#caa54183a8c8df03124a9e23f374ab89df5a9a99" - integrity sha512-qo9tX+t4yAAZ/yagVV3b+QBKeLklQbmgR3wI7mccrDcR+bEk9iHgZN1E7doX68y9ThznLya3RDmR+nc7l6/2WQ== +cssnano-preset-default@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.4.tgz#359943bf00c5c8e05489f12dd25f3006f2c1cbd2" + integrity sha512-sPpQNDQBI3R/QsYxQvfB4mXeEcWuw0wGtKtmS5eg8wudyStYMgKOQT39G07EbW1LB56AOYrinRS9f0ig4Y3MhQ== dependencies: css-declaration-sorter "^6.0.3" cssnano-utils "^2.0.1" @@ -3445,7 +3443,7 @@ cssnano-preset-default@^5.1.3: postcss-merge-longhand "^5.0.2" postcss-merge-rules "^5.0.2" postcss-minify-font-values "^5.0.1" - postcss-minify-gradients "^5.0.1" + postcss-minify-gradients "^5.0.2" postcss-minify-params "^5.0.1" postcss-minify-selectors "^5.1.0" postcss-normalize-charset "^5.0.1" @@ -3468,12 +3466,12 @@ cssnano-utils@^2.0.1: resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.1.tgz#8660aa2b37ed869d2e2f22918196a9a8b6498ce2" integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ== -cssnano@5.0.7: - version "5.0.7" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.7.tgz#e81894bdf31aa01a0ca3d1d0eee47be18f7f3012" - integrity sha512-7C0tbb298hef3rq+TtBbMuezBQ9VrFtrQEsPNuBKNVgWny/67vdRsnq8EoNu7TRjAHURgYvWlRIpCUmcMZkRzw== +cssnano@5.0.8: + version "5.0.8" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.8.tgz#39ad166256980fcc64faa08c9bb18bb5789ecfa9" + integrity sha512-Lda7geZU0Yu+RZi2SGpjYuQz4HI4/1Y+BhdD0jL7NXAQ5larCzVn+PUGuZbDMYz904AXXCOgO5L1teSvgu7aFg== dependencies: - cssnano-preset-default "^5.1.3" + cssnano-preset-default "^5.1.4" is-resolvable "^1.1.0" lilconfig "^2.0.3" yaml "^1.10.2" @@ -3560,10 +3558,10 @@ csstype@^2.6.8: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.13.tgz#a6893015b90e84dd6e85d0e3b442a1e84f2dbe0f" integrity sha512-ul26pfSQTZW8dcOnD2iiJssfXw0gdNVX9IJDH/X3K5DGPfj+fUYe3kB+swUY6BF3oZDxaID3AJt+9/ojSAE05A== -cypress@8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.2.0.tgz#1e4e9f6218324e82a95c1b9cad7f3965ba663d7f" - integrity sha512-jg7S5VxxslwsgEyAkCE9ZCkFADxOUY1bSWScp1cWnga88K0TZgFQ0zdxyG9Mw/4spLGuvkriIZ62am+TR6C04w== +cypress@8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.3.0.tgz#ba906d2170888073ad94b2be1b994a749bbb7c7d" + integrity sha512-zA5Rcq8AZIfRfPXU0CCcauofF+YpaU9HYbfqkunFTmFV0Kdlo14tNjH2E3++MkjXKFnv3/pXq+HgxWtw8CSe8Q== dependencies: "@cypress/request" "^2.88.5" "@cypress/xvfb" "^1.2.4" @@ -5404,16 +5402,6 @@ he@1.2.0, he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -hex-color-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" - integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== - -highlight.js@^10.0.0: - version "10.4.1" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0" - integrity sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg== - highlight.js@^10.7.1: version "10.7.2" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.2.tgz#89319b861edc66c48854ed1e6da21ea89f847360" @@ -5441,16 +5429,6 @@ hpagent@^0.1.1: resolved "https://registry.yarnpkg.com/hpagent/-/hpagent-0.1.1.tgz#66f67f16e5c7a8b59a068e40c2658c2c749ad5e2" integrity sha512-IxJWQiY0vmEjetHdoE9HZjD4Cx+mYTr25tR7JCxXaiI3QxW0YqYyM11KyZbHufoa/piWhMb2+D3FGpMgmA2cFQ== -hsl-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" - integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= - -hsla-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" - integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= - html-comment-regex@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" @@ -5850,18 +5828,6 @@ is-ci@^3.0.0: dependencies: ci-info "^3.1.1" -is-color-stop@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" - integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= - dependencies: - css-color-names "^0.0.4" - hex-color-regex "^1.1.0" - hsl-regex "^1.0.0" - hsla-regex "^1.0.0" - rgb-regex "^1.0.1" - rgba-regex "^1.0.0" - is-core-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" @@ -7514,10 +7480,10 @@ node-abi@^2.21.0: dependencies: semver "^5.4.1" -node-addon-api@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" - integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== +node-addon-api@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.0.0.tgz#ac128f43eff7fac4b5f5ef2f39d6d7c2709efead" + integrity sha512-ALmRVBFzfwldBfk3SbKfl6+PVMXiCPKZBEfsJqB/EjXAMAI+MfFrEHR+GMRBuI162DihZ1QjEZ8ieYKuRCJ8Hg== node-fetch@2.6.1, node-fetch@^2.6.1: version "2.6.1" @@ -7575,11 +7541,6 @@ nofilter@^3.0.2: resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.0.3.tgz#3ff3b142efdccb403434ccae4a0c2c835cb9b522" integrity sha512-TN/MCrQmXQk5DyUJ8TGUq1Il8rv4fTsjddLmMopV006QP8DMkglmGgYfQKD5620vXLRXfr8iGI6ZZ4/ZWld2cQ== -noop-logger@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" - integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= - nopt@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -8179,10 +8140,10 @@ pg-int8@1.0.1: resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-pool@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.3.0.tgz#12d5c7f65ea18a6e99ca9811bd18129071e562fc" - integrity sha512-0O5huCql8/D6PIRFAlmccjphLYWC+JIzvUhSzXSpGaf+tjTZc4nn+Lr7mLXBbFJfvwbP0ywDv73EiaBsxn7zdg== +pg-pool@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.4.1.tgz#0e71ce2c67b442a5e862a9c182172c37eda71e9c" + integrity sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ== pg-protocol@^1.5.0: version "1.5.0" @@ -8200,15 +8161,15 @@ pg-types@^2.1.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg@8.6.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/pg/-/pg-8.6.0.tgz#e222296b0b079b280cce106ea991703335487db2" - integrity sha512-qNS9u61lqljTDFvmk/N66EeGq3n6Ujzj0FFyNMGQr6XuEv4tgNTXvJQTfJdcvGit5p5/DWPu+wj920hAJFI+QQ== +pg@8.7.1: + version "8.7.1" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.7.1.tgz#9ea9d1ec225980c36f94e181d009ab9f4ce4c471" + integrity sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA== dependencies: buffer-writer "2.0.0" packet-reader "1.0.0" pg-connection-string "^2.5.0" - pg-pool "^3.3.0" + pg-pool "^3.4.1" pg-protocol "^1.5.0" pg-types "^2.1.0" pgpass "1.x" @@ -8481,13 +8442,13 @@ postcss-minify-gradients@^1.0.1: postcss "^5.0.12" postcss-value-parser "^3.3.0" -postcss-minify-gradients@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.1.tgz#2dc79fd1a1afcb72a9e727bc549ce860f93565d2" - integrity sha512-odOwBFAIn2wIv+XYRpoN2hUV3pPQlgbJ10XeXPq8UY2N+9ZG42xu45lTn/g9zZ+d70NKSQD6EOi6UiCMu3FN7g== +postcss-minify-gradients@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.2.tgz#7c175c108f06a5629925d698b3c4cf7bd3864ee5" + integrity sha512-7Do9JP+wqSD6Prittitt2zDLrfzP9pqKs2EcLX7HJYxsxCOwrrcLt4x/ctQTsiOw+/8HYotAoqNkrzItL19SdQ== dependencies: + colord "^2.6" cssnano-utils "^2.0.1" - is-color-stop "^1.1.0" postcss-value-parser "^4.1.0" postcss-minify-params@^1.0.4: @@ -8852,10 +8813,10 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" -prebuild-install@^6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.2.tgz#6ce5fc5978feba5d3cbffedca0682b136a0b5bff" - integrity sha512-PzYWIKZeP+967WuKYXlTOhYBgGOvTRSfaKI89XnfJ0ansRAH7hDU45X+K+FZeI1Wb/7p/NnuctPH3g0IqKUuSQ== +prebuild-install@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" + integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== dependencies: detect-libc "^1.0.3" expand-template "^2.0.3" @@ -8864,7 +8825,6 @@ prebuild-install@^6.1.2: mkdirp-classic "^0.5.3" napi-build-utils "^1.0.1" node-abi "^2.21.0" - noop-logger "^0.1.1" npmlog "^4.0.1" pump "^3.0.0" rc "^1.2.7" @@ -9666,16 +9626,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rgb-regex@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" - integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= - -rgba-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" - integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= - rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -9767,10 +9717,10 @@ sass-loader@12.1.0: klona "^2.0.4" neo-async "^2.6.2" -sass@1.37.5: - version "1.37.5" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.37.5.tgz#f6838351f7cc814c4fcfe1d9a20e0cabbd1e7b3c" - integrity sha512-Cx3ewxz9QB/ErnVIiWg2cH0kiYZ0FPvheDTVC6BsiEGBTZKKZJ1Gq5Kq6jy3PKtL6+EJ8NIoaBW/RSd2R6cZOA== +sass@1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.38.0.tgz#2f3e60a1efdcdc910586fa79dc89d3399a145b4f" + integrity sha512-WBccZeMigAGKoI+NgD7Adh0ab1HUq+6BmyBUEaGxtErbUtWUevEbdgo5EZiJQofLUGcKtlNaO2IdN73AHEua5g== dependencies: chokidar ">=3.0.0 <4.0.0" @@ -9914,15 +9864,15 @@ shallow-clone@^3.0.0: dependencies: kind-of "^6.0.2" -sharp@0.28.3: - version "0.28.3" - resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.28.3.tgz#ecd74cefd020bee4891bb137c9850ee2ce277a8b" - integrity sha512-21GEP45Rmr7q2qcmdnjDkNP04Ooh5v0laGS5FDpojOO84D1DJwUijLiSq8XNNM6e8aGXYtoYRh3sVNdm8NodMA== +sharp@0.29.0: + version "0.29.0" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.29.0.tgz#1fa302bd5f60292138c823aa0905609f64d710ba" + integrity sha512-mdN1Up0eN+SwyForPls59dWO0nx64J1XRQYy5ZiKSADAccGYCB10UAGJHSVG9VObzJdhHqrVJzQcq6gx8USyoA== dependencies: - color "^3.1.3" + color "^4.0.1" detect-libc "^1.0.3" - node-addon-api "^3.2.0" - prebuild-install "^6.1.2" + node-addon-api "^4.0.0" + prebuild-install "^6.1.4" semver "^7.3.5" simple-get "^3.1.0" tar-fs "^2.1.1" @@ -10979,10 +10929,10 @@ ts-loader@9.2.5: micromatch "^4.0.0" semver "^7.3.4" -ts-node@10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.0.tgz#f1e88249a00e26aa95e9a93c50f70241a8a1c4bb" - integrity sha512-FstYHtQz6isj8rBtYMN4bZdnXN1vq4HCbqn9vdNQcInRqtB86PePJQIxE6es0PhxKWhj2PHuwbG40H+bxkZPmg== +ts-node@10.2.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.1.tgz#4cc93bea0a7aba2179497e65bb08ddfc198b3ab5" + integrity sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw== dependencies: "@cspotcode/source-map-support" "0.6.1" "@tsconfig/node10" "^1.0.7" @@ -10997,10 +10947,10 @@ ts-node@10.2.0: make-error "^1.1.1" yn "3.1.1" -tsc-alias@1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/tsc-alias/-/tsc-alias-1.3.8.tgz#8dc670cf217b04a4f3f9e1c56def9cfda1f7759d" - integrity sha512-Ss0jjDjq5inr6ZJEw0IAS3/UxWMLgq4/tsH/yAbXJQHL5yccX+uaU5e2jSYy4VUsxWdZjKXFsUwcslk/4BWfgA== +tsc-alias@1.3.9: + version "1.3.9" + resolved "https://registry.yarnpkg.com/tsc-alias/-/tsc-alias-1.3.9.tgz#0c9d1dd571c0a97af8159d20e7cd4ce6aaab1799" + integrity sha512-PXNsdsuygWpvQrt41D7CBndJyZ+8Juf2BDvQ1OJNqq0QsMR4i+A4rfniY/NVwb70gW4nMDJBvNxxvzLJjakXtQ== dependencies: "@jfonx/console-utils" "^1.0.3" "@jfonx/file-utils" "^3.0.1" @@ -11175,16 +11125,16 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typeorm@0.2.32: - version "0.2.32" - resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.32.tgz#544dbfdfe0cd0887548d9bcbd28527ea4f4b3c9b" - integrity sha512-LOBZKZ9As3f8KRMPCUT2H0JZbZfWfkcUnO3w/1BFAbL/X9+cADTF6bczDGGaKVENJ3P8SaKheKmBgpt5h1x+EQ== +typeorm@0.2.37: + version "0.2.37" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.37.tgz#1a5e59216077640694d27c04c99ed3f968d15dc8" + integrity sha512-7rkW0yCgFC24I5T0f3S/twmLSuccPh1SQmxET/oDWn2sSDVzbyWdnItSdKy27CdJGTlKHYtUVeOcMYw5LRsXVw== dependencies: "@sqltools/formatter" "^1.2.2" app-root-path "^3.0.0" buffer "^6.0.3" chalk "^4.1.0" - cli-highlight "^2.1.10" + cli-highlight "^2.1.11" debug "^4.3.1" dotenv "^8.2.0" glob "^7.1.6" @@ -11195,7 +11145,7 @@ typeorm@0.2.32: tslib "^2.1.0" xml2js "^0.4.23" yargonaut "^1.1.4" - yargs "^16.2.0" + yargs "^17.0.1" zen-observable-ts "^1.0.0" typescript@4.3.5: @@ -11564,14 +11514,14 @@ vue-svg-loader@0.17.0-beta.2: semver "^7.3.2" svgo "^1.3.2" -vue@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.3.tgz#7717e69ab6e8c7ae7ee12baa50a7ab5cab8a1c31" - integrity sha512-z3/maZr+As43eL42pJTLWG+mnOTXpdPvbhFN7cDs8ZpJgMWtKlbjInLcyOD2XRyH424yulupYhyEFITfybcKnw== +vue@3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.4.tgz#d94d88675e41c050d3a722d0848a7063b5e87a60" + integrity sha512-rNCFmoewm8IwmTK0nj3ysKq53iRpNEFKoBJ4inar6tIh7Oj7juubS39RI8UI+VE7x+Cs2z6PBsadtZu7z2qppg== dependencies: - "@vue/compiler-dom" "3.2.3" - "@vue/runtime-dom" "3.2.3" - "@vue/shared" "3.2.3" + "@vue/compiler-dom" "3.2.4" + "@vue/runtime-dom" "3.2.4" + "@vue/shared" "3.2.4" vuedraggable@4.0.1: version "4.0.1" @@ -11643,15 +11593,15 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -webpack-cli@4.7.2: - version "4.7.2" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.7.2.tgz#a718db600de6d3906a4357e059ae584a89f4c1a5" - integrity sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw== +webpack-cli@4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.8.0.tgz#5fc3c8b9401d3c8a43e2afceacfa8261962338d1" + integrity sha512-+iBSWsX16uVna5aAYN6/wjhJy1q/GKk4KjKvfg90/6hykCTSgozbfz5iRgDTSJt/LgSbYxdBX3KBHeobIs+ZEw== dependencies: "@discoveryjs/json-ext" "^0.5.0" "@webpack-cli/configtest" "^1.0.4" "@webpack-cli/info" "^1.3.0" - "@webpack-cli/serve" "^1.5.1" + "@webpack-cli/serve" "^1.5.2" colorette "^1.2.1" commander "^7.0.0" execa "^5.0.0" @@ -11683,10 +11633,10 @@ webpack-sources@^3.2.0: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.0.tgz#b16973bcf844ebcdb3afde32eda1c04d0b90f89d" integrity sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw== -webpack@5.50.0: - version "5.50.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.50.0.tgz#5562d75902a749eb4d75131f5627eac3a3192527" - integrity sha512-hqxI7t/KVygs0WRv/kTgUW8Kl3YC81uyWQSo/7WUs5LsuRw0htH/fCwbVBGCuiX/t4s7qzjXFcf41O8Reiypag== +webpack@5.51.0: + version "5.51.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.51.0.tgz#b6683d92e4bd84db588bacb6ade6441d9c5fd2f3" + integrity sha512-oySQoKUuf5r0JaPIYi8q90c/GmU9fGdSbZ0cAjFq3OWx57wniRTWvta1T9t+e5WZ6H6mHrxksNatkqfIEuTWGg== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" @@ -11885,10 +11835,10 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -ws@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.1.0.tgz#75e5ec608f66d3d3934ec6dbc4ebc8a34a68638c" - integrity sha512-0UWlCD2s3RSclw8FN+D0zDTUyMO+1kHwJQQJzkgUh16S8d3NYON0AKCEQPffE0ez4JyRFu76QDA9KR5bOG/7jw== +ws@8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.0.tgz#0b738cd484bfc9303421914b11bb4011e07615bb" + integrity sha512-uYhVJ/m9oXwEI04iIVmgLmugh2qrZihkywG9y5FfZV2ATeLIzHf93qs+tUNqlttbQK957/VX3mtwAS+UfIwA4g== ws@^7.4.6: version "7.5.3" @@ -12072,6 +12022,19 @@ yargs@^13.2.4: y18n "^4.0.0" yargs-parser "^13.1.2" +yargs@^17.0.1: + version "17.1.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.1.1.tgz#c2a8091564bdb196f7c0a67c1d12e5b85b8067ba" + integrity sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" From 60e768436e4981543993ee74241e599fb5ae3d7f Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 20 Aug 2021 00:22:29 +0900 Subject: [PATCH 13/32] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..8abca405fb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" From fc56b1269084f4556e2a03f6dd3ffd893a5e0063 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 20 Aug 2021 19:38:16 +0900 Subject: [PATCH 14/32] =?UTF-8?q?refactor:=20localStorage=E3=81=AEaccounts?= =?UTF-8?q?=E3=81=AFindexedDB=E3=81=A7=E4=BF=9D=E6=8C=81=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=20(#7609)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * accountsストアはindexedDBで保持するように * fix lint * fix indexeddb available detection * remove debugging code * fix lint * resolve https://github.com/misskey-dev/misskey/pull/7609/files/ba756204b77ce6e1189b8443e9641f2d02119621#diff-f565878e8202f0037b830c780b7c0932dc1bb5fd3d05ede14d72d10efbc3740c Firefoxでの動作を改善 * fix lint * fix lint * add changelog --- CHANGELOG.md | 1 + src/client/account.ts | 57 +++++++++++++++++------ src/client/init.ts | 9 ++++ src/client/pages/settings/accounts.vue | 10 ++-- src/client/scripts/get-account-from-id.ts | 7 +++ src/client/scripts/idb-proxy.ts | 38 +++++++++++++++ src/client/ui/_common_/sidebar.vue | 6 +-- src/client/ui/default.header.vue | 6 +-- src/client/ui/default.sidebar.vue | 6 +-- 9 files changed, 112 insertions(+), 28 deletions(-) create mode 100644 src/client/scripts/get-account-from-id.ts create mode 100644 src/client/scripts/idb-proxy.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 159de1dea4..88dc308f0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Improvements - 依存関係の更新 +- localStorageのaccountsはindexedDBで保持するように ### Bugfixes - チャンネルを作成しているとアカウントを削除できないのを修正 diff --git a/src/client/account.ts b/src/client/account.ts index 2b860b3ddf..cf52c4d828 100644 --- a/src/client/account.ts +++ b/src/client/account.ts @@ -1,7 +1,8 @@ +import { get, set } from '@client/scripts/idb-proxy'; import { reactive } from 'vue'; import { apiUrl } from '@client/config'; import { waiting } from '@client/os'; -import { unisonReload } from '@client/scripts/unison-reload'; +import { unisonReload, reloadChannel } from '@client/scripts/unison-reload'; // TODO: 他のタブと永続化されたstateを同期 @@ -17,22 +18,43 @@ const data = localStorage.getItem('account'); // TODO: 外部からはreadonlyに export const $i = data ? reactive(JSON.parse(data) as Account) : null; -export function signout() { +export async function signout() { + waiting(); localStorage.removeItem('account'); + + //#region Remove account + const accounts = await getAccounts(); + accounts.splice(accounts.findIndex(x => x.id === $i.id), 1); + set('accounts', accounts); + //#endregion + + //#region Remove push notification registration + const registration = await navigator.serviceWorker.ready; + const push = await registration.pushManager.getSubscription(); + if (!push) return; + await fetch(`${apiUrl}/sw/unregister`, { + method: 'POST', + body: JSON.stringify({ + i: $i.token, + endpoint: push.endpoint, + }), + }); + //#endregion + document.cookie = `igi=; path=/`; - location.href = '/'; + + if (accounts.length > 0) login(accounts[0].token); + else unisonReload(); } -export function getAccounts() { - const accountsData = localStorage.getItem('accounts'); - const accounts: { id: Account['id'], token: Account['token'] }[] = accountsData ? JSON.parse(accountsData) : []; - return accounts; +export async function getAccounts(): Promise<{ id: Account['id'], token: Account['token'] }[]> { + return (await get('accounts')) || []; } -export function addAccount(id: Account['id'], token: Account['token']) { - const accounts = getAccounts(); +export async function addAccount(id: Account['id'], token: Account['token']) { + const accounts = await getAccounts(); if (!accounts.some(x => x.id === id)) { - localStorage.setItem('accounts', JSON.stringify(accounts.concat([{ id, token }]))); + await set('accounts', accounts.concat([{ id, token }])); } } @@ -47,7 +69,7 @@ function fetchAccount(token): Promise { }) .then(res => { // When failed to authenticate user - if (res.status >= 400 && res.status < 500) { + if (res.status !== 200 && res.status < 500) { return signout(); } @@ -69,15 +91,22 @@ export function updateAccount(data) { } export function refreshAccount() { - fetchAccount($i.token).then(updateAccount); + return fetchAccount($i.token).then(updateAccount); } -export async function login(token: Account['token']) { +export async function login(token: Account['token'], redirect?: string) { waiting(); if (_DEV_) console.log('logging as token ', token); const me = await fetchAccount(token); localStorage.setItem('account', JSON.stringify(me)); - addAccount(me.id, token); + await addAccount(me.id, token); + + if (redirect) { + reloadChannel.postMessage('reload'); + location.href = redirect; + return; + } + unisonReload(); } diff --git a/src/client/init.ts b/src/client/init.ts index 1580ef3e08..0313af4374 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -4,6 +4,15 @@ import '@client/style.scss'; +//#region account indexedDB migration +import { set } from '@client/scripts/idb-proxy'; + +if (localStorage.getItem('accounts') != null) { + set('accounts', JSON.parse(localStorage.getItem('accounts'))); + localStorage.removeItem('accounts'); +} +//#endregion + import * as Sentry from '@sentry/browser'; import { Integrations } from '@sentry/tracing'; import { computed, createApp, watch, markRaw } from 'vue'; diff --git a/src/client/pages/settings/accounts.vue b/src/client/pages/settings/accounts.vue index 53e28bdf6f..ca6f53776a 100644 --- a/src/client/pages/settings/accounts.vue +++ b/src/client/pages/settings/accounts.vue @@ -48,10 +48,10 @@ export default defineComponent({ title: this.$ts.accounts, icon: 'fas fa-users', }, - storedAccounts: getAccounts().filter(x => x.id !== this.$i.id), + storedAccounts: getAccounts().then(accounts => accounts.filter(x => x.id !== this.$i.id)), accounts: null, - init: () => os.api('users/show', { - userIds: this.storedAccounts.map(x => x.id) + init: async () => os.api('users/show', { + userIds: (await this.storedAccounts).map(x => x.id) }).then(accounts => { this.accounts = accounts; }), @@ -104,8 +104,8 @@ export default defineComponent({ }, 'closed'); }, - switchAccount(account: any) { - const storedAccounts = getAccounts(); + async switchAccount(account: any) { + const storedAccounts = await getAccounts(); const token = storedAccounts.find(x => x.id === account.id).token; this.switchAccountWithToken(token); }, diff --git a/src/client/scripts/get-account-from-id.ts b/src/client/scripts/get-account-from-id.ts new file mode 100644 index 0000000000..065b41118c --- /dev/null +++ b/src/client/scripts/get-account-from-id.ts @@ -0,0 +1,7 @@ +import { get } from '@client/scripts/idb-proxy'; + +export async function getAccountFromId(id: string) { + const accounts = await get('accounts') as { token: string; id: string; }[]; + if (!accounts) console.log('Accounts are not recorded'); + return accounts.find(e => e.id === id); +} diff --git a/src/client/scripts/idb-proxy.ts b/src/client/scripts/idb-proxy.ts new file mode 100644 index 0000000000..21c4dcff65 --- /dev/null +++ b/src/client/scripts/idb-proxy.ts @@ -0,0 +1,38 @@ +// FirefoxのプライベートモードなどではindexedDBが使用不可能なので、 +// indexedDBが使えない環境ではlocalStorageを使う +import { + get as iget, + set as iset, + del as idel, + createStore, +} from 'idb-keyval'; + +const fallbackName = (key: string) => `idbfallback::${key}`; + +let idbAvailable = typeof window !== 'undefined' ? !!window.indexedDB : true; + +if (idbAvailable) { + try { + await createStore('keyval-store', 'keyval'); + } catch (e) { + console.error('idb open error', e); + idbAvailable = false; + } +} + +if (!idbAvailable) console.error('indexedDB is unavailable. It will use localStorage.'); + +export async function get(key: string) { + if (idbAvailable) return iget(key); + return JSON.parse(localStorage.getItem(fallbackName(key))); +} + +export async function set(key: string, val: any) { + if (idbAvailable) return iset(key, val); + return localStorage.setItem(fallbackName(key), JSON.stringify(val)); +} + +export async function del(key: string) { + if (idbAvailable) return idel(key); + return localStorage.removeItem(fallbackName(key)); +} diff --git a/src/client/ui/_common_/sidebar.vue b/src/client/ui/_common_/sidebar.vue index b7b88faeac..333d0ac392 100644 --- a/src/client/ui/_common_/sidebar.vue +++ b/src/client/ui/_common_/sidebar.vue @@ -135,7 +135,7 @@ export default defineComponent({ }, async openAccountMenu(ev) { - const storedAccounts = getAccounts().filter(x => x.id !== this.$i.id); + const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== this.$i.id)); const accountsPromise = os.api('users/show', { userIds: storedAccounts.map(x => x.id) }); const accountItemPromises = storedAccounts.map(a => new Promise(res => { @@ -195,8 +195,8 @@ export default defineComponent({ }, 'closed'); }, - switchAccount(account: any) { - const storedAccounts = getAccounts(); + async switchAccount(account: any) { + const storedAccounts = await getAccounts(); const token = storedAccounts.find(x => x.id === account.id).token; this.switchAccountWithToken(token); }, diff --git a/src/client/ui/default.header.vue b/src/client/ui/default.header.vue index df2e99f13a..6fbdd625c7 100644 --- a/src/client/ui/default.header.vue +++ b/src/client/ui/default.header.vue @@ -101,7 +101,7 @@ export default defineComponent({ }, async openAccountMenu(ev) { - const storedAccounts = getAccounts().filter(x => x.id !== this.$i.id); + const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== this.$i.id)); const accountsPromise = os.api('users/show', { userIds: storedAccounts.map(x => x.id) }); const accountItemPromises = storedAccounts.map(a => new Promise(res => { @@ -161,8 +161,8 @@ export default defineComponent({ }, 'closed'); }, - switchAccount(account: any) { - const storedAccounts = getAccounts(); + async switchAccount(account: any) { + const storedAccounts = await getAccounts(); const token = storedAccounts.find(x => x.id === account.id).token; this.switchAccountWithToken(token); }, diff --git a/src/client/ui/default.sidebar.vue b/src/client/ui/default.sidebar.vue index b500ab582c..be907aa2a4 100644 --- a/src/client/ui/default.sidebar.vue +++ b/src/client/ui/default.sidebar.vue @@ -121,7 +121,7 @@ export default defineComponent({ }, async openAccountMenu(ev) { - const storedAccounts = getAccounts().filter(x => x.id !== this.$i.id); + const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== this.$i.id)); const accountsPromise = os.api('users/show', { userIds: storedAccounts.map(x => x.id) }); const accountItemPromises = storedAccounts.map(a => new Promise(res => { @@ -181,8 +181,8 @@ export default defineComponent({ }, 'closed'); }, - switchAccount(account: any) { - const storedAccounts = getAccounts(); + async switchAccount(account: any) { + const storedAccounts = await getAccounts(); const token = storedAccounts.find(x => x.id === account.id).token; this.switchAccountWithToken(token); }, From 75b9f31acf75899a5ca95bdeae9fd0a368626fdf Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 20 Aug 2021 20:18:24 +0900 Subject: [PATCH 15/32] fix: import syslog-pro --- src/services/logger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/logger.ts b/src/services/logger.ts index 032e43c9ca..229be891e1 100644 --- a/src/services/logger.ts +++ b/src/services/logger.ts @@ -8,7 +8,7 @@ import { Log } from '@/models/entities/log'; import { genId } from '@/misc/gen-id'; import config from '@/config/index'; -import SyslogPro from 'syslog-pro'; +import * as SyslogPro from 'syslog-pro'; type Domain = { name: string; From 1ffee15b8361d532f48f9f0a8d18789765e4ef0e Mon Sep 17 00:00:00 2001 From: Johann150 Date: Fri, 20 Aug 2021 13:55:12 +0200 Subject: [PATCH 16/32] fix: use correct query generate function (#7657) Co-authored-by: syuilo --- src/server/api/endpoints/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/endpoints/users.ts b/src/server/api/endpoints/users.ts index 130ae30244..930dcc7616 100644 --- a/src/server/api/endpoints/users.ts +++ b/src/server/api/endpoints/users.ts @@ -2,7 +2,7 @@ import $ from 'cafy'; import define from '../define'; import { Users } from '@/models/index'; import { generateMutedUserQueryForUsers } from '../common/generate-muted-user-query'; -import { generateBlockedUserQuery } from '../common/generate-block-query'; +import { generateBlockQueryForUsers } from '../common/generate-block-query'; export const meta = { tags: ['users'], @@ -90,7 +90,7 @@ export default define(meta, async (ps, me) => { } if (me) generateMutedUserQueryForUsers(query, me); - if (me) generateBlockedUserQuery(query, me); + if (me) generateBlockQueryForUsers(query, me); query.take(ps.limit!); query.skip(ps.offset); From 3cb5ed167af31782acecbc2ccbc2e7a89ba6d633 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 20 Aug 2021 21:34:56 +0900 Subject: [PATCH 17/32] =?UTF-8?q?fix:=20meta.json=E3=82=92import=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #7671 --- CONTRIBUTING.md | 3 +++ src/boot/master.ts | 10 +++++++++- src/config/load.ts | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b16d9a75d8..b3c67ff4d7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -250,6 +250,9 @@ npx ts-node ./node_modules/typeorm/cli.js migration:generate -n 変更の名前 ### コネクションには`markRaw`せよ **Vueのコンポーネントのdataオプションとして**misskey.jsのコネクションを設定するとき、必ず`markRaw`でラップしてください。インスタンスが不必要にリアクティブ化されることで、misskey.js内の処理で不具合が発生するとともに、パフォーマンス上の問題にも繋がる。なお、Composition APIを使う場合はこの限りではない(リアクティブ化はマニュアルなため)。 +### JSONのimportに気を付けよう +TypeScriptでjsonをimportすると、tscでコンパイルするときにそのjsonファイルも一緒にdistディレクトリに吐き出されてしまう。この挙動により、意図せずファイルの書き換えが発生することがあるので、jsonをimportするときは書き換えられても良いものかどうか確認すること。書き換えされて欲しくない場合は、importで読み込むのではなく、`fs.readFileSync`などの関数を使って読み込むようにすればよい。 + ## その他 ### HTMLのクラス名で follow という単語は使わない 広告ブロッカーで誤ってブロックされる diff --git a/src/boot/master.ts b/src/boot/master.ts index 03a28c339b..d9cc7c16be 100644 --- a/src/boot/master.ts +++ b/src/boot/master.ts @@ -1,3 +1,6 @@ +import * as fs from 'fs'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; import * as os from 'os'; import * as cluster from 'cluster'; import * as chalk from 'chalk'; @@ -11,7 +14,12 @@ 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 _filename = fileURLToPath(import.meta.url); +const _filename = __filename; +const _dirname = dirname(_filename); + +const meta = JSON.parse(fs.readFileSync(`${_dirname}/../meta.json`, 'utf-8')); const logger = new Logger('core', 'cyan'); const bootLogger = logger.createSubLogger('boot', 'magenta', false); diff --git a/src/config/load.ts b/src/config/load.ts index 6a1cf60a41..c7965e6c41 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -7,7 +7,6 @@ import { fileURLToPath } from 'url'; import { dirname } from 'path'; import * as yaml from 'js-yaml'; import { Source, Mixin } from './types'; -import * as meta from '../meta.json'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; @@ -26,6 +25,7 @@ const path = process.env.NODE_ENV === 'test' : `${dir}/default.yml`; export default function load() { + const meta = JSON.parse(fs.readFileSync(`${_dirname}/../meta.json`, 'utf-8')); const config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source; const mixin = {} as Mixin; From 0e690914554802587db735947771203e16e59346 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 20 Aug 2021 21:40:45 +0900 Subject: [PATCH 18/32] doc: add features/word-mute (#7672) --- src/docs/ja-JP/features/word-mute.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/docs/ja-JP/features/word-mute.md diff --git a/src/docs/ja-JP/features/word-mute.md b/src/docs/ja-JP/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/ja-JP/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 From bb2db1cf76a94af9133017897db5e4952b0d1532 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 20 Aug 2021 21:59:03 +0900 Subject: [PATCH 19/32] perf: Tune AP job queue timings (#7635) * perf: Tune AP job queue timings * CHANGELOG * chore: add reference Co-authored-by: syuilo --- CHANGELOG.md | 1 + src/queue/index.ts | 6 ++---- src/queue/initialize.ts | 21 ++++++++++++++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88dc308f0e..47372dda56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Improvements - 依存関係の更新 - localStorageのaccountsはindexedDBで保持するように +- ActivityPub: ジョブキューの試行タイミングを調整 (#7635) ### Bugfixes - チャンネルを作成しているとアカウントを削除できないのを修正 diff --git a/src/queue/index.ts b/src/queue/index.ts index 2facd9c8e1..ff96c0fb15 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -73,8 +73,7 @@ export function deliver(user: ThinUser, content: unknown, to: string | null) { attempts: config.deliverJobMaxAttempts || 12, timeout: 1 * 60 * 1000, // 1min backoff: { - type: 'exponential', - delay: 60 * 1000 + type: 'apBackoff' }, removeOnComplete: true, removeOnFail: true @@ -91,8 +90,7 @@ export function inbox(activity: IActivity, signature: httpSignature.IParsedSigna attempts: config.inboxJobMaxAttempts || 8, timeout: 5 * 60 * 1000, // 5min backoff: { - type: 'exponential', - delay: 60 * 1000 + type: 'apBackoff' }, removeOnComplete: true, removeOnFail: true diff --git a/src/queue/initialize.ts b/src/queue/initialize.ts index 5fe5a9f6f3..31102a3ed2 100644 --- a/src/queue/initialize.ts +++ b/src/queue/initialize.ts @@ -11,8 +11,23 @@ export function initialize(name: string, limitPerSec = -1) { }, prefix: config.redis.prefix ? `${config.redis.prefix}:queue` : 'queue', limiter: limitPerSec > 0 ? { - max: limitPerSec * 5, - duration: 5000 - } : undefined + max: limitPerSec, + duration: 1000 + } : undefined, + settings: { + backoffStrategies: { + apBackoff + } + } }); } + +// ref. https://github.com/misskey-dev/misskey/pull/7635#issue-971097019 +function apBackoff(attemptsMade: number, err: Error) { + const baseDelay = 60 * 1000; // 1min + const maxBackoff = 8 * 60 * 60 * 1000; // 8hours + let backoff = (Math.pow(2, attemptsMade) - 1) * baseDelay; + backoff = Math.min(backoff, maxBackoff); + backoff += Math.round(backoff * Math.random() * 0.2); + return backoff; +} From cf0a5d5735a0eb18e21c07c09e7261c02ec84479 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 23:15:17 +0900 Subject: [PATCH 20/32] Bump @redocly/openapi-core from 1.0.0-beta.44 to 1.0.0-beta.54 (#7665) Bumps [@redocly/openapi-core](https://github.com/Redocly/openapi-cli) from 1.0.0-beta.44 to 1.0.0-beta.54. - [Release notes](https://github.com/Redocly/openapi-cli/releases) - [Changelog](https://github.com/Redocly/openapi-cli/blob/master/docs/changelog.md) - [Commits](https://github.com/Redocly/openapi-cli/compare/v1.0.0-beta.44...v1.0.0-beta.54) --- updated-dependencies: - dependency-name: "@redocly/openapi-core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 53 +++++++++++++++------------------------------------- 2 files changed, 16 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 4135c47303..e73116cc26 100644 --- a/package.json +++ b/package.json @@ -245,7 +245,7 @@ "xev": "2.0.1" }, "devDependencies": { - "@redocly/openapi-core": "1.0.0-beta.44", + "@redocly/openapi-core": "1.0.0-beta.54", "@types/fluent-ffmpeg": "2.1.17", "cross-env": "7.0.3", "cypress": "8.3.0", diff --git a/yarn.lock b/yarn.lock index 09fd32f7aa..ccfee76557 100644 --- a/yarn.lock +++ b/yarn.lock @@ -241,26 +241,26 @@ mkdirp "^1.0.4" rimraf "^3.0.2" -"@redocly/ajv@^6.12.3": - version "6.12.4" - resolved "https://registry.yarnpkg.com/@redocly/ajv/-/ajv-6.12.4.tgz#b131c9c11d1bdaa5564f69bcaefe10a4c9a5aa65" - integrity sha512-RB6vWO78v6c+SW/3bZh+XZMr4nGdJKAiPGsBALuUZnLuCiQ7aXCT1AuFHqnfS2gyXbEUEj+kw8p4ux8KdAfs3A== +"@redocly/ajv@^8.6.2": + version "8.6.2" + resolved "https://registry.yarnpkg.com/@redocly/ajv/-/ajv-8.6.2.tgz#8c4e485e72f7864f91fae40093bed548ec2619b2" + integrity sha512-tU8fQs0D76ZKhJ2cWtnfQthWqiZgGBx0gH0+5D8JvaBEBaqA8foPPBt3Nonwr3ygyv5xrw2IzKWgIY86BlGs+w== dependencies: fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" uri-js "^4.2.2" -"@redocly/openapi-core@1.0.0-beta.44": - version "1.0.0-beta.44" - resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.44.tgz#e9a6c50ee2bb18e93b3439ed92c53e440de3aa7a" - integrity sha512-9HNnh1MzvMsLK1liuidFBqWiAsZ2Yg3RY58fcEsy0QruSMdDbn7SoeI1qnXe6O+BkBS+vAP4oVzZDMHCMKGsOQ== +"@redocly/openapi-core@1.0.0-beta.54": + version "1.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.54.tgz#42575a849c4dd54b9d0c6413fb8ca547e087cd11" + integrity sha512-uYs0N1Trjkh7u8IMIuCU2VxCXhMyGWSZUkP/WNdTR1OgBUtvNdF9C32zoQV+hyCIH4gVu42ROHkjisy333ZX+w== dependencies: - "@redocly/ajv" "^6.12.3" + "@redocly/ajv" "^8.6.2" "@types/node" "^14.11.8" colorette "^1.2.0" js-levenshtein "^1.1.6" - js-yaml "^3.14.0" + js-yaml "^3.14.1" lodash.isequal "^4.5.0" minimatch "^3.0.4" node-fetch "^2.6.1" @@ -864,31 +864,16 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*": - version "14.14.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055" - integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== - -"@types/node@16.6.2": +"@types/node@*", "@types/node@16.6.2": version "16.6.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.2.tgz#331b7b9f8621c638284787c5559423822fdffc50" integrity sha512-LSw8TZt12ZudbpHc6EkIyDM3nHVWKYrAvGy6EAJfNfjusbwnThqjqxUKKRwuV3iWYeW/LYMzNgaq3MaLffQ2xA== -"@types/node@^14.11.8": - version "14.14.44" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.44.tgz#df7503e6002847b834371c004b372529f3f85215" - integrity sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA== - -"@types/node@^14.14.31": +"@types/node@^14.11.8", "@types/node@^14.14.31", "@types/node@^14.14.41": version "14.17.9" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.9.tgz#b97c057e6138adb7b720df2bd0264b03c9f504fd" integrity sha512-CMjgRNsks27IDwI785YMY0KLt3co/c0cQ5foxHYv/shC2w8oOnVwz5Ubq1QG5KzrcW+AXk6gzdnxIkDnTvzu3g== -"@types/node@^14.14.41": - version "14.17.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.0.tgz#3ba770047723b3eeb8dc9fca02cce8a7fb6378da" - integrity sha512-w8VZUN/f7SSbvVReb9SWp6cJFevxb4/nkG65yLAya//98WgocKm5PLDAtSs5CtJJJM+kHmJjO/6mmYW4MHShZA== - "@types/nodemailer@6.4.4": version "6.4.4" resolved "https://registry.yarnpkg.com/@types/nodemailer/-/nodemailer-6.4.4.tgz#c265f7e7a51df587597b3a49a023acaf0c741f4b" @@ -6237,15 +6222,7 @@ js-yaml@4.1.0, js-yaml@^4.0.0: dependencies: argparse "^2.0.1" -js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^3.14.0: +js-yaml@^3.13.1, js-yaml@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== From 04855f920144cd3d040d9896157f186c1ceebc88 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 10:29:26 +0900 Subject: [PATCH 21/32] enhance(client): Improve emoji autocomplete behaviour cherry picked from https://github.com/kat-atat/misskey/commit/4b2c215e25a0bae47f4375b296d1f5d07a179f88 --- CHANGELOG.md | 3 ++- src/client/scripts/autocomplete.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47372dda56..e77ee9b247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,10 @@ ## 12.x.x (unreleased) ### Improvements -- 依存関係の更新 +- 絵文字オートコンプリートの挙動を改修 - localStorageのaccountsはindexedDBで保持するように - ActivityPub: ジョブキューの試行タイミングを調整 (#7635) +- 依存関係の更新 ### Bugfixes - チャンネルを作成しているとアカウントを削除できないのを修正 diff --git a/src/client/scripts/autocomplete.ts b/src/client/scripts/autocomplete.ts index 99c54c69c5..924d6a62ee 100644 --- a/src/client/scripts/autocomplete.ts +++ b/src/client/scripts/autocomplete.ts @@ -65,7 +65,7 @@ export class Autocomplete { */ private onInput() { const caretPos = this.textarea.selectionStart; - const text = this.text.substr(0, caretPos).split('\n').pop(); + const text = this.text.substr(0, caretPos).split('\n').pop()!; const mentionIndex = text.lastIndexOf('@'); const hashtagIndex = text.lastIndexOf('#'); @@ -83,7 +83,7 @@ export class Autocomplete { const isMention = mentionIndex != -1; const isHashtag = hashtagIndex != -1; - const isEmoji = emojiIndex != -1; + const isEmoji = emojiIndex != -1 && text.split(/:[a-z0-9_+\-]+:/).pop()!.includes(':'); let opened = false; From 47dd30d3b2eb1ada91b621e5201add5a014b587d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 11:16:56 +0900 Subject: [PATCH 22/32] =?UTF-8?q?fix(client):=20=E3=83=8E=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=AE=E3=80=8C=E5=89=8A=E9=99=A4=E3=81=97=E3=81=A6?= =?UTF-8?q?=E7=B7=A8=E9=9B=86=E3=80=8D=E3=82=92=E3=81=99=E3=82=8B=E3=81=A8?= =?UTF-8?q?=E3=82=A2=E3=83=B3=E3=82=B1=E3=83=BC=E3=83=88=E3=81=AE=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E8=82=A2=E3=81=8C[object=20Object]=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #7037 --- CHANGELOG.md | 1 + src/client/components/post-form.vue | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e77ee9b247..21f3add690 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ### Bugfixes - チャンネルを作成しているとアカウントを削除できないのを修正 +- ノートの「削除して編集」をするとアンケートの選択肢が[object Object]になる問題を修正 ## 12.88.0 (2021/08/17) diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index 221dc74313..657053cc93 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -339,7 +339,12 @@ export default defineComponent({ this.cw = init.cw; this.useCw = init.cw != null; if (init.poll) { - this.poll = init.poll; + this.poll = { + choices: init.poll.choices.map(x => x.text), + multiple: init.poll.multiple, + expiresAt: init.poll.expiresAt, + expiredAfter: init.poll.expiredAfter, + }; } this.visibility = init.visibility; this.localOnly = init.localOnly; From 8ab9068d8e1a8362cbbb413d7abdc72233e9fa6e Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 11:51:46 +0900 Subject: [PATCH 23/32] fix bug --- src/client/account.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/client/account.ts b/src/client/account.ts index cf52c4d828..7cd3d8cb88 100644 --- a/src/client/account.ts +++ b/src/client/account.ts @@ -29,16 +29,18 @@ export async function signout() { //#endregion //#region Remove push notification registration - const registration = await navigator.serviceWorker.ready; - const push = await registration.pushManager.getSubscription(); - if (!push) return; - await fetch(`${apiUrl}/sw/unregister`, { - method: 'POST', - body: JSON.stringify({ - i: $i.token, - endpoint: push.endpoint, - }), - }); + try { + const registration = await navigator.serviceWorker.ready; + const push = await registration.pushManager.getSubscription(); + if (!push) return; + await fetch(`${apiUrl}/sw/unregister`, { + method: 'POST', + body: JSON.stringify({ + i: $i.token, + endpoint: push.endpoint, + }), + }); + } catch (e) {} //#endregion document.cookie = `igi=; path=/`; From fd1ef4a62d670aab5f0c0089ab3806639c779813 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 12:41:56 +0900 Subject: [PATCH 24/32] enhance(server): Use job queue for account delete (#7668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance(server): Use job queue for account delete Fix #5336 * ジョブをひとつに * remove done call * clean up * add User.isDeleted * コミット忘れ * Update 1629512953000-user-is-deleted.ts * show dialog * lint * Update 1629512953000-user-is-deleted.ts --- CHANGELOG.md | 1 + locales/ja-JP.yml | 1 + migration/1629512953000-user-is-deleted.ts | 15 ++++ src/client/account.ts | 1 + src/client/init.ts | 7 ++ src/models/entities/user.ts | 7 ++ src/models/repositories/user.ts | 1 + src/queue/index.ts | 9 +++ src/queue/processors/db/delete-account.ts | 79 ++++++++++++++++++++ src/queue/processors/db/index.ts | 4 +- src/server/api/endpoints/i/delete-account.ts | 13 +++- 11 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 migration/1629512953000-user-is-deleted.ts create mode 100644 src/queue/processors/db/delete-account.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 21f3add690..54c0554e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ## 12.x.x (unreleased) ### Improvements +- アカウント削除の安定性を向上 - 絵文字オートコンプリートの挙動を改修 - localStorageのaccountsはindexedDBで保持するように - ActivityPub: ジョブキューの試行タイミングを調整 (#7635) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 7499523b08..f27fc0abe0 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -777,6 +777,7 @@ misskeyUpdated: "Misskeyが更新されました!" whatIsNew: "更新情報を見る" translate: "翻訳" translatedFrom: "{x}から翻訳" +accountDeletionInProgress: "アカウントの削除が進行中です" _docs: continueReading: "続きを読む" diff --git a/migration/1629512953000-user-is-deleted.ts b/migration/1629512953000-user-is-deleted.ts new file mode 100644 index 0000000000..10b7d1d7b7 --- /dev/null +++ b/migration/1629512953000-user-is-deleted.ts @@ -0,0 +1,15 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class isUserDeleted1629512953000 implements MigrationInterface { + name = 'isUserDeleted1629512953000' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user" ADD "isDeleted" boolean NOT NULL DEFAULT false`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isDeleted" IS 'Whether the User is deleted.'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isDeleted"`); + } + +} diff --git a/src/client/account.ts b/src/client/account.ts index 7cd3d8cb88..ee1d845493 100644 --- a/src/client/account.ts +++ b/src/client/account.ts @@ -11,6 +11,7 @@ type Account = { token: string; isModerator: boolean; isAdmin: boolean; + isDeleted: boolean; }; const data = localStorage.getItem('account'); diff --git a/src/client/init.ts b/src/client/init.ts index 0313af4374..194ece886b 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -310,6 +310,13 @@ for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) { } if ($i) { + if ($i.isDeleted) { + dialog({ + type: 'warning', + text: i18n.locale.accountDeletionInProgress, + }); + } + if ('Notification' in window) { // 許可を得ていなかったらリクエスト if (Notification.permission === 'default') { diff --git a/src/models/entities/user.ts b/src/models/entities/user.ts index 060ec06b9a..65aebd2d1a 100644 --- a/src/models/entities/user.ts +++ b/src/models/entities/user.ts @@ -175,6 +175,13 @@ export class User { }) public isExplorable: boolean; + // アカウントが削除されたかどうかのフラグだが、完全に削除される際は物理削除なので実質削除されるまでの「削除が進行しているかどうか」のフラグ + @Column('boolean', { + default: false, + comment: 'Whether the User is deleted.' + }) + public isDeleted: boolean; + @Column('varchar', { length: 128, array: true, default: '{}' }) diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index f56090bb82..d4bb995ce2 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -252,6 +252,7 @@ export class UserRepository extends Repository { autoAcceptFollowed: profile!.autoAcceptFollowed, noCrawle: profile!.noCrawle, isExplorable: user.isExplorable, + isDeleted: user.isDeleted, hideOnlineStatus: user.hideOnlineStatus, hasUnreadSpecifiedNotes: NoteUnreads.count({ where: { userId: user.id, isSpecified: true }, diff --git a/src/queue/index.ts b/src/queue/index.ts index ff96c0fb15..4ca7998e61 100644 --- a/src/queue/index.ts +++ b/src/queue/index.ts @@ -171,6 +171,15 @@ export function createImportUserListsJob(user: ThinUser, fileId: DriveFile['id'] }); } +export function createDeleteAccountJob(user: ThinUser) { + return dbQueue.add('deleteAccount', { + user: user + }, { + removeOnComplete: true, + removeOnFail: true + }); +} + export function createDeleteObjectStorageFileJob(key: string) { return objectStorageQueue.add('deleteFile', { key: key diff --git a/src/queue/processors/db/delete-account.ts b/src/queue/processors/db/delete-account.ts new file mode 100644 index 0000000000..95614b61aa --- /dev/null +++ b/src/queue/processors/db/delete-account.ts @@ -0,0 +1,79 @@ +import * as Bull from 'bull'; +import { queueLogger } from '../../logger'; +import { DriveFiles, Notes, Users } from '@/models/index'; +import { DbUserJobData } from '@/queue/types'; +import { Note } from '@/models/entities/note'; +import { DriveFile } from '@/models/entities/drive-file'; +import { MoreThan } from 'typeorm'; +import { deleteFileSync } from '@/services/drive/delete-file'; + +const logger = queueLogger.createSubLogger('delete-account'); + +export async function deleteAccount(job: Bull.Job): Promise { + logger.info(`Deleting account of ${job.data.user.id} ...`); + + const user = await Users.findOne(job.data.user.id); + if (user == null) { + return; + } + + { // Delete notes + let cursor: Note['id'] | null = null; + + while (true) { + const notes = await Notes.find({ + where: { + userId: user.id, + ...(cursor ? { id: MoreThan(cursor) } : {}) + }, + take: 100, + order: { + id: 1 + } + }); + + if (notes.length === 0) { + break; + } + + cursor = notes[notes.length - 1].id; + + await Notes.delete(notes.map(note => note.id)); + } + + logger.succ(`All of notes deleted`); + } + + { // Delete files + let cursor: DriveFile['id'] | null = null; + + while (true) { + const files = await DriveFiles.find({ + where: { + userId: user.id, + ...(cursor ? { id: MoreThan(cursor) } : {}) + }, + take: 10, + order: { + id: 1 + } + }); + + if (files.length === 0) { + break; + } + + cursor = files[files.length - 1].id; + + for (const file of files) { + await deleteFileSync(file); + } + } + + logger.succ(`All of files deleted`); + } + + await Users.delete(job.data.user.id); + + return 'Account deleted'; +} diff --git a/src/queue/processors/db/index.ts b/src/queue/processors/db/index.ts index b56b7bfa2c..b051a28e0b 100644 --- a/src/queue/processors/db/index.ts +++ b/src/queue/processors/db/index.ts @@ -8,6 +8,7 @@ import { exportBlocking } from './export-blocking'; import { exportUserLists } from './export-user-lists'; import { importFollowing } from './import-following'; import { importUserLists } from './import-user-lists'; +import { deleteAccount } from './delete-account'; const jobs = { deleteDriveFiles, @@ -17,7 +18,8 @@ const jobs = { exportBlocking, exportUserLists, importFollowing, - importUserLists + importUserLists, + deleteAccount, } as Record | Bull.ProcessPromiseFunction>; export default function(dbQueue: Bull.Queue) { diff --git a/src/server/api/endpoints/i/delete-account.ts b/src/server/api/endpoints/i/delete-account.ts index f761e5cc34..77f11925cd 100644 --- a/src/server/api/endpoints/i/delete-account.ts +++ b/src/server/api/endpoints/i/delete-account.ts @@ -1,9 +1,10 @@ import $ from 'cafy'; import * as bcrypt from 'bcryptjs'; import define from '../../define'; -import { Users, UserProfiles } from '@/models/index'; +import { UserProfiles, Users } from '@/models/index'; import { doPostSuspend } from '@/services/suspend-user'; import { publishUserEvent } from '@/services/stream'; +import { createDeleteAccountJob } from '@/queue'; export const meta = { requireCredential: true as const, @@ -19,6 +20,10 @@ export const meta = { export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); + const userDetailed = await Users.findOneOrFail(user.id); + if (userDetailed.isDeleted) { + return; + } // Compare password const same = await bcrypt.compare(ps.password, profile.password!); @@ -30,7 +35,11 @@ export default define(meta, async (ps, user) => { // 物理削除する前にDelete activityを送信する await doPostSuspend(user).catch(e => {}); - await Users.delete(user.id); + createDeleteAccountJob(user); + + await Users.update(user.id, { + isDeleted: true, + }); // Terminate streaming publishUserEvent(user.id, 'terminate', {}); From a53e1e4ec33575de0ff79fb0ec85833e3d6e22cd Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 12:48:50 +0900 Subject: [PATCH 25/32] enhance: Improve account deletion experience --- locales/ja-JP.yml | 8 +++ src/client/pages/settings/delete-account.vue | 67 ++++++++++++++++++++ src/client/pages/settings/index.vue | 1 + src/client/pages/settings/other.vue | 19 +----- src/queue/processors/db/delete-account.ts | 12 +++- 5 files changed, 88 insertions(+), 19 deletions(-) create mode 100644 src/client/pages/settings/delete-account.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f27fc0abe0..35739d2760 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -779,6 +779,14 @@ translate: "翻訳" translatedFrom: "{x}から翻訳" accountDeletionInProgress: "アカウントの削除が進行中です" +_accountDelete: + accountDelete: "アカウントの削除" + mayTakeTime: "アカウントの削除は負荷のかかる処理であるため、作成したコンテンツの数やアップロードしたファイルの数が多いと完了までに時間がかかることがあります。" + sendEmail: "アカウントの削除が完了する際は、登録してあったメールアドレス宛に通知を送信します。" + requestAccountDelete: "アカウント削除をリクエスト" + started: "削除処理が開始されました。" + inProgress: "削除が進行中" + _docs: continueReading: "続きを読む" features: "機能" diff --git a/src/client/pages/settings/delete-account.vue b/src/client/pages/settings/delete-account.vue new file mode 100644 index 0000000000..3af1879857 --- /dev/null +++ b/src/client/pages/settings/delete-account.vue @@ -0,0 +1,67 @@ + + + diff --git a/src/client/pages/settings/index.vue b/src/client/pages/settings/index.vue index 17b373fcd8..e7e2506020 100644 --- a/src/client/pages/settings/index.vue +++ b/src/client/pages/settings/index.vue @@ -132,6 +132,7 @@ export default defineComponent({ case 'account-info': return defineAsyncComponent(() => import('./account-info.vue')); case 'update': return defineAsyncComponent(() => import('./update.vue')); case 'registry': return defineAsyncComponent(() => import('./registry.vue')); + case 'delete-account': return defineAsyncComponent(() => import('./delete-account.vue')); case 'experimental-features': return defineAsyncComponent(() => import('./experimental-features.vue')); } if (page.value.startsWith('registry/keys/system/')) { diff --git a/src/client/pages/settings/other.vue b/src/client/pages/settings/other.vue index f73ff9cb21..6857950350 100644 --- a/src/client/pages/settings/other.vue +++ b/src/client/pages/settings/other.vue @@ -26,7 +26,7 @@ BIOS CLI - {{ $ts.closeAccount }} + {{ $ts.closeAccount }} @@ -41,7 +41,6 @@ import FormButton from '@client/components/form/button.vue'; import * as os from '@client/os'; import { debug } from '@client/config'; import { defaultStore } from '@client/store'; -import { signout } from '@client/account'; import { unisonReload } from '@client/scripts/unison-reload'; import * as symbols from '@client/symbols'; @@ -92,22 +91,6 @@ export default defineComponent({ os.popup(import('@client/components/taskmanager.vue'), { }, {}, 'closed'); }, - - closeAccount() { - os.dialog({ - title: this.$ts.password, - input: { - type: 'password' - } - }).then(({ canceled, result: password }) => { - if (canceled) return; - os.api('i/delete-account', { - password: password - }).then(() => { - signout(); - }); - }); - } } }); diff --git a/src/queue/processors/db/delete-account.ts b/src/queue/processors/db/delete-account.ts index 95614b61aa..65327754c2 100644 --- a/src/queue/processors/db/delete-account.ts +++ b/src/queue/processors/db/delete-account.ts @@ -1,11 +1,12 @@ import * as Bull from 'bull'; import { queueLogger } from '../../logger'; -import { DriveFiles, Notes, Users } from '@/models/index'; +import { DriveFiles, Notes, UserProfiles, Users } from '@/models/index'; import { DbUserJobData } from '@/queue/types'; import { Note } from '@/models/entities/note'; import { DriveFile } from '@/models/entities/drive-file'; import { MoreThan } from 'typeorm'; import { deleteFileSync } from '@/services/drive/delete-file'; +import { sendEmail } from '@/services/send-email'; const logger = queueLogger.createSubLogger('delete-account'); @@ -73,6 +74,15 @@ export async function deleteAccount(job: Bull.Job): Promise Date: Sat, 21 Aug 2021 01:24:03 -0400 Subject: [PATCH 26/32] Update setup.en.md (#7675) Updated PostgreSQL version to 12 See https://github.com/misskey-dev/misskey/issues/7632#issuecomment-901653826 --- docs/setup.en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.en.md b/docs/setup.en.md index bd36f0f006..bb72fcda1e 100644 --- a/docs/setup.en.md +++ b/docs/setup.en.md @@ -24,7 +24,7 @@ Please install and setup these softwares: #### Dependencies :package: * **[Node.js](https://nodejs.org/en/)** (12.x, 14.x) -* **[PostgreSQL](https://www.postgresql.org/)** (>= 10) +* **[PostgreSQL](https://www.postgresql.org/)** (12.x / 13.x is preferred) * **[Redis](https://redis.io/)** ##### Optional From d2007add75574df0be23354fd2b9176ea5225dfa Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 21 Aug 2021 14:47:18 +0900 Subject: [PATCH 27/32] feat: Implement api sw/unregister (#7611) * Implement api sw/unregister * remove all mode * add changelog Co-authored-by: syuilo --- CHANGELOG.md | 1 + src/server/api/endpoints/sw/unregister.ts | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/server/api/endpoints/sw/unregister.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c0554e8a..34a69f1d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - 絵文字オートコンプリートの挙動を改修 - localStorageのaccountsはindexedDBで保持するように - ActivityPub: ジョブキューの試行タイミングを調整 (#7635) +- API: sw/unregisterを追加 - 依存関係の更新 ### Bugfixes diff --git a/src/server/api/endpoints/sw/unregister.ts b/src/server/api/endpoints/sw/unregister.ts new file mode 100644 index 0000000000..a206254950 --- /dev/null +++ b/src/server/api/endpoints/sw/unregister.ts @@ -0,0 +1,27 @@ +import $ from 'cafy'; +import define from '../../define'; +import { SwSubscriptions } from '../../../../models'; + +export const meta = { + tags: ['account'], + + requireCredential: true as const, + + desc: { + 'ja-JP': 'Push通知の登録を削除します。', + 'en-US': 'Remove push noticfication registration' + }, + + params: { + endpoint: { + validator: $.str + }, + } +}; + +export default define(meta, async (ps, user) => { + await SwSubscriptions.delete({ + userId: user.id, + endpoint: ps.endpoint, + }); +}); From bae1282f74c95df9e9241be637205a174ce59fea Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 14:47:39 +0900 Subject: [PATCH 28/32] clean up --- src/server/api/endpoints/sw/unregister.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/server/api/endpoints/sw/unregister.ts b/src/server/api/endpoints/sw/unregister.ts index a206254950..817ad1f517 100644 --- a/src/server/api/endpoints/sw/unregister.ts +++ b/src/server/api/endpoints/sw/unregister.ts @@ -7,11 +7,6 @@ export const meta = { requireCredential: true as const, - desc: { - 'ja-JP': 'Push通知の登録を削除します。', - 'en-US': 'Remove push noticfication registration' - }, - params: { endpoint: { validator: $.str From eeff88ece252d8df4d7fe2298d8a6fc82cef6f55 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 14:52:41 +0900 Subject: [PATCH 29/32] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34a69f1d02..3a29234110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - localStorageのaccountsはindexedDBで保持するように - ActivityPub: ジョブキューの試行タイミングを調整 (#7635) - API: sw/unregisterを追加 +- ワードミュートのドキュメントを追加 - 依存関係の更新 ### Bugfixes From f6128dd3ff9ad4df1cbb956f46e2ea34d59368aa Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 17:40:15 +0900 Subject: [PATCH 30/32] :art: --- CHANGELOG.md | 1 + src/client/components/notes.vue | 2 ++ src/client/components/notifications.vue | 6 +++- src/client/pages/notifications.vue | 18 ++++++++++-- src/client/pages/timeline.vue | 39 ++++++++++++++++--------- 5 files changed, 49 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a29234110..9ac26311ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - ActivityPub: ジョブキューの試行タイミングを調整 (#7635) - API: sw/unregisterを追加 - ワードミュートのドキュメントを追加 +- クライアントのデザインの調整 - 依存関係の更新 ### Bugfixes diff --git a/src/client/components/notes.vue b/src/client/components/notes.vue index ba3b7d2b39..919cb29952 100644 --- a/src/client/components/notes.vue +++ b/src/client/components/notes.vue @@ -118,6 +118,8 @@ export default defineComponent({ &:not(.noGap) { > .notes { + background: var(--bg); + .qtqtichx { background: var(--panel); border-radius: var(--radius); diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue index 9db47e08d6..e91f18a693 100644 --- a/src/client/components/notifications.vue +++ b/src/client/components/notifications.vue @@ -7,7 +7,7 @@

{{ $ts.noNotifications }}

- + @@ -141,4 +141,8 @@ export default defineComponent({ text-align: center; color: var(--fg); } + +.elsfgstc { + background: var(--panel); +} diff --git a/src/client/pages/notifications.vue b/src/client/pages/notifications.vue index 6b16b85b78..633718a90b 100644 --- a/src/client/pages/notifications.vue +++ b/src/client/pages/notifications.vue @@ -1,6 +1,6 @@ @@ -43,3 +43,17 @@ export default defineComponent({ } }); + + diff --git a/src/client/pages/timeline.vue b/src/client/pages/timeline.vue index 119815e2ae..f54549b982 100644 --- a/src/client/pages/timeline.vue +++ b/src/client/pages/timeline.vue @@ -1,5 +1,5 @@ @@ -231,6 +233,7 @@ export default defineComponent({ padding: 0 8px; white-space: nowrap; overflow: auto; + border-bottom: solid 0.5px var(--divider); // 影の都合上 position: relative; @@ -287,8 +290,16 @@ export default defineComponent({ } } - > .tl { - border-top: solid 0.5px var(--divider); + &.min-width_800px { + > .tl { + background: var(--bg); + padding: 32px 0; + + > .tl { + max-width: 800px; + margin: 0 auto; + } + } } } From a59dfff12fd8a3d08e3b951bc66af1e7dd13d5d9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 17:58:32 +0900 Subject: [PATCH 31/32] New Crowdin updates (#7646) * New translations mute-and-block.md (Ukrainian) * New translations mute-and-block.md (Czech) * New translations mute-and-block.md (Danish) * New translations mute-and-block.md (German) * New translations mute-and-block.md (Italian) * New translations mute-and-block.md (Korean) * New translations mute-and-block.md (Dutch) * New translations mute-and-block.md (Norwegian) * New translations mute-and-block.md (Polish) * New translations mute-and-block.md (Portuguese) * New translations mute-and-block.md (Russian) * New translations mute-and-block.md (Chinese Simplified) * New translations mute-and-block.md (Spanish) * New translations mute-and-block.md (Chinese Traditional) * New translations mute-and-block.md (English) * New translations mute-and-block.md (Indonesian) * New translations mute-and-block.md (Thai) * New translations mute-and-block.md (Esperanto) * New translations mute-and-block.md (Uyghur) * New translations mute-and-block.md (Lojban) * New translations mute-and-block.md (Kannada) * New translations mute-and-block.md (Haitian Creole) * New translations mute-and-block.md (Kabyle) * New translations mute-and-block.md (Arabic) * New translations mute-and-block.md (French) * New translations mute-and-block.md (Japanese, Kansai) * New translations glossary.md (German) * New translations links.md (German) * New translations links.md (English) * New translations report-issue.md (German) * New translations changelog.md (German) * New translations apps.md (German) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations disable-timelines.md (Japanese, Kansai) * New translations disable-timelines.md (Japanese, Kansai) * New translations faq.md (Japanese, Kansai) * New translations aiscript.md (Japanese, Kansai) * New translations faq.md (Japanese, Kansai) * New translations misskey.md (Japanese, Kansai) * New translations aiscript.md (Japanese, Kansai) * New translations reaction.md (Japanese, Kansai) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations glossary.md (Japanese, Kansai) * New translations glossary.md (Kabyle) * New translations glossary.md (Haitian Creole) * New translations glossary.md (Kannada) * New translations glossary.md (Lojban) * New translations glossary.md (Uyghur) * New translations glossary.md (Esperanto) * New translations glossary.md (Indonesian) * New translations misskey.md (English) * New translations glossary.md (Thai) * New translations glossary.md (English) * New translations glossary.md (Chinese Traditional) * New translations glossary.md (Dutch) * New translations glossary.md (Chinese Simplified) * New translations glossary.md (Ukrainian) * New translations glossary.md (Russian) * New translations glossary.md (Portuguese) * New translations glossary.md (Polish) * New translations glossary.md (Norwegian) * New translations glossary.md (Korean) * New translations glossary.md (French) * New translations glossary.md (Italian) * New translations glossary.md (German) * New translations glossary.md (Danish) * New translations glossary.md (Czech) * New translations glossary.md (Arabic) * New translations glossary.md (Spanish) * New translations note.md (French) * New translations glossary.md (Chinese Simplified) * New translations faq.md (French) * New translations faq.md (Chinese Simplified) * New translations faq.md (Kabyle) * New translations faq.md (Haitian Creole) * New translations faq.md (Kannada) * New translations faq.md (Lojban) * New translations faq.md (Uyghur) * New translations faq.md (Esperanto) * New translations faq.md (Thai) * New translations faq.md (Indonesian) * New translations faq.md (English) * New translations faq.md (Chinese Traditional) * New translations faq.md (Ukrainian) * New translations faq.md (Spanish) * New translations faq.md (Russian) * New translations faq.md (Portuguese) * New translations faq.md (Polish) * New translations faq.md (Norwegian) * New translations faq.md (Dutch) * New translations faq.md (Korean) * New translations faq.md (Italian) * New translations faq.md (German) * New translations faq.md (Danish) * New translations faq.md (Czech) * New translations faq.md (Arabic) * New translations faq.md (Japanese, Kansai) * New translations faq.md (French) * New translations misskey.md (French) * New translations faq.md (French) * New translations misskey.md (French) * New translations faq.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations word-mute.md (Ukrainian) * New translations word-mute.md (Czech) * New translations word-mute.md (Danish) * New translations word-mute.md (German) * New translations word-mute.md (Italian) * New translations word-mute.md (Korean) * New translations word-mute.md (Dutch) * New translations word-mute.md (Norwegian) * New translations word-mute.md (Polish) * New translations word-mute.md (Portuguese) * New translations word-mute.md (Russian) * New translations word-mute.md (Chinese Simplified) * New translations word-mute.md (Spanish) * New translations word-mute.md (Chinese Traditional) * New translations word-mute.md (English) * New translations word-mute.md (Indonesian) * New translations word-mute.md (Thai) * New translations word-mute.md (Esperanto) * New translations word-mute.md (Uyghur) * New translations word-mute.md (Lojban) * New translations word-mute.md (Kannada) * New translations word-mute.md (Haitian Creole) * New translations word-mute.md (Kabyle) * New translations word-mute.md (Arabic) * New translations word-mute.md (French) * New translations word-mute.md (Japanese, Kansai) * New translations glossary.md (English) * New translations glossary.md (English) * New translations glossary.md (English) * New translations glossary.md (English) * New translations faq.md (English) * New translations faq.md (English) * New translations glossary.md (English) * New translations word-mute.md (English) * New translations word-mute.md (English) * New translations word-mute.md (English) * New translations ja-JP.yml (English) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) --- locales/de-DE.yml | 8 ++++ locales/en-US.yml | 8 ++++ locales/eo-UY.yml | 21 ++++++----- src/docs/ar-SA/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/ar-SA/features/word-mute.md | 20 ++++++++++ src/docs/ar-SA/general/faq.md | 3 ++ src/docs/ar-SA/general/glossary.md | 6 +++ src/docs/cs-CZ/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/cs-CZ/features/word-mute.md | 20 ++++++++++ src/docs/cs-CZ/general/faq.md | 3 ++ src/docs/cs-CZ/general/glossary.md | 6 +++ src/docs/da-DK/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/da-DK/features/word-mute.md | 20 ++++++++++ src/docs/da-DK/general/faq.md | 3 ++ src/docs/da-DK/general/glossary.md | 6 +++ src/docs/de-DE/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/de-DE/features/word-mute.md | 20 ++++++++++ src/docs/de-DE/general/apps.md | 2 +- src/docs/de-DE/general/changelog.md | 2 +- src/docs/de-DE/general/faq.md | 3 ++ src/docs/de-DE/general/glossary.md | 8 +++- src/docs/de-DE/general/links.md | 2 +- src/docs/de-DE/general/report-issue.md | 2 +- src/docs/en-US/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/en-US/features/word-mute.md | 20 ++++++++++ src/docs/en-US/general/faq.md | 3 ++ src/docs/en-US/general/glossary.md | 10 ++++- src/docs/en-US/general/links.md | 2 +- src/docs/en-US/general/misskey.md | 2 +- src/docs/eo-UY/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/eo-UY/features/word-mute.md | 20 ++++++++++ src/docs/eo-UY/general/faq.md | 3 ++ src/docs/eo-UY/general/glossary.md | 18 ++++++--- src/docs/es-ES/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/es-ES/features/word-mute.md | 20 ++++++++++ src/docs/es-ES/general/faq.md | 3 ++ src/docs/es-ES/general/glossary.md | 6 +++ src/docs/fr-FR/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/fr-FR/features/note.md | 2 +- src/docs/fr-FR/features/word-mute.md | 20 ++++++++++ src/docs/fr-FR/general/faq.md | 7 +++- src/docs/fr-FR/general/glossary.md | 8 +++- src/docs/fr-FR/general/misskey.md | 4 +- src/docs/fr-FR/general/troubleshooting.md | 18 ++++----- src/docs/ht-HT/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/ht-HT/features/word-mute.md | 20 ++++++++++ src/docs/ht-HT/general/faq.md | 3 ++ src/docs/ht-HT/general/glossary.md | 6 +++ src/docs/id-ID/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/id-ID/features/word-mute.md | 20 ++++++++++ src/docs/id-ID/general/faq.md | 3 ++ src/docs/id-ID/general/glossary.md | 6 +++ src/docs/it-IT/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/it-IT/features/word-mute.md | 20 ++++++++++ src/docs/it-IT/general/faq.md | 3 ++ src/docs/it-IT/general/glossary.md | 6 +++ src/docs/ja-KS/admin/disable-timelines.md | 8 ++-- src/docs/ja-KS/admin/faq.md | 6 +-- src/docs/ja-KS/advanced/aiscript.md | 8 ++-- src/docs/ja-KS/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/ja-KS/features/reaction.md | 8 ++-- src/docs/ja-KS/features/word-mute.md | 20 ++++++++++ src/docs/ja-KS/general/faq.md | 5 ++- src/docs/ja-KS/general/glossary.md | 6 +++ src/docs/ja-KS/general/misskey.md | 2 +- src/docs/jbo-EN/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/jbo-EN/features/word-mute.md | 20 ++++++++++ src/docs/jbo-EN/general/faq.md | 3 ++ src/docs/jbo-EN/general/glossary.md | 6 +++ src/docs/kab-KAB/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/kab-KAB/features/word-mute.md | 20 ++++++++++ src/docs/kab-KAB/general/faq.md | 3 ++ src/docs/kab-KAB/general/glossary.md | 6 +++ src/docs/kn-IN/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/kn-IN/features/word-mute.md | 20 ++++++++++ src/docs/kn-IN/general/faq.md | 3 ++ src/docs/kn-IN/general/glossary.md | 6 +++ src/docs/ko-KR/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/ko-KR/features/word-mute.md | 20 ++++++++++ src/docs/ko-KR/general/faq.md | 3 ++ src/docs/ko-KR/general/glossary.md | 6 +++ src/docs/nl-NL/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/nl-NL/features/word-mute.md | 20 ++++++++++ src/docs/nl-NL/general/faq.md | 3 ++ src/docs/nl-NL/general/glossary.md | 6 +++ src/docs/no-NO/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/no-NO/features/word-mute.md | 20 ++++++++++ src/docs/no-NO/general/faq.md | 3 ++ src/docs/no-NO/general/glossary.md | 6 +++ src/docs/pl-PL/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/pl-PL/features/word-mute.md | 20 ++++++++++ src/docs/pl-PL/general/faq.md | 3 ++ src/docs/pl-PL/general/glossary.md | 6 +++ src/docs/pt-PT/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/pt-PT/features/word-mute.md | 20 ++++++++++ src/docs/pt-PT/general/faq.md | 3 ++ src/docs/pt-PT/general/glossary.md | 6 +++ src/docs/ru-RU/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/ru-RU/features/word-mute.md | 20 ++++++++++ src/docs/ru-RU/general/faq.md | 3 ++ src/docs/ru-RU/general/glossary.md | 6 +++ src/docs/th-TH/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/th-TH/features/word-mute.md | 20 ++++++++++ src/docs/th-TH/general/faq.md | 3 ++ src/docs/th-TH/general/glossary.md | 6 +++ src/docs/ug-CN/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/ug-CN/features/word-mute.md | 20 ++++++++++ src/docs/ug-CN/general/faq.md | 3 ++ src/docs/ug-CN/general/glossary.md | 6 +++ src/docs/uk-UA/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/uk-UA/features/word-mute.md | 20 ++++++++++ src/docs/uk-UA/general/faq.md | 3 ++ src/docs/uk-UA/general/glossary.md | 6 +++ src/docs/zh-CN/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/zh-CN/features/word-mute.md | 20 ++++++++++ src/docs/zh-CN/general/faq.md | 3 ++ src/docs/zh-CN/general/glossary.md | 16 +++++--- src/docs/zh-TW/features/mute-and-block.md | 41 +++++++++++++++++++++ src/docs/zh-TW/features/word-mute.md | 20 ++++++++++ src/docs/zh-TW/general/faq.md | 3 ++ src/docs/zh-TW/general/glossary.md | 6 +++ 121 files changed, 1900 insertions(+), 61 deletions(-) create mode 100644 src/docs/ar-SA/features/mute-and-block.md create mode 100644 src/docs/ar-SA/features/word-mute.md create mode 100644 src/docs/cs-CZ/features/mute-and-block.md create mode 100644 src/docs/cs-CZ/features/word-mute.md create mode 100644 src/docs/da-DK/features/mute-and-block.md create mode 100644 src/docs/da-DK/features/word-mute.md create mode 100644 src/docs/de-DE/features/mute-and-block.md create mode 100644 src/docs/de-DE/features/word-mute.md create mode 100644 src/docs/en-US/features/mute-and-block.md create mode 100644 src/docs/en-US/features/word-mute.md create mode 100644 src/docs/eo-UY/features/mute-and-block.md create mode 100644 src/docs/eo-UY/features/word-mute.md create mode 100644 src/docs/es-ES/features/mute-and-block.md create mode 100644 src/docs/es-ES/features/word-mute.md create mode 100644 src/docs/fr-FR/features/mute-and-block.md create mode 100644 src/docs/fr-FR/features/word-mute.md create mode 100644 src/docs/ht-HT/features/mute-and-block.md create mode 100644 src/docs/ht-HT/features/word-mute.md create mode 100644 src/docs/id-ID/features/mute-and-block.md create mode 100644 src/docs/id-ID/features/word-mute.md create mode 100644 src/docs/it-IT/features/mute-and-block.md create mode 100644 src/docs/it-IT/features/word-mute.md create mode 100644 src/docs/ja-KS/features/mute-and-block.md create mode 100644 src/docs/ja-KS/features/word-mute.md create mode 100644 src/docs/jbo-EN/features/mute-and-block.md create mode 100644 src/docs/jbo-EN/features/word-mute.md create mode 100644 src/docs/kab-KAB/features/mute-and-block.md create mode 100644 src/docs/kab-KAB/features/word-mute.md create mode 100644 src/docs/kn-IN/features/mute-and-block.md create mode 100644 src/docs/kn-IN/features/word-mute.md create mode 100644 src/docs/ko-KR/features/mute-and-block.md create mode 100644 src/docs/ko-KR/features/word-mute.md create mode 100644 src/docs/nl-NL/features/mute-and-block.md create mode 100644 src/docs/nl-NL/features/word-mute.md create mode 100644 src/docs/no-NO/features/mute-and-block.md create mode 100644 src/docs/no-NO/features/word-mute.md create mode 100644 src/docs/pl-PL/features/mute-and-block.md create mode 100644 src/docs/pl-PL/features/word-mute.md create mode 100644 src/docs/pt-PT/features/mute-and-block.md create mode 100644 src/docs/pt-PT/features/word-mute.md create mode 100644 src/docs/ru-RU/features/mute-and-block.md create mode 100644 src/docs/ru-RU/features/word-mute.md create mode 100644 src/docs/th-TH/features/mute-and-block.md create mode 100644 src/docs/th-TH/features/word-mute.md create mode 100644 src/docs/ug-CN/features/mute-and-block.md create mode 100644 src/docs/ug-CN/features/word-mute.md create mode 100644 src/docs/uk-UA/features/mute-and-block.md create mode 100644 src/docs/uk-UA/features/word-mute.md create mode 100644 src/docs/zh-CN/features/mute-and-block.md create mode 100644 src/docs/zh-CN/features/word-mute.md create mode 100644 src/docs/zh-TW/features/mute-and-block.md create mode 100644 src/docs/zh-TW/features/word-mute.md diff --git a/locales/de-DE.yml b/locales/de-DE.yml index 1f9afbdc2b..0fcfc9b46a 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -777,6 +777,14 @@ misskeyUpdated: "Misskey wurde aktualisiert!" whatIsNew: "Änderungen anzeigen" translate: "Übersetzen" translatedFrom: "Aus {x} übersetzt" +accountDeletionInProgress: "Löschung des Benutzerkontos momentan in Bearbeitung" +_accountDelete: + accountDelete: "Benutzerkonto löschen" + mayTakeTime: "Da die Löschung eines Benutzerkontos ein aufwendiger Prozess ist, kann dessen Dauer davon abhängen, wie viel Inhalt in diesem erstellt wurde oder wie viele Dateien hochgeladen wurden." + sendEmail: "Sobald die Löschung abgeschlossen ist, wird an die mit ihm verknüpfte Email-Adresse eine Benachrichtigung versendet." + requestAccountDelete: "Löschung des Benutzerkontos anfordern" + started: "Löschung wurde eingeleitet." + inProgress: "Löschung in Bearbeitung" _docs: continueReading: "Mehr lesen" features: "Funktionen" diff --git a/locales/en-US.yml b/locales/en-US.yml index 24569eeec7..cf82a8cd73 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -777,6 +777,14 @@ misskeyUpdated: "Misskey has been updated!" whatIsNew: "Show changes" translate: "Translate" translatedFrom: "Translated from {x}" +accountDeletionInProgress: "Account deletion is currently in progress" +_accountDelete: + accountDelete: "Delete Account" + mayTakeTime: "As account deletion is a resource-heavy process, it may take some time to complete depending on how much content you have created and how many files you have uploaded." + sendEmail: "Once account deletion has been completed, an email will be sent to the email address registered to this account." + requestAccountDelete: "Request account deletion" + started: "Deletion has been started." + inProgress: "Deletion is currently in progress" _docs: continueReading: "Read more" features: "Features" diff --git a/locales/eo-UY.yml b/locales/eo-UY.yml index 15575c7538..bb141a692c 100644 --- a/locales/eo-UY.yml +++ b/locales/eo-UY.yml @@ -1,7 +1,7 @@ --- _lang_: "Esperanto" headlineMisskey: "Reto ligata per notoj" -introMisskey: "Bonvenon! Misskey estas malfermitkoda malcentraliza mikrobloga servo.\nKreu \"noto\"n por diskonigi tion ke nun okazas, aŭ por dissendu pri vi📡\nPer la funkcio \"reago\" vi ankaŭ povas rapide esprimi vian senton pri ĉies noto👍\nVolu esplori nova mondo🚀" +introMisskey: "Bonvenon! Misskey estas malfermitkoda malcentraliza mikrobloga servo.\nKreu \"noto\"n por diskonigu tion ke nun okazas, aŭ por dissendu pri vi. 📡\nPer la funkcio \"reago\", vi ankaŭ povas rapide esprimi vian senton pri ĉies noto. 👍\nOni esploru novan mondon. 🚀" monthAndDay: "{day}-a/{month}" search: "Serĉi" notifications: "Sciigoj" @@ -119,7 +119,7 @@ emojiName: "Nomo de emoĵio" emojiUrl: "URL de la emoĵio" addEmoji: "Aldoni emoĵion" settingGuide: "Rekomendaj agordoj" -cacheRemoteFiles: "Havi staplon por transaj dosieroj" +cacheRemoteFiles: "Havi staplon de transaj dosieroj" flagAsBot: "Tiu uzanto estas roboto" flagAsCat: "Tiu uzanto estas kato" addAccount: "Aldoni konton" @@ -151,7 +151,7 @@ blockedUsers: "Blokataj uzantoj" noUsers: "Sen uzantoj" editProfile: "Redakti profilon" noteDeleteConfirm: "Ĉu vi certas ke vi volas forviŝi la noton?" -pinLimitExceeded: "Vi ne plu povas alpingli noton." +pinLimitExceeded: "Vi povas alpingli ne pli noton." processing: "Traktado..." noCustomEmojis: "Neniu emoĵio" federating: "Kunfederado" @@ -169,7 +169,7 @@ currentPassword: "Aktuala pasvorto" newPassword: "Nova pasvorto" newPasswordRetype: "Reentajpu la novan pasvorton" attachFile: "Aldoni dosieron" -more: "Plu!" +more: "Plu !" featured: "Maksimumi" usernameOrUserId: "Uzantnomo aŭ identigilo de uzanto" noSuchUser: "Neniuj uzantoj trovitaj." @@ -351,6 +351,7 @@ emailServer: "Retpoŝta servilo" email: "Retpoŝto" emailAddress: "Retpoŝta adreso" smtpConfig: "Agordoj de la servilo SMTP" +smtpPort: "Pordo" smtpUser: "Uzantnomo" smtpPass: "Pasvorto" wordMute: "Silentigo de vortoj" @@ -363,9 +364,9 @@ create: "Krei" notificationSetting: "Agordoj de sciigoj" useGlobalSetting: "Oni uzas malloka agordo" fileIdOrUrl: "Dosiera identigilo aŭ URL" -abuseReports: "Signali" -reportAbuse: "Signali" -reportAbuseOf: "Signali {name}'(o)n" +abuseReports: "Signaloj" +reportAbuse: "Signalo" +reportAbuseOf: "Signali kontraŭ {name}'(o)" send: "Sendi" openInNewTab: "Malfermi en nova langeto" editTheseSettingsMayBreakAccount: "Redakti tiujn agordojn estas eble damaĝi konton." @@ -667,6 +668,8 @@ _pages: arg1: "Listoj" _listLen: arg1: "Listoj" + _splitStrByLine: + arg1: "Teksto" types: array: "Listoj" stringArray: "List de teksto" @@ -677,7 +680,7 @@ _notification: youGotMessagingMessageFromGroup: "Retbabilan mesaĝon oni sendis al la grupo {name}" youWereFollowed: "sksekvis vin" youReceivedFollowRequest: "Vi ricevis peton de sekvado" - yourFollowRequestAccepted: "Via peto por eksekvu estas akceptita." + yourFollowRequestAccepted: "Via peto por sekvado estis akceptita." _types: follow: "Sekvatoj" mention: "Mencioj" @@ -685,7 +688,7 @@ _notification: quote: "Citi" reaction: "Reagoj" receiveFollowRequest: "Ricevita peton de sekvado" - followRequestAccepted: "Peto por eksekvu akceptita" + followRequestAccepted: "Akceptita peto por sekvado" _deck: profile: "Agordaro" _columns: diff --git a/src/docs/ar-SA/features/mute-and-block.md b/src/docs/ar-SA/features/mute-and-block.md new file mode 100644 index 0000000000..932d2d27d1 --- /dev/null +++ b/src/docs/ar-SA/features/mute-and-block.md @@ -0,0 +1,41 @@ +# تم كتمها / تم حجبها +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## اكتم +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## احجب +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/ar-SA/features/word-mute.md b/src/docs/ar-SA/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/ar-SA/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/ar-SA/general/faq.md b/src/docs/ar-SA/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/ar-SA/general/faq.md +++ b/src/docs/ar-SA/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/ar-SA/general/glossary.md b/src/docs/ar-SA/general/glossary.md index 6062529322..7ca515cf1f 100644 --- a/src/docs/ar-SA/general/glossary.md +++ b/src/docs/ar-SA/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## مثيل الخادم todo +## إيموجي مخصص +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## اكتم ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## قائمة الانتظار +アクティビティ配送などを順番に行うためのシステム。 + ## علِق アカウントが使用不可に設定されている状態。 diff --git a/src/docs/cs-CZ/features/mute-and-block.md b/src/docs/cs-CZ/features/mute-and-block.md new file mode 100644 index 0000000000..4f0931eeaf --- /dev/null +++ b/src/docs/cs-CZ/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Ztlumit +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Zablokovat +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/cs-CZ/features/word-mute.md b/src/docs/cs-CZ/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/cs-CZ/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/cs-CZ/general/faq.md b/src/docs/cs-CZ/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/cs-CZ/general/faq.md +++ b/src/docs/cs-CZ/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/cs-CZ/general/glossary.md b/src/docs/cs-CZ/general/glossary.md index 22fa9654fe..f1d189a4c3 100644 --- a/src/docs/cs-CZ/general/glossary.md +++ b/src/docs/cs-CZ/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Instance todo +## Vlastní emoji +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Fronta úloh +アクティビティ配送などを順番に行うためのシステム。 + ## Zmrazit アカウントが使用不可に設定されている状態。 diff --git a/src/docs/da-DK/features/mute-and-block.md b/src/docs/da-DK/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/da-DK/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/da-DK/features/word-mute.md b/src/docs/da-DK/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/da-DK/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/da-DK/general/faq.md b/src/docs/da-DK/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/da-DK/general/faq.md +++ b/src/docs/da-DK/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/da-DK/general/glossary.md b/src/docs/da-DK/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/da-DK/general/glossary.md +++ b/src/docs/da-DK/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/de-DE/features/mute-and-block.md b/src/docs/de-DE/features/mute-and-block.md new file mode 100644 index 0000000000..429b3b3526 --- /dev/null +++ b/src/docs/de-DE/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Stummschaltungen und Blockierungen +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Stummschalten +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Blockieren +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/de-DE/features/word-mute.md b/src/docs/de-DE/features/word-mute.md new file mode 100644 index 0000000000..133e918ff3 --- /dev/null +++ b/src/docs/de-DE/features/word-mute.md @@ -0,0 +1,20 @@ +# Wort-Stummschaltung +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/de-DE/general/apps.md b/src/docs/de-DE/general/apps.md index 1f4c85fe8f..f0080bd301 100644 --- a/src/docs/de-DE/general/apps.md +++ b/src/docs/de-DE/general/apps.md @@ -1,4 +1,4 @@ -# サードパーティアプリのリスト +# Liste von Drittanbieter-Apps ## クライアント todo diff --git a/src/docs/de-DE/general/changelog.md b/src/docs/de-DE/general/changelog.md index 6766a63b20..e8ee88f116 100644 --- a/src/docs/de-DE/general/changelog.md +++ b/src/docs/de-DE/general/changelog.md @@ -1,4 +1,4 @@ -# 更新履歴 +# Änderungshistorie
ℹ️ このサーバーの更新履歴です。Misskeyの最新のリリースについては、GitHubをご確認ください。
diff --git a/src/docs/de-DE/general/faq.md b/src/docs/de-DE/general/faq.md index aa8d688754..a5534797cf 100644 --- a/src/docs/de-DE/general/faq.md +++ b/src/docs/de-DE/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/de-DE/general/glossary.md b/src/docs/de-DE/general/glossary.md index e1bc6b7bae..9b3196efb7 100644 --- a/src/docs/de-DE/general/glossary.md +++ b/src/docs/de-DE/general/glossary.md @@ -1,4 +1,4 @@ -# 用語集 +# Glossar Misskeyに関する用語集です。 ## ActivityPub @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Instanz todo +## Benutzerdefinierte Emojis +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Instanzweit stummschalten ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Job-Warteschlange +アクティビティ配送などを順番に行うためのシステム。 + ## Sperren アカウントが使用不可に設定されている状態。 diff --git a/src/docs/de-DE/general/links.md b/src/docs/de-DE/general/links.md index 0d6bed82b0..048378fa24 100644 --- a/src/docs/de-DE/general/links.md +++ b/src/docs/de-DE/general/links.md @@ -1,4 +1,4 @@ -# リンク集 +# Links ## Webサイト - [Official Discord](https://discord.gg/Wp8gVStHW3) - Misskey公式Discordサーバー diff --git a/src/docs/de-DE/general/report-issue.md b/src/docs/de-DE/general/report-issue.md index 63527e32af..63c23aa5c8 100644 --- a/src/docs/de-DE/general/report-issue.md +++ b/src/docs/de-DE/general/report-issue.md @@ -1,4 +1,4 @@ -# 不具合の報告 +# Fehler melden 不具合と思われる状況に遭遇したときは、まず[トラブルシューティング](./troubleshooting)をご一読ください。 それでも問題が解決しないときは、以下の情報を含めて[フォーラム](https://forum.misskey.io/)に投稿してください。 投稿することで、解決策が見つかったり、不具合と判断されれば開発チームによって修正が行われます。 ## 含める情報 diff --git a/src/docs/en-US/features/mute-and-block.md b/src/docs/en-US/features/mute-and-block.md new file mode 100644 index 0000000000..a9e8fcc1cd --- /dev/null +++ b/src/docs/en-US/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Mutes and Blocks +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Mute +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Block +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/en-US/features/word-mute.md b/src/docs/en-US/features/word-mute.md new file mode 100644 index 0000000000..77283c8620 --- /dev/null +++ b/src/docs/en-US/features/word-mute.md @@ -0,0 +1,20 @@ +# Word mute +Through setting up word mutes, you can make notes satisfying set conditions not appear on your timeline anymore. + +There are two types of word mutes: soft and hard.Below is an explanation of the setup process and effect of both. + +## Soft word mute +With soft mutes, the word mute is processed within the client (app) you are using. + +When a note meets the set conditions, it will be hidden behind text stating "(username) said something". +You can display the note as it was by clicking on this text. + +## Hard word mute +With hard mutes, the server judges whether the content of a new incoming note meets the set conditions similar to antennas, and will completely exclude it from your timeline if so. + +To summarize, a hard word mute has the following features: + +* Only new notes created after configuration will be affected by the mute. +* If the conditions are changed, previously hard muted notes will still remain muted. +* Timelines will not be filled with "(...) said something". +* Hard mutes will function even for apps without functionality for soft mutes. diff --git a/src/docs/en-US/general/faq.md b/src/docs/en-US/general/faq.md index 37827903a8..32d3632983 100644 --- a/src/docs/en-US/general/faq.md +++ b/src/docs/en-US/general/faq.md @@ -23,3 +23,6 @@ Only administrators can add, edit or delete custom emoji. If you'd like to do ei ## "I want to develop a Bot." It is possible to develop a Bot using the Misskey API. Please, [see here](../advanced/develop-bot). + +## Which service does the note translation function use? +[DeepL](https://www.deepl.com/) is being used for this. diff --git a/src/docs/en-US/general/glossary.md b/src/docs/en-US/general/glossary.md index 9f6dde06f8..53164a0a59 100644 --- a/src/docs/en-US/general/glossary.md +++ b/src/docs/en-US/general/glossary.md @@ -49,14 +49,20 @@ Those users amongst all existing ones who are continually using their account. ## Instance todo +## Custom Emoji +Emoji provided by your server.Emoji that are not specifically provided by your server but are available by default are called "Unicode Emoji". + ## Control Panel -The settings screen of an instance. +todo ## Server todo ## Silence -A state in which the visibility of the notes by said user cannot be set to "Public" anymore.Can be set for individual users by Moderators.For details, see [here.](../features/silence) +A state in which the visibility of the notes by said user cannot be set to "Public" anymore.Can be set for individual users by the discretion of Moderators.For details, see [here.](../features/silence) + +## Job Queue +A system used for sequentially broadcasting activities to other servers etc. ## Suspend A state which makes the account of a user unusable. diff --git a/src/docs/en-US/general/links.md b/src/docs/en-US/general/links.md index 1952160359..11a44e894f 100644 --- a/src/docs/en-US/general/links.md +++ b/src/docs/en-US/general/links.md @@ -1,4 +1,4 @@ -# A collection of links +# Links ## Websites - [Official Discord](https://discord.gg/Wp8gVStHW3) - The official Discord server for Misskey diff --git a/src/docs/en-US/general/misskey.md b/src/docs/en-US/general/misskey.md index 50b34a80b1..8ae8982444 100644 --- a/src/docs/en-US/general/misskey.md +++ b/src/docs/en-US/general/misskey.md @@ -76,7 +76,7 @@ No.Misskey is a project completely different from Mastodon or other alike projec ### Are there any apps for iOS / Android available? While no official Misskey app for either OS exists, there are several third-party applications. For details, please check [here](./apps). -However, functionality of third-party applications will inevitably lag behind the official Web client, so unless you really want to use a native application, we recommend the official Web client instead. As the Misskey Web client supports PWA, it is possible to make it act as if it was a native application instead. For details regarding this, please check [here](todo). +However, functionality of third-party applications will inevitably lag behind the official Web client, so unless you really want to use a native application, we recommend the official Web client instead. As the Misskey Web client supports PWA, it is also possible to make it act as if it was a native application instead. For details regarding this, please check [here](todo). ### Where can I download Misskey's logo or icon? (Coming soon) diff --git a/src/docs/eo-UY/features/mute-and-block.md b/src/docs/eo-UY/features/mute-and-block.md new file mode 100644 index 0000000000..d38faf0d7d --- /dev/null +++ b/src/docs/eo-UY/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Silentigatoj kaj blokatoj +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Silentigi +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Bloki +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/eo-UY/features/word-mute.md b/src/docs/eo-UY/features/word-mute.md new file mode 100644 index 0000000000..81a7d6fe57 --- /dev/null +++ b/src/docs/eo-UY/features/word-mute.md @@ -0,0 +1,20 @@ +# Silentigo de vortoj +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/eo-UY/general/faq.md b/src/docs/eo-UY/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/eo-UY/general/faq.md +++ b/src/docs/eo-UY/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/eo-UY/general/glossary.md b/src/docs/eo-UY/general/glossary.md index 61dfe57f13..9050c592b9 100644 --- a/src/docs/eo-UY/general/glossary.md +++ b/src/docs/eo-UY/general/glossary.md @@ -50,30 +50,36 @@ Ai estas oficiala maskoto de Misskey. todo ## Ŝaltpodio -インスタンスの設定画面のこと。 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + +## コントロールパネル +todo ## Servilo todo ## Mutigi -A state in which the visibility of the notes by said user cannot be set to "Publika" anymore.Can be set for individual users by Moderators.Rigardu por sciu pli tie[.](../features/silence) +ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) + +## Disko +アクティビティ配送などを順番に行うためのシステム。 ## Flostigi アカウントが使用不可に設定されている状態。 -## Disko +## Miskiisto Misskeyにアップロードしたファイルを管理する機能。詳細は[こちら。](../features/drive) ## Notoj Misskeyに投稿される、文章、ファイル、アンケートなどを含めることができるコンテンツ。詳細は[こちら。](../features/note) -## Miskiisto -Uzuloj de Misskey. +## Transa aŭ fora +Misskeyを使う人のこと。 ## Moderigisto スパムの凍結およびサイレンスや不適切な投稿の削除など、コミュニティ運営に関する権限を持つユーザー。 -## Transa aŭ fora +## Transa 他サーバーのことを指します。リモートユーザーといったように接頭辞としても使われます。ローカルの逆です。 ## Kunfederaĵo diff --git a/src/docs/es-ES/features/mute-and-block.md b/src/docs/es-ES/features/mute-and-block.md new file mode 100644 index 0000000000..b876f898b9 --- /dev/null +++ b/src/docs/es-ES/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Silenciar y bloquear +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Silenciar +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Bloquear +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/es-ES/features/word-mute.md b/src/docs/es-ES/features/word-mute.md new file mode 100644 index 0000000000..3e3bec2902 --- /dev/null +++ b/src/docs/es-ES/features/word-mute.md @@ -0,0 +1,20 @@ +# Silenciar palabras +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/es-ES/general/faq.md b/src/docs/es-ES/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/es-ES/general/faq.md +++ b/src/docs/es-ES/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/es-ES/general/glossary.md b/src/docs/es-ES/general/glossary.md index bf50b857a1..4bef9068fd 100644 --- a/src/docs/es-ES/general/glossary.md +++ b/src/docs/es-ES/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Instancia todo +## Emojis personalizados +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Silenciar ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Cola de trabajos +アクティビティ配送などを順番に行うためのシステム。 + ## Suspender アカウントが使用不可に設定されている状態。 diff --git a/src/docs/fr-FR/features/mute-and-block.md b/src/docs/fr-FR/features/mute-and-block.md new file mode 100644 index 0000000000..9f4cfd39b8 --- /dev/null +++ b/src/docs/fr-FR/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Masqué·e·s / Bloqué·e·s +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Masquer +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Bloquer +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/fr-FR/features/note.md b/src/docs/fr-FR/features/note.md index f4cd98c0d7..9aa6de7de7 100644 --- a/src/docs/fr-FR/features/note.md +++ b/src/docs/fr-FR/features/note.md @@ -12,7 +12,7 @@
ℹ️ コンピューターのクリップボードに画像データがある状態で、フォーム内のテキストボックスにペーストするとその画像を添付することができます。
ℹ️ テキストボックス内でCtrl + Enterを押すことでも投稿できます。
-## Partager +## Renoter 既にあるノートを引用、もしくはそのノートを新しいノートとして共有する行為、またそれによって作成されたノートをRenoteと呼びます。 自分がフォローしているユーザーの、気に入ったノートを自分のフォロワーに共有したい場合や、過去の自分のノートを再度共有したい場合に使います。 同じノートに対して無制限にRenoteを行うことができますが、あまり連続して使用すると迷惑になる場合もあるので、注意しましょう。
⚠️ 公開範囲がフォロワーやダイレクトのノートはRenoteできません
diff --git a/src/docs/fr-FR/features/word-mute.md b/src/docs/fr-FR/features/word-mute.md new file mode 100644 index 0000000000..84935a4284 --- /dev/null +++ b/src/docs/fr-FR/features/word-mute.md @@ -0,0 +1,20 @@ +# Filtre de mots +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/fr-FR/general/faq.md b/src/docs/fr-FR/general/faq.md index 2a82eed4fd..0ec7159ebd 100644 --- a/src/docs/fr-FR/general/faq.md +++ b/src/docs/fr-FR/general/faq.md @@ -2,9 +2,9 @@ Vous trouverez ici les questions les plus fréquentes sur l'utilisation de Misskey. Les questions fréquentes concernant Misskey en tant que projet sont publiées [sur cette page](./misskey). ## « Existe-t-il des appli pour Android / iOS ? » -公式にはそういったOSのネイティブアプリを開発していませんが、サードパーティ製のアプリがいくつかあります。 詳しくは[こちら](./apps)をご覧ください。 +Bien qu'il n'existe d'application Misskey officielle pour aucun OS, différentes applications développées par des tiers sont disponibles. [Voir ici](./apps) pour plus de détails. -ただ、サードパーティ製アプリはどうしても機能への対応が遅れてしまうため、とくに拘りがなければ公式のWebクライアントの利用をおすすめします。 なお、MisskeyのWebクライアントはPWAに対応しているので、ネイティブアプリのように動作させることも可能です。 詳しくは[こちら](todo)をご覧ください。 +Cependant, à moins que vous ne soyez particulièrement déterminé·e à utiliser une application dédiée, l'utilisation du client Web officiel est vivement recommandée du fait que les applications développées par des tiers seront forcément en retard par rapport à celui-ci. Par ailleurs, étant donné que le client Web de Misskey est compatible avec une PWA, il peut adopter le comportement d'une application native. [Voir ici](todo) pour plus d'informations. ## « Ne peut-on pas utiliser un client Mastodon pour se connecter à Misskey ? » Étant donné que Misskey n'est pas compatible avec l'API Mastodon, sauf cas exceptionnels, il n'est pas possible d'utiliser un client Mastodon pour Misskey. @@ -23,3 +23,6 @@ Seul·e·s les administrateur·rice·s peuvent ajouter, éditer ou effacer des ## « Je veux créer un Bot. » Vous pouvez développer un Bot en utilisant l'API de Misskey. Plus d'informations sur [cette page](../advanced/develop-bot). + +## « Quel est le service utilisé pour la fonctionnalité de traduction des notes ? » +Il s'agit de [DeepL](https://www.deepl.com/). diff --git a/src/docs/fr-FR/general/glossary.md b/src/docs/fr-FR/general/glossary.md index 679e7476b0..441a2b5bc4 100644 --- a/src/docs/fr-FR/general/glossary.md +++ b/src/docs/fr-FR/general/glossary.md @@ -34,7 +34,7 @@ Misskeyに関する用語集です。 ## NSFW (読み: のっとせーふふぉーわーく) Not Safe For Workの略。画像を「閲覧注意」扱いにし、操作なしには表示しないようにすることができる機能。 -## Partager +## Renoter (読み: りのーと) 既にあるノートを引用、もしくはそのノートを新しいノートとして共有する行為、またそれによって作成されたノート。詳細は[こちら。](../features/note) ## STL @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Instance todo +## Émojis personnalisés +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Mettre en sourdine ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## File d’attente +アクティビティ配送などを順番に行うためのシステム。 + ## Suspendre アカウントが使用不可に設定されている状態。 diff --git a/src/docs/fr-FR/general/misskey.md b/src/docs/fr-FR/general/misskey.md index c56c5a99f0..1fb7008cee 100644 --- a/src/docs/fr-FR/general/misskey.md +++ b/src/docs/fr-FR/general/misskey.md @@ -75,9 +75,9 @@ Misskeyは開発が進むにつれ使用する技術も大きく変わってき いいえ。MisskeyはMastodonやその他のプロジェクトとは全く別のプロジェクトです。 開発に関しても、Misskeyの方が昔から開発されています。ただし、分散型になったのはMastodonの登場より後です。 同じActivityPubという分散のためのプロトコルを実装しているという点以外、両者に特に関りがあるわけでもありません。 ### « Existe-t-il des appli pour Android / iOS ? » -公式にはそういったOSのネイティブアプリを開発していませんが、サードパーティ製のアプリがいくつかあります。 詳しくは[こちら](./apps)をご覧ください。 +Bien qu'il n'existe d'application Misskey officielle pour aucun OS, différentes applications développées par des tiers sont disponibles. [Voir ici](./apps) pour plus de détails. -ただ、サードパーティ製アプリはどうしても機能への対応が遅れてしまうため、とくに拘りがなければ公式のWebクライアントの利用をおすすめします。 なお、MisskeyのWebクライアントはPWAに対応しているので、ネイティブアプリのように動作させることも可能です。 詳しくは[こちら](todo)をご覧ください。 +Cependant, à moins que vous ne soyez particulièrement déterminé·e à utiliser une application dédiée, l'utilisation du client Web officiel est vivement recommandée du fait que les applications développées par des tiers seront forcément en retard par rapport à celui-ci. Par ailleurs, étant donné que le client Web de Misskey est compatible avec une PWA, il peut adopter le comportement d'une application native. [Voir ici](todo) pour plus d'informations. ### Misskeyのロゴ、アイコンはどこで入手できますか? (準備中) diff --git a/src/docs/fr-FR/general/troubleshooting.md b/src/docs/fr-FR/general/troubleshooting.md index 3627babb34..7cdaebe8e3 100644 --- a/src/docs/fr-FR/general/troubleshooting.md +++ b/src/docs/fr-FR/general/troubleshooting.md @@ -1,19 +1,19 @@ # Résolution des problèmes
ℹ️ N'hésitez pas à consulter les Questions fréquentes en complément de cette page.
-問題が発生したときは、まずこちらをご確認ください。 該当する項目が無い、もしくは手順を試しても効果がない場合は、サーバーの管理者に連絡するか[不具合を報告](./report-issue)してください。 +Lorsque vous rencontrez un problème, nous vous prions de lire cette page tout d'abord. Si toutefois aucun des paragraphes ci-dessous ne correspond à votre problème, ou bien si vous n'arrivez pas à le résoudre en suivant les instructions détaillées ici, nous vous invitons à contacter l'administrateur·rice de votre instance ou à [Signaler un bug](./report-issue). ## Le client ne démarre pas -ほとんどの場合、お使いのブラウザまたはOSのバージョンが古いことが原因です。 ブラウザおよびOSのバージョンを最新のものに更新してから、再度試してみてください。 +Généralement, ce problème est dû au fait que vous utilisez une version trop ancienne de votre navigateur ou de votre système d'exploitation. Effectuez les mises à jour pour chacun d'eux vers leurs versions les plus récentes, puis essayez à nouveau. -これは稀ですが、それでも起動しない場合は、キャッシュが原因の場合があります。ブラウザのキャッシュをクリアして、再度試してみてください。 +Cela arrive rarement, mais si votre client ne démarre toujours pas après cela, le problème vient du cache. Dans ce cas, videz le cache et essayez à nouveau. -## ページが読み込めない -クライアントが起動するもののページが読み込めないというエラーが出る場合は、ネットワークに問題がないか確認してください。また、サーバーがダウンしていないか確認してください。 +## La page ne charge pas +Si votre client démarre mais qu'un message d'erreur apparaît lors du chargement de la page, assurez-vous qu'il ne s'agit pas d'un problème de connexion au réseau. Assurez-vous également que votre serveur n'est pas temporairement inaccessible. -これは稀ですが、キャッシュが原因の場合があります。ブラウザのキャッシュをクリアして、再度試してみてください。 +Bien que cela arrive rarement, il se peut que le cache soit à l'origine du problème. Dans ce cas, videz le cache et essayez à nouveau. -まだ問題がある場合は、サーバーの問題と思われるのでサーバーの管理者に連絡してください。 +Si le problème persiste malgré tout, il est très probable qu'il s'agisse d'une panne côté serveur ; nous vous invitons donc à contacter l'administrateur·rice de votre instance. ## Le client est lent 以下を試してみてください: @@ -31,10 +31,10 @@ 点滅は、未読のコンテンツがあることを示しています。通常点滅が消えない場合は、コンテンツを遡ると未読なコンテンツが残っています。 すべて既読にしたと思われるのに、それでもなお点滅が続く場合(おそらく不具合と思われます)は設定から強制的にすべて既読扱いにすることができます。 ## La fonction « Renoter » ne fonctionne pas -フォロワー限定のノートはRenoteすることはできません。 +Les notes dont l'audience est limitée aux « Abonné·e·s uniquement » ne peuvent pas être renotées. ## Des éléments spécifiques de l'interface ne s'affichent pas 広告ブロッカーを使用しているとそのような不具合が発生することがあります。Misskeyではオフにしてご利用ください。 ## Certaines parties de l'interface ne sont pas traduites -ほとんどの場合、単に翻訳が間に合っていないだけで、不具合ではありません。翻訳が終わるまでお待ちください。 [翻訳に参加](./misskey)していただくことも可能です。 +La plupart du temps, cela n'est pas un bug mais simplement un problème de traduction qui n'a pas encore été faite. Merci de patienter jusqu'à ce que la traduction de la portion en question soit achevée. Vous pouvez également [aider à traduire](./misskey) Misskey. diff --git a/src/docs/ht-HT/features/mute-and-block.md b/src/docs/ht-HT/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/ht-HT/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/ht-HT/features/word-mute.md b/src/docs/ht-HT/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/ht-HT/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/ht-HT/general/faq.md b/src/docs/ht-HT/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/ht-HT/general/faq.md +++ b/src/docs/ht-HT/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/ht-HT/general/glossary.md b/src/docs/ht-HT/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/ht-HT/general/glossary.md +++ b/src/docs/ht-HT/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/id-ID/features/mute-and-block.md b/src/docs/id-ID/features/mute-and-block.md new file mode 100644 index 0000000000..2444a8d43c --- /dev/null +++ b/src/docs/id-ID/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Bisukan / Blokir +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Bisukan +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Blokir +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/id-ID/features/word-mute.md b/src/docs/id-ID/features/word-mute.md new file mode 100644 index 0000000000..811de5279d --- /dev/null +++ b/src/docs/id-ID/features/word-mute.md @@ -0,0 +1,20 @@ +# Bisukan kata +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/id-ID/general/faq.md b/src/docs/id-ID/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/id-ID/general/faq.md +++ b/src/docs/id-ID/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/id-ID/general/glossary.md b/src/docs/id-ID/general/glossary.md index b8cd78bc65..95945e8f00 100644 --- a/src/docs/id-ID/general/glossary.md +++ b/src/docs/id-ID/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Instansi todo +## Emoji kustom +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Bungkam ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Antrian kerja +アクティビティ配送などを順番に行うためのシステム。 + ## Bekukan アカウントが使用不可に設定されている状態。 diff --git a/src/docs/it-IT/features/mute-and-block.md b/src/docs/it-IT/features/mute-and-block.md new file mode 100644 index 0000000000..bf32966022 --- /dev/null +++ b/src/docs/it-IT/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Silenziati / Bloccati +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Silenzia +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Blocca +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/it-IT/features/word-mute.md b/src/docs/it-IT/features/word-mute.md new file mode 100644 index 0000000000..3104147f28 --- /dev/null +++ b/src/docs/it-IT/features/word-mute.md @@ -0,0 +1,20 @@ +# Filtri parole +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/it-IT/general/faq.md b/src/docs/it-IT/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/it-IT/general/faq.md +++ b/src/docs/it-IT/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/it-IT/general/glossary.md b/src/docs/it-IT/general/glossary.md index 8564693cfe..b7ec7bddf4 100644 --- a/src/docs/it-IT/general/glossary.md +++ b/src/docs/it-IT/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Istanza todo +## Emoji personalizzati +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Silenzia ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Coda di lavoro +アクティビティ配送などを順番に行うためのシステム。 + ## Sospendi アカウントが使用不可に設定されている状態。 diff --git a/src/docs/ja-KS/admin/disable-timelines.md b/src/docs/ja-KS/admin/disable-timelines.md index b081e35ab0..55e9023655 100644 --- a/src/docs/ja-KS/admin/disable-timelines.md +++ b/src/docs/ja-KS/admin/disable-timelines.md @@ -1,8 +1,8 @@ # LTL/STL/GTLの無効化 -Misskeyでは、LTL/STL/GTLをそれぞれ無効化することができます。有効/無効を切り替えるには、インスタンスコントロールパネルで設定します。 +Misskeyでは、LTL/STL/GTLをそれぞれ無効化することができるで。有効/無効を切り替えるんは、インスタンスコントロールパネルで設定しいや。 -LTLやSTLは、そのインスタンス全員の投稿が見れるため、新規のユーザーにとってはユーザーを探す必要がなくなり、興味のあるユーザーを見つけやすいという利点があります。 しかし同時に、フォロー機能が活用されなくなったり、不適切な投稿が目につきやすくなったり、チャットのようになることで内輪感が生じて逆に新規ユーザーが参加しにくくなるといったデメリットも持ち合わせています。 サーバーによってメリット/デメリットどちらが優勢かは異なるので、オプションとして無効にできるようになっています。 もしデメリットの方が上回っていると感じたら、それらのタイムラインを無効化することも検討してください。 +LTLやSTLでは、そのインスタンス全員の投稿が見えるから、新規のユーザーにとってはユーザー探す必要がのうなって、興味のあるユーザーを見つけやすいゆう利点があるで。 でも同時にな、フォロー機能が活用されんくなったり、不適切な投稿が目につきやすうなったり、チャットみたいにのうて内輪感ができて逆に新規ユーザーがあんまし参加せんようなるないなデメリットも持ち合わせとうで。 サーバーによってメリット/デメリットどっちがようさんあるかはちゃうから、オプションとして無効にできるようなっとんねん。 デメリットの方が上回っとう思たら、それらのタイムラインを無効化することも検討しいや。 -
⚠️ 無効化を行うと、ユーザーが困惑し、短期的に見て利用者が減る可能性があります。そのため、無効化の際は影響を慎重に検討し、事前に説明してフォローを整える期間を一定程度設けることを推奨します。
+
⚠️無効化したら、ユーザーがややこしがって短期的に見て利用者が減るかもわからへん。せやから、無効化するゆう時は影響をよう検討して、事前に説明してフォローを整える期間を一定程度設けるんを推奨するで。
-なお、管理者/モデレーターは、これらのタイムラインの無効化状態は適用されず、引き続き利用することが可能です。 +ちなみに、管理者/モデレーターは、これらのタイムラインの無効化状態は適用されんと、引き続き利用できるで。 diff --git a/src/docs/ja-KS/admin/faq.md b/src/docs/ja-KS/admin/faq.md index 317b4e0655..ac98c469af 100644 --- a/src/docs/ja-KS/admin/faq.md +++ b/src/docs/ja-KS/admin/faq.md @@ -1,5 +1,5 @@ -# よくある質問 -ここでは、サーバー管理者向けのよくある質問を掲載しています。 +# ようある質問 +ここでは、サーバー管理者向けのようある質問を掲載しとうで。 ## デフォルトテーマを設定したい -現在、デフォルトテーマ設定機能は実装されていません。 +今んとこ、デフォルトテーマ設定機能は実装されとらへん。 diff --git a/src/docs/ja-KS/advanced/aiscript.md b/src/docs/ja-KS/advanced/aiscript.md index 604d17daa8..0d98036d0f 100644 --- a/src/docs/ja-KS/advanced/aiscript.md +++ b/src/docs/ja-KS/advanced/aiscript.md @@ -1,7 +1,7 @@ # AiScript -AiScriptは、Misskeyで使用できるスクリプト言語です。 +AiScriptは、Misskeyで使用できるスクリプト言語や。 -
ℹ️ AiScript実装はMisskeyとは別リポジトリで、オープンソースで公開されています。
+
ℹ️ AiScript実装はMisskeyとは別リポジトリで、オープンソースで公開されようで。
-## 使い方 -AiScriptの構文や組み込み関数などのドキュメントは、[こちら](https://github.com/syuilo/aiscript/tree/master/docs)で公開されています。 +## どないして使うん? +AiScriptの構文や組み込み関数などのドキュメントは、[こちら](https://github.com/syuilo/aiscript/tree/master/docs)で公開されよる。 diff --git a/src/docs/ja-KS/features/mute-and-block.md b/src/docs/ja-KS/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/ja-KS/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/ja-KS/features/reaction.md b/src/docs/ja-KS/features/reaction.md index 4d479fd416..3a3d23201c 100644 --- a/src/docs/ja-KS/features/reaction.md +++ b/src/docs/ja-KS/features/reaction.md @@ -1,11 +1,11 @@ # リアクション -他の人のノートに、絵文字を付けて簡単にあなたの反応を伝えられる機能です。 リアクションするには、ノートの + アイコンをクリックしてピッカーを表示し、絵文字を選択します。 リアクションには[カスタム絵文字](./custom-emoji)も使用できます。 +他人のノートに、絵文字を付けて簡単に自分の反応を伝えられる機能や。 リアクションすんには、ノートの + アイコンをクリックしてピッカーを表示して、絵文字を選択したらええ。 リアクションには[カスタム絵文字](./custom-emoji)も使用できんで。 ## リアクションピッカーのカスタマイズ -ピッカーに表示される絵文字を自分好みにカスタマイズすることができます。 設定の「リアクション」で設定します。 +ピッカーに表示されよう絵文字を自分好みにカスタマイズできるで。 設定の「リアクション」で設定しいや。 ## リモート投稿へのリアクションについて -リアクションはMisskeyオリジナルの機能であるため、リモートインスタンスがMisskeyでない限りは、ほとんどの場合「Like」としてアクティビティが送信されます。一般的にはLikeは「お気に入り」として実装されているようです。 +リアクションはMisskeyオリジナルの機能やから、リモートインスタンスがMisskeyちゃうかったら、ほとんどの場合「Like」としてアクティビティが送信されんで。一般的にLikeは「お気に入り」として実装されようみたいや。 ## リモートからのリアクションについて -リモートから「Like」アクティビティを受信したとき、Misskeyでは「👍」のリアクションとして解釈されます。 +リモートから「Like」のアクティビティを受信したら、Misskeyでは「👍」のリアクションとして解釈されるで。 diff --git a/src/docs/ja-KS/features/word-mute.md b/src/docs/ja-KS/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/ja-KS/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/ja-KS/general/faq.md b/src/docs/ja-KS/general/faq.md index 1d0a63ce15..7da2423434 100644 --- a/src/docs/ja-KS/general/faq.md +++ b/src/docs/ja-KS/general/faq.md @@ -1,4 +1,4 @@ -# よくある質問 +# ようある質問 ここでは利用上のよくある質問について掲載しています。 Misskeyのプロジェクト自体についてのよくある質問は[こちら](./misskey)に掲載されています。 ## iOS/Androidのアプリはありますか? @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/ja-KS/general/glossary.md b/src/docs/ja-KS/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/ja-KS/general/glossary.md +++ b/src/docs/ja-KS/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/ja-KS/general/misskey.md b/src/docs/ja-KS/general/misskey.md index 3a24502e50..4bb6ca657a 100644 --- a/src/docs/ja-KS/general/misskey.md +++ b/src/docs/ja-KS/general/misskey.md @@ -43,7 +43,7 @@ Misskeyはビジネスではなく、利用は無料であるため、収益は ## クレジット Misskeyの開発者や、Misskeyに寄付をしてくださった方の一覧は[こちら](/about-misskey)で見ることができます。 -## よくある質問 +## ようある質問 ### プロジェクトは何を目指していますか? 強いて言うと、漠然的になりますが広く使われる汎用的なプラットフォームになることを目指しています。 Misskeyは他のプロジェクトとは違い、何らかの思想(例えば、反中央集権)やビジョンに基づいて開発が行われているわけではなく、その点ではフラットです。 それが逆に、特定の方向性に縛られないフレキシブルさを生み出すことに繋がっていると感じています。 diff --git a/src/docs/jbo-EN/features/mute-and-block.md b/src/docs/jbo-EN/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/jbo-EN/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/jbo-EN/features/word-mute.md b/src/docs/jbo-EN/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/jbo-EN/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/jbo-EN/general/faq.md b/src/docs/jbo-EN/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/jbo-EN/general/faq.md +++ b/src/docs/jbo-EN/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/jbo-EN/general/glossary.md b/src/docs/jbo-EN/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/jbo-EN/general/glossary.md +++ b/src/docs/jbo-EN/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/kab-KAB/features/mute-and-block.md b/src/docs/kab-KAB/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/kab-KAB/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/kab-KAB/features/word-mute.md b/src/docs/kab-KAB/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/kab-KAB/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/kab-KAB/general/faq.md b/src/docs/kab-KAB/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/kab-KAB/general/faq.md +++ b/src/docs/kab-KAB/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/kab-KAB/general/glossary.md b/src/docs/kab-KAB/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/kab-KAB/general/glossary.md +++ b/src/docs/kab-KAB/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/kn-IN/features/mute-and-block.md b/src/docs/kn-IN/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/kn-IN/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/kn-IN/features/word-mute.md b/src/docs/kn-IN/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/kn-IN/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/kn-IN/general/faq.md b/src/docs/kn-IN/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/kn-IN/general/faq.md +++ b/src/docs/kn-IN/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/kn-IN/general/glossary.md b/src/docs/kn-IN/general/glossary.md index 02fb1b92bc..a560d22240 100644 --- a/src/docs/kn-IN/general/glossary.md +++ b/src/docs/kn-IN/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## ನಿದರ್ಶನ todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/ko-KR/features/mute-and-block.md b/src/docs/ko-KR/features/mute-and-block.md new file mode 100644 index 0000000000..fa063cc2db --- /dev/null +++ b/src/docs/ko-KR/features/mute-and-block.md @@ -0,0 +1,41 @@ +# 뮤트 및 차단 +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## 뮤트 +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## 차단 +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/ko-KR/features/word-mute.md b/src/docs/ko-KR/features/word-mute.md new file mode 100644 index 0000000000..0138224db0 --- /dev/null +++ b/src/docs/ko-KR/features/word-mute.md @@ -0,0 +1,20 @@ +# 단어 뮤트 +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/ko-KR/general/faq.md b/src/docs/ko-KR/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/ko-KR/general/faq.md +++ b/src/docs/ko-KR/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/ko-KR/general/glossary.md b/src/docs/ko-KR/general/glossary.md index 3edb33a73b..09ab838a39 100644 --- a/src/docs/ko-KR/general/glossary.md +++ b/src/docs/ko-KR/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## 인스턴스 todo +## 커스텀 이모지 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## 사일런스 ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## 작업 대기열 +アクティビティ配送などを順番に行うためのシステム。 + ## 정지 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/nl-NL/features/mute-and-block.md b/src/docs/nl-NL/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/nl-NL/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/nl-NL/features/word-mute.md b/src/docs/nl-NL/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/nl-NL/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/nl-NL/general/faq.md b/src/docs/nl-NL/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/nl-NL/general/faq.md +++ b/src/docs/nl-NL/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/nl-NL/general/glossary.md b/src/docs/nl-NL/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/nl-NL/general/glossary.md +++ b/src/docs/nl-NL/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/no-NO/features/mute-and-block.md b/src/docs/no-NO/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/no-NO/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/no-NO/features/word-mute.md b/src/docs/no-NO/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/no-NO/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/no-NO/general/faq.md b/src/docs/no-NO/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/no-NO/general/faq.md +++ b/src/docs/no-NO/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/no-NO/general/glossary.md b/src/docs/no-NO/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/no-NO/general/glossary.md +++ b/src/docs/no-NO/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/pl-PL/features/mute-and-block.md b/src/docs/pl-PL/features/mute-and-block.md new file mode 100644 index 0000000000..dab2d2fc37 --- /dev/null +++ b/src/docs/pl-PL/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Wycisz / Zablokuj +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Wycisz +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Zablokuj +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/pl-PL/features/word-mute.md b/src/docs/pl-PL/features/word-mute.md new file mode 100644 index 0000000000..6896b5374d --- /dev/null +++ b/src/docs/pl-PL/features/word-mute.md @@ -0,0 +1,20 @@ +# Wyciszenie słowa +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/pl-PL/general/faq.md b/src/docs/pl-PL/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/pl-PL/general/faq.md +++ b/src/docs/pl-PL/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/pl-PL/general/glossary.md b/src/docs/pl-PL/general/glossary.md index 8a24bd214c..9e51aaa523 100644 --- a/src/docs/pl-PL/general/glossary.md +++ b/src/docs/pl-PL/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Instancja todo +## Niestandardowe emoji +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Wycisz ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Kolejka zadań +アクティビティ配送などを順番に行うためのシステム。 + ## Zawieś アカウントが使用不可に設定されている状態。 diff --git a/src/docs/pt-PT/features/mute-and-block.md b/src/docs/pt-PT/features/mute-and-block.md new file mode 100644 index 0000000000..9846a9ee43 --- /dev/null +++ b/src/docs/pt-PT/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Silenciar +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/pt-PT/features/word-mute.md b/src/docs/pt-PT/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/pt-PT/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/pt-PT/general/faq.md b/src/docs/pt-PT/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/pt-PT/general/faq.md +++ b/src/docs/pt-PT/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/pt-PT/general/glossary.md b/src/docs/pt-PT/general/glossary.md index 666f703585..5e31b0d4be 100644 --- a/src/docs/pt-PT/general/glossary.md +++ b/src/docs/pt-PT/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/ru-RU/features/mute-and-block.md b/src/docs/ru-RU/features/mute-and-block.md new file mode 100644 index 0000000000..7b2c74c26e --- /dev/null +++ b/src/docs/ru-RU/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Скрытие и блокировка +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Скрыть +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Заблокировать +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/ru-RU/features/word-mute.md b/src/docs/ru-RU/features/word-mute.md new file mode 100644 index 0000000000..e8671bbc6e --- /dev/null +++ b/src/docs/ru-RU/features/word-mute.md @@ -0,0 +1,20 @@ +# Скрытие слов +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/ru-RU/general/faq.md b/src/docs/ru-RU/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/ru-RU/general/faq.md +++ b/src/docs/ru-RU/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/ru-RU/general/glossary.md b/src/docs/ru-RU/general/glossary.md index 573dd2a327..c87e622a02 100644 --- a/src/docs/ru-RU/general/glossary.md +++ b/src/docs/ru-RU/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Инстанс todo +## Эмодзи пользователя +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Заглушить ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Очередь заданий +アクティビティ配送などを順番に行うためのシステム。 + ## Заморозить アカウントが使用不可に設定されている状態。 diff --git a/src/docs/th-TH/features/mute-and-block.md b/src/docs/th-TH/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/th-TH/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/th-TH/features/word-mute.md b/src/docs/th-TH/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/th-TH/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/th-TH/general/faq.md b/src/docs/th-TH/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/th-TH/general/faq.md +++ b/src/docs/th-TH/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/th-TH/general/glossary.md b/src/docs/th-TH/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/th-TH/general/glossary.md +++ b/src/docs/th-TH/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/ug-CN/features/mute-and-block.md b/src/docs/ug-CN/features/mute-and-block.md new file mode 100644 index 0000000000..d78a7cea49 --- /dev/null +++ b/src/docs/ug-CN/features/mute-and-block.md @@ -0,0 +1,41 @@ +# ミュートとブロック +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## ミュート +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## ブロック +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/ug-CN/features/word-mute.md b/src/docs/ug-CN/features/word-mute.md new file mode 100644 index 0000000000..fa4d14346d --- /dev/null +++ b/src/docs/ug-CN/features/word-mute.md @@ -0,0 +1,20 @@ +# ワードミュート +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/ug-CN/general/faq.md b/src/docs/ug-CN/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/ug-CN/general/faq.md +++ b/src/docs/ug-CN/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/ug-CN/general/glossary.md b/src/docs/ug-CN/general/glossary.md index b2a1fb626f..bb8a243369 100644 --- a/src/docs/ug-CN/general/glossary.md +++ b/src/docs/ug-CN/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## インスタンス todo +## カスタム絵文字 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## サイレンス ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## ジョブキュー +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 diff --git a/src/docs/uk-UA/features/mute-and-block.md b/src/docs/uk-UA/features/mute-and-block.md new file mode 100644 index 0000000000..f9f6f0cb8f --- /dev/null +++ b/src/docs/uk-UA/features/mute-and-block.md @@ -0,0 +1,41 @@ +# Заглушення і блокування +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## Ігнорувати +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## Заблокувати +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/uk-UA/features/word-mute.md b/src/docs/uk-UA/features/word-mute.md new file mode 100644 index 0000000000..73b41af281 --- /dev/null +++ b/src/docs/uk-UA/features/word-mute.md @@ -0,0 +1,20 @@ +# Блокування слів +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/uk-UA/general/faq.md b/src/docs/uk-UA/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/uk-UA/general/faq.md +++ b/src/docs/uk-UA/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/uk-UA/general/glossary.md b/src/docs/uk-UA/general/glossary.md index 9cf155943b..38f46670f9 100644 --- a/src/docs/uk-UA/general/glossary.md +++ b/src/docs/uk-UA/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## Інстанс todo +## Кастомні емоджі +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## Заглушити ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## Черга завдань +アクティビティ配送などを順番に行うためのシステム。 + ## Призупинити アカウントが使用不可に設定されている状態。 diff --git a/src/docs/zh-CN/features/mute-and-block.md b/src/docs/zh-CN/features/mute-and-block.md new file mode 100644 index 0000000000..39ed8459d0 --- /dev/null +++ b/src/docs/zh-CN/features/mute-and-block.md @@ -0,0 +1,41 @@ +# 屏蔽/拉黑 +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## 屏蔽 +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## 拉黑 +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/zh-CN/features/word-mute.md b/src/docs/zh-CN/features/word-mute.md new file mode 100644 index 0000000000..a1bd1918c9 --- /dev/null +++ b/src/docs/zh-CN/features/word-mute.md @@ -0,0 +1,20 @@ +# 文字屏蔽 +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/zh-CN/general/faq.md b/src/docs/zh-CN/general/faq.md index a430103eb0..b7f159c374 100644 --- a/src/docs/zh-CN/general/faq.md +++ b/src/docs/zh-CN/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## 想要开发一个Bot机器人 您可以使用 Misskey API 开发Bot机器人。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/zh-CN/general/glossary.md b/src/docs/zh-CN/general/glossary.md index 6ebd344db0..58cb1a9eeb 100644 --- a/src/docs/zh-CN/general/glossary.md +++ b/src/docs/zh-CN/general/glossary.md @@ -1,5 +1,5 @@ -# 用語集 -Misskeyに関する用語集です。 +# 术语表 +Misskey相关术语的词汇表。 ## ActivityPub (読み: あくてぃびてぃぱぶ) 分散型を実現するために用いられるプロトコル(仕様)。このプロトコルに則ってサーバー同士通信を行うことで、連合が行われ、Fediverseを形成しています。 @@ -40,7 +40,7 @@ Misskeyに関する用語集です。 ## STL ソーシャルタイムライン(Social TimeLine)の略。タイムラインの詳細は[こちら。](../features/timeline) -## 藍 +## 蓝 (読み: あい) Misskeyの看板娘(公式キャラクター)です。 ## アクティブユーザー @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## 实例 todo +## 自定义表情符号 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -56,13 +59,16 @@ todo todo ## 禁言 -ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。详情请看[这里。](../features/silence) + +## 作业队列 +アクティビティ配送などを順番に行うためのシステム。 ## 冻结 アカウントが使用不可に設定されている状態。 ## 网盘 -Misskeyにアップロードしたファイルを管理する機能。詳細は[こちら。](../features/drive) +Misskeyにアップロードしたファイルを管理する機能。详情请看[这里。](../features/drive) ## 帖子 Misskeyに投稿される、文章、ファイル、アンケートなどを含めることができるコンテンツ。詳細は[こちら。](../features/note) diff --git a/src/docs/zh-TW/features/mute-and-block.md b/src/docs/zh-TW/features/mute-and-block.md new file mode 100644 index 0000000000..baf0616a47 --- /dev/null +++ b/src/docs/zh-TW/features/mute-and-block.md @@ -0,0 +1,41 @@ +# 靜音和封鎖 +好みではないユーザーがいる場合は、ミュートを行うことでそのユーザーが自分から見えないようにすることができます。 また、より強力な措置として、ブロックを行うことでそのユーザーから自分のコンテンツが見えないようになるほか、自分に対して関わることができないようにすることができます。 ミュートされていることは相手は分かりませんが、ブロックされていることは相手に分かります。どちらを選ぶかはご自身の判断で行ってください。 + +
ℹ️ ミュートとブロックは併用できます。
+ +
⚠️ 利用規約に違反するような、迷惑なユーザーがいる場合は運営者に報告することも検討してください。
+ +設定>ミュートとブロック から、自分がミュートまたはブロックしているユーザー一覧を確認することができます。 + +## 靜音 +ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります: + +- タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote) +- そのユーザーからの通知 +- メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴 +- など + +ユーザーをミュートするには、対象のユーザーのユーザーページのメニューを開き、「ミュート」ボタンを押します。 + +
ℹ️ ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
+ +## 封鎖 +ユーザーをブロックすると、そのユーザーからあなたのコンテンツが見えないようになり、またあなたに対して以下のようなアクションをすることができなくなります。 + +- フォローする +- ユーザーリストに追加する +- 返信する、Renoteする +- リアクションする、アンケートに投票する +- メッセージを送信する +- など + +また、 + +- ブロックする際に既にそのユーザーからフォローされていた場合はフォローが解除されます。 +- ブロックする際に既にそのユーザーがあなたをユーザーリストに入れていた場合はそのリストからあなたが削除されます。 + +ユーザーをブロックするには、対象のユーザーのユーザーページのメニューを開き、「ブロック」ボタンを押します。 + +
⚠️ ブロックを行ったこと自体は相手に通知されませんが、フォローを行ったりなどの上記のアクションが行えなくなるので間接的にブロックされていることは分かります。
+ +
⚠️ 相手から自分のコンテンツが見えなくなりますが、相手がアカウントを切り替えたりログアウト状態になれば見ることができます。あくまで簡易的、補助的なものとしてお考えください。
diff --git a/src/docs/zh-TW/features/word-mute.md b/src/docs/zh-TW/features/word-mute.md new file mode 100644 index 0000000000..9916b10482 --- /dev/null +++ b/src/docs/zh-TW/features/word-mute.md @@ -0,0 +1,20 @@ +# 靜音文字 +ワードミュートの設定をすると、条件に合致したノートが表示されなくなります。 + +ワードミュートには、ソフトワードミュートとハードワードミュートの2種類があります。それぞれについて設定の方法と挙動を説明します。 + +## ソフトワードミュート +ソフトワードミュートは、クライアント(アプリ)側でミュートを判断するワードミュートです。 + +ノートが設定した条件に合致すると、「(ユーザー名)が何かを言いました」という表示で隠れます。 +クリックすると元の通りに表示されます。 + +## ハードワードミュート +ハードワードミュートは、アンテナのようにサーバーが新しいノートの本文に対して条件に合致するかどうか判断し、タイムラインから対象となったノートを除外します。 + +つまり、ハードワードミュートには、以下のような特徴があります。 + +* 条件設定後、新しい投稿のみがミュートの対象になります。 +* 条件を変更しても、過去にハードミュートされたノートはミュートされたままになります。 +* 「○○が何かを言いました」でタイムラインが埋まることがありません。 +* ソフトミュートに非対応のアプリでも、ハードミュートは適用されます。 diff --git a/src/docs/zh-TW/general/faq.md b/src/docs/zh-TW/general/faq.md index 1d0a63ce15..c272b2ad42 100644 --- a/src/docs/zh-TW/general/faq.md +++ b/src/docs/zh-TW/general/faq.md @@ -23,3 +23,6 @@ MFMには、そのURLのプレビューを無効にする構文があります ## Botを開発したい Misskey APIを利用してBotの開発が可能です。[こちら](../advanced/develop-bot)をご確認ください。 + +## ノートの翻訳機能はどのサービスを使用していますか? +[DeepL](https://www.deepl.com/)を使用しています。 diff --git a/src/docs/zh-TW/general/glossary.md b/src/docs/zh-TW/general/glossary.md index e6860cb180..3cd3dd00fa 100644 --- a/src/docs/zh-TW/general/glossary.md +++ b/src/docs/zh-TW/general/glossary.md @@ -49,6 +49,9 @@ Misskeyに関する用語集です。 ## 實例 todo +## 自訂表情符號 +サーバーで用意された絵文字。カスタム絵文字ではない通常の絵文字は「Unicode絵文字」と区別して呼ばれる。 + ## コントロールパネル インスタンスの設定画面のこと。 @@ -58,6 +61,9 @@ todo ## 禁言 ノートをパブリックな公開範囲で投稿できなくされている状態。モデレーターの判断でユーザーごとに設定されます。詳細は[こちら。](../features/silence) +## 佇列 +アクティビティ配送などを順番に行うためのシステム。 + ## 凍結 アカウントが使用不可に設定されている状態。 From 7387e010c281ae12d92bee80d1f7f284a0df3be7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Aug 2021 17:59:13 +0900 Subject: [PATCH 32/32] 12.89.0 --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ac26311ab..fddba34870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ --> -## 12.x.x (unreleased) +## 12.89.0 (2021/08/21) ### Improvements - アカウント削除の安定性を向上 diff --git a/package.json b/package.json index e73116cc26..7754fb9281 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "12.88.0", + "version": "12.89.0", "codename": "indigo", "repository": { "type": "git",