18 Commits

Author SHA1 Message Date
Trim21 2a0d29c1f5 style: add new rule for imports (#785) 2024-08-13 22:31:39 +00:00
Jesse Chan efdd620192 dependencies: bump (major)
TODO: drop the "const argv = argvObj as Record<string, any>;" hack

Refs: yargs/yargs#2175
2022-05-07 16:41:10 -07:00
Jesse Chan e09accd696 server: drop databases before removing user 2022-05-01 14:55:50 -07:00
Jesse Chan af8de75e05 server: remove unused history snapshots and make it in-mem only 2021-10-31 23:21:20 -07:00
Jesse Chan 2b6ca5ff66 API: ditch inefficient "TRANSFER_SUMMARY_DIFF_CHANGE", always full update
TRANSFER_SUMMARY_DIFF_CHANGE is almost always full update:

```
[
{"op":"replace","path":"/downTotal","value":851320719382},
{"op":"replace","path":"/downRate","value":6139},
{"op":"replace","path":"/upTotal","value":1826972572184},
{"op":"replace","path":"/upRate","value":5480521}
]
```

which is generally less efficient than full object (TRANSFER_SUMMARY_FULL_UPDATE):

```
{
"upRate":5430724,
"upTotal":1827320521117,
"downRate":6062,
"downTotal":851321106383
}
```
2021-05-22 21:31:32 +08:00
Jesse Chan 37a94912f4 server: HistoryEra: replace NeDB callbacks with promises 2020-12-09 21:52:32 +08:00
Jesse Chan ed98e210f4 server: schema validate configurations
Unfortunately there are still many people who prefer static config
file. As such, schema validate the configurations to ensure that
the failure happens loud and early when the config.js is broken.

Also enforces that the length of secret must be larger than 30 as
the JWT secret can be brute forced locally without interaction with
the server.

This ensures that we always have proper configurations and avoids
unnecessary and bad defensive programming practices.
2020-11-14 15:20:23 +08:00
Jesse Chan d592152967 API: client: remove [down/up]Throttle, clarify throttleGlobal[Down/Up]Max unit 2020-11-08 01:57:50 +08:00
Jesse Chan 48220af88b server: services: properly extends destroy function by calling super 2020-11-02 22:42:33 +08:00
Jesse Chan 017b9d159d server: replace explicit binds with arrow functions 2020-11-02 19:32:33 +08:00
Jesse Chan 56306af3b2 historyService: check if this.snapshots[snapshot] is defined 2020-10-27 14:27:01 +08:00
Jesse Chan 9875883fb3 TransferDataStore: fix initial transfer speed history population 2020-10-25 08:27:52 -05:00
Jesse Chan 0e57e36663 client: migrate from Flux to MobX 2020-10-25 06:06:53 -05:00
Jesse Chan 8d2959edfc API: activity-stream: migrate all diff actions to JSON Patch 2020-10-20 20:31:08 +08:00
Jesse Chan 1f76f320c5 server: clientGatewayService: define interface 2020-10-17 13:44:06 +08:00
Jesse Chan 95cf01f598 server: migrate torrent details functions to TypeScript 2020-10-17 13:24:14 +08:00
Jesse Chan 16465f4239 server: migrate method call configs to immutable arrays 2020-10-07 00:36:11 +08:00
Jesse Chan 43b2d8fbbf server: services: migrate to TypeScript 2020-09-27 22:27:14 +08:00