egirlskey/packages/backend
okayurisotto e35a370af0
refactor(backend): core/activitypub (#11247)
* eslint: `explicit-function-return-type`

* eslint: `no-unnecessary-condition`

* eslint: `eslint-disable-next-line`

* eslint: `no-unused-vars`

* eslint: `comma-dangle`

* eslint: `import/order`

* cleanup: unnecessary non-null assertion

* cleanup: `IActivity`に`actor`は常に存在するようなので

* cleanup: unnecessary `as`

* cleanup: unnecessary `Promise.resolve`

* cleanup

* refactor: `String.prototype.match()`である必要がない部分をよりシンプルな書き方に変更

* refactor: よりよい型定義

* refactor: よりよい型定義

- `LdSignature`の`normalize`メソッドでの使われ方から、
	- `data`引数の型定義を`any`から`JsonLdDocument`へ修正
	- `getLoader`メソッドの返り値の型定義の一部を`any`から`RemoteDocument`へ修正
		- `contextUrl`が不正な値(`null`)となっていたことが判明したため`undefined`へ修正
		- `document`の型と合わせるために`CONTEXTS`の型定義の一部を`unknown`から`JsonLd`へ修正
			- とりあえず`satisfies`を使用
		- `document`の型と合わせるために`fetchDocument`メソッドの返り値の型定義の一部を`unknown`から`JsonLd`へ修正
			- どうしようもなく`as`を使用

* refactor: 型ガードを使うことでnon-null assertionをやめた

* refactor: non-null assertionをやめた

`.filter()`で行っている型ガードなどの文脈から、より適しているだろうと思われる書き方に変更した。

* refactor: 型ガードを使うことで`as`をやめた

* refactor: `as`をやめた

* refactor: よりよい型定義

- `id`は`null`とのunionになっていたが、`null`を渡している場面はなかった
	- またおそらくこのメソッドは`IOrderedCollection`を返すため、そちらに合わせて`null`とのunionをやめた
		- `IOrderedCollection`とはまだ型に相違がある
- `totalItems`をコメントや使われ方を元に`number`へ推論

* refactor: `for-of` -> `Array.prototype.map`

* refactor: `delete`演算子を使わない形に
2023-07-13 12:48:34 +09:00
..
.vscode Update settings.json 2022-04-15 21:33:00 +09:00
assets perf(backend): make some features optionable 2023-07-02 16:02:32 +09:00
migration 広告の曜日を設定できるように (#10095) 2023-07-08 08:56:11 +09:00
nsfw-model feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
src refactor(backend): core/activitypub (#11247) 2023-07-13 12:48:34 +09:00
test refactor(backend): skip fetching notes when the data is same-origin (#11200) 2023-07-09 08:59:44 +09:00
.eslintignore use eslint 2021-11-12 10:35:41 +09:00
.eslintrc.cjs test(server): add validation test of api:notes/create (#10090) 2023-02-26 11:28:05 +09:00
.madgerc Create .madgerc 2022-09-20 01:04:08 +09:00
.swcrc refactor(backend): use node16 for moduleResolution (#10938) 2023-06-25 21:13:15 +09:00
check_connect.js fix check_connect.js 2023-04-14 05:14:00 +00:00
jest.config.cjs test(backend): APIテストの復活 (#10163) 2023-03-03 11:13:12 +09:00
jsconfig.json use eslint 2021-11-12 10:35:41 +09:00
ormconfig.js fix: postgre -> postgres (#9814) 2023-02-07 19:50:38 +09:00
package.json use engines 2023-07-08 08:52:51 +09:00
README.md chore: ✌️ 2022-12-24 14:39:17 +09:00
tsconfig.json refactor(backend): use node16 for moduleResolution (#10938) 2023-06-25 21:13:15 +09:00
watch.mjs Revert "perf: build backend with swc (#9463)" 2023-01-13 09:32:56 +09:00

Misskey Backend