syuilo
6ba668f934
fix(test): make chart tests working
2022-06-05 20:37:24 +09:00
Johann150
ec47b46423
refactor: improve code quality ( #8751 )
...
* remove unnecessary if
`Array.prototype.some` already returns a boolean so an if to return
true or false is completely unnecessary in this case.
* perf: use count instead of find
When using `count` instead of `findOneBy`, the data is not
unnecessarily loaded.
* remove duplicate null check
The variable is checked for null in the lines above and the function
returns if so. Therefore, it can not be null at this point.
* simplify `getJsonSchema`
Because the assigned value is `null` and the used keys are only
shallow, use of `nestedProperty.set` seems inappropriate. Because the
value is not read, the initial for loop can be replaced by a `for..in`
loop.
Since all keys will be assigned `null`, the condition of the ternary
expression in the nested function will always be true. Therefore the
recursion case will never happen. With this the nested function can be
eliminated.
* remove duplicate condition
The code above already checks `dragging` and returns if it is truthy.
Checking it again later is therefore unnecessary.
To make this more obvious the `return` is removed in favour of using
an if...else construct.
* remove impossible "unknown" time
The `ago` variable will always be a number and all non-negative numbers
are already covered by other cases, the negative case is handled with
`future` so there is no case when `unkown` could be achieved.
2022-05-29 15:15:52 +09:00
syuilo
523ee14a73
refactor: migrate to typeorm 3.0 ( #8443 )
...
* wip
* wip
* wip
* Update following.ts
* wip
* wip
* wip
* Update resolve-user.ts
* maxQueryExecutionTime
* wip
* wip
2022-03-26 15:34:00 +09:00
syuilo
3b95fce051
fix federation chart
2022-03-08 22:56:46 +09:00
syuilo
e3afe9fd82
delete needless instance drive columns
2022-03-07 21:20:14 +09:00
syuilo
13dfafb1dd
feat: add active to federation chart
2022-03-07 15:10:16 +09:00
syuilo
5ab7362d4c
fix query error
2022-03-04 18:18:37 +09:00
syuilo
2606e10d55
enhance(chart): better federation pub/sub calculation
2022-03-04 16:26:10 +09:00
syuilo
94f294da59
fix federation chart pubsub
2022-03-04 15:32:50 +09:00
syuilo
94228778c9
refactor: Use ESM ( #8358 )
...
* wip
* wip
* fix
* clean up
* Update tsconfig.json
* Update activitypub.ts
* wip
2022-02-27 11:07:39 +09:00
syuilo
2f83378acc
feat: add pub & sub item for federation chart
2022-02-23 16:17:16 +09:00
syuilo
81c7db0744
refactor: use ajv instead of cafy ( #8324 )
...
* wip
* wip
* Update abuse-user-reports.ts
* Update files.ts
* Update list-remote.ts
* Update list.ts
* Update show-users.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update update.ts
* Update search.ts
* Update reactions.ts
* Update search.ts
* wip
* wip
* wip
* wip
* Update update.ts
* Update relation.ts
* Update available.ts
* wip
* wip
* wip
* Update packages/backend/src/server/api/define.ts
Co-authored-by: Johann150 <johann.galle@protonmail.com>
* Update define.ts
* Update define.ts
* typo
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update update.ts
* wip
* Update signup.ts
* Update call.ts
* minimum for limit
* type
* remove needless annotation
* wip
* Update signup.ts
* wip
* wip
* fix
* Update create.ts
Co-authored-by: Johann150 <johann.galle@protonmail.com>
2022-02-19 14:05:32 +09:00
syuilo
9b76f8d963
refactor: better getChart result type
2022-02-18 22:29:23 +09:00
syuilo
4a24258007
refactor: fix types
2022-02-13 12:46:52 +09:00
syuilo
f3853f76af
refactor: fix types
2022-02-13 01:39:58 +09:00
syuilo
48fe5b1499
enhance: improve federation chart
2022-02-10 17:45:12 +09:00
syuilo
94365e97e9
fix(server): チャートのcleanでエラーが出る可能性がある問題を修正
2022-02-09 03:55:49 +09:00
syuilo
30a153e6ee
fix(server): チャートのresyncでエラーが出る問題を修正
...
Fix #8274
2022-02-09 03:51:43 +09:00
syuilo
4d05c3e8a9
feat: introduce intersection calculation of charts
2022-02-09 03:46:58 +09:00
syuilo
61f855429f
feat: improve federation chart
2022-02-08 23:43:51 +09:00
syuilo
756201ebef
feat: notes/instance/perUserNotesチャートに添付ファイル付きノートの数を追加
2022-02-08 23:12:37 +09:00
syuilo
74f66c6a62
chore: remove unused code
2022-02-08 22:49:44 +09:00
syuilo
06180d1331
fix
2022-02-06 08:39:23 +09:00
syuilo
b0da30469d
imprpve active users chart
2022-02-06 06:24:06 +09:00
syuilo
ed86093869
fix chart clean
2022-02-06 02:16:52 +09:00
syuilo
eaad6e188c
Improve chart engine ( #8253 )
...
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update core.ts
* wip
* wip
* #7361
* delete network chart
* federationChart強化 apRequestChart追加
* tweak
2022-02-06 00:13:52 +09:00
tamaina
66ef4f1ebe
refactor: APIエンドポイントファイルの定義を良い感じにする ( #8154 )
...
* Fix API Schema Error
* Delete SimpleSchema/SimpleObj
and Move schemas to dedicated files
* Userのスキーマを分割してみる
* define packMany type
* add ,
* Ensure enum schema and Make "as const" put once
* test?
* Revert "test?"
This reverts commit 97dc9bfa70851bfb7d1cf38e883f8df20fb78b79.
* Revert "Fix API Schema Error"
This reverts commit 21b6176d974ed8e3eb73723ad21a105c5d297323.
* ✌️
* clean up
* test?
* wip
* wip
* better schema def
* ✌️
* fix
* add minLength property
* wip
* wip
* wip
* anyOf/oneOf/allOfに対応? ~ relation.ts
* refactor!
* Define MinimumSchema
* wip
* wip
* anyOf/oneOf/allOfが動作するようにUnionSchemaTypeを修正
* anyOf/oneOf/allOfが動作するようにUnionSchemaTypeを修正
* Update packages/backend/src/misc/schema.ts
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* fix
* array oneOfをより正確な型に
* array oneOfをより正確な型に
* wip
* ✌️
* なんかもういろいろ
* remove
* very good schema
* api schema
* wip
* refactor: awaitAllの型定義を変えてみる
* fix
* specify types in awaitAll
* specify types in awaitAll
* ✌️
* wip
* ...
* ✌️
* AllowDateはやめておく
* 不必要なoptional: false, nullable: falseを廃止
* Packedが展開されないように
* 続packed
* wip
* define note type
* wip
* UserDetailedをMeDetailedかUserDetailedNotMeかを区別できるように
* wip
* wip
* wip specify user type of other schemas
* ok
* convertSchemaToOpenApiSchemaを改修
* convertSchemaToOpenApiSchemaを改修
* Fix
* fix
* ✌️
* wip
* 分割代入ではなくallOfで定義するように
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2022-01-18 22:27:10 +09:00
syuilo
89bbcf1807
enhance(backend): improve chart engine
2021-12-14 18:12:37 +09:00
syuilo
9b8d526ed0
fix lint
2021-12-09 23:58:30 +09:00
syuilo
713ff43e9b
fix lint errors
2021-11-12 10:52:10 +09:00
syuilo
14148f6c4a
refactoring
...
Resolve #7779
2021-11-12 02:02:25 +09:00