1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00
Commit graph

22 commits

Author SHA1 Message Date
Chocobozzz
3a4992633e
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge
conflicts, but it's a major step forward:

 * Server can be faster at startup because imports() are async and we can
   easily lazy import big modules
 * Angular doesn't seem to support ES import (with .js extension), so we
   had to correctly organize peertube into a monorepo:
    * Use yarn workspace feature
    * Use typescript reference projects for dependencies
    * Shared projects have been moved into "packages", each one is now a
      node module (with a dedicated package.json/tsconfig.json)
    * server/tools have been moved into apps/ and is now a dedicated app
      bundled and published on NPM so users don't have to build peertube
      cli tools manually
    * server/tests have been moved into packages/ so we don't compile
      them every time we want to run the server
 * Use isolatedModule option:
   * Had to move from const enum to const
     (https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
   * Had to explictely specify "type" imports when used in decorators
 * Prefer tsx (that uses esbuild under the hood) instead of ts-node to
   load typescript files (tests with mocha or scripts):
     * To reduce test complexity as esbuild doesn't support decorator
       metadata, we only test server files that do not import server
       models
     * We still build tests files into js files for a faster CI
 * Remove unmaintained peertube CLI import script
 * Removed some barrels to speed up execution (less imports)
2023-08-11 15:02:33 +02:00
Chocobozzz
4638cd713d
Don't inject untrusted input
Even if it's already checked in middlewares
It's better to have safe modals too
2022-11-15 14:41:55 +01:00
Chocobozzz
a85d530384
Remove unnecessary logs 2022-08-17 14:58:40 +02:00
Chocobozzz
396f6f0140
Cleanup useless express validator messages 2022-08-17 14:27:04 +02:00
Chocobozzz
41fb13c330
esModuleInterop to true 2021-08-27 15:12:22 +02:00
Chocobozzz
c0e8b12e7f
Refactor requests 2021-07-20 15:27:18 +02:00
Chocobozzz
d4a8e7a65f Support short uuid for GET video/playlist 2021-06-29 14:56:35 +02:00
Chocobozzz
10363c74c1
Move middleware utils in middlewares
helpers modules should not import models
2021-06-03 18:03:36 +02:00
Rigel Kent
76148b27f7 refactor API errors to standard error format 2021-06-02 16:57:07 +02:00
Chocobozzz
17b7d4b315
Don't allow manual redundancy of live videos 2020-12-07 16:07:52 +01:00
Rigel Kent
2d53be0267
replace numbers with typed http status codes (#3409) 2020-12-07 14:32:36 +01:00
Chocobozzz
a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz
b764380ac2 Add ability to list redundancies 2020-01-28 11:35:26 +01:00
Chocobozzz
d5d9b6d7bf
Update server dependencies 2019-10-21 15:03:28 +02:00
Chocobozzz
453e83ea5d
Stronger model typings 2019-08-19 17:26:35 +02:00
Chocobozzz
c8861d5dc0
Fix express validator 2019-07-25 16:23:44 +02:00
Chocobozzz
3e753302d8 Refactor middleware helpers 2019-07-24 10:58:16 +02:00
Chocobozzz
dae86118ed
Cleanup express locals typings 2019-03-19 10:35:15 +01:00
Chocobozzz
0f6acda116
Does exist 2019-03-19 09:26:50 +01:00
Chocobozzz
0920929696 Add hls support on server 2019-02-11 09:13:02 +01:00
Chocobozzz
46f8d69b4e
Fix redundancy with videos already duplicated with another instance 2018-10-01 09:41:48 +02:00
Chocobozzz
c48e82b5e0 Basic video redundancy implementation 2018-09-13 14:05:49 +02:00