Commit Graph

19 Commits (9e2700b89d6ab06cb404005f062ba7e5d9c7c341)

Author SHA1 Message Date
Chocobozzz 9e2700b89d
Fix lint 2024-02-22 10:32:28 +01:00
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 03902b0099
Correctly handle 502 errors 2023-02-17 10:11:15 +01:00
Chocobozzz d522369bed
Prevent sending log error to server on 404 2022-12-28 15:15:44 +01:00
Chocobozzz 1c048f04a5
Fix bad date display for jobs 2022-10-25 16:08:11 +02:00
Chocobozzz d12b40fb96
Implement two factor in client 2022-10-07 11:06:28 +02:00
Chocobozzz f228e9f064
More precise date for jobs 2022-08-10 10:26:20 +02:00
Chocobozzz 42b4063699
Add ability for client to create server logs 2022-07-18 11:37:18 +02:00
Chocobozzz eaa529528c
Support ICU in TS components 2022-06-08 13:40:40 +02:00
Chocobozzz e8bffe9690
Remove unnecessary function 2022-01-18 11:37:29 +01:00
Chocobozzz 9df52d660f
Migrate client to eslint 2021-08-18 08:35:06 +02:00
Chocobozzz 1378c0d343
Fix client lint 2021-08-17 14:01:45 +02:00
Chocobozzz c0e8b12e7f
Refactor requests 2021-07-20 15:27:18 +02:00
Rigel Kent 76148b27f7 refactor API errors to standard error format 2021-06-02 16:57:07 +02:00
Rigel Kent ab398a05e9 redirect to login on 401, display error variants in 404 component 2021-01-25 15:37:26 +01:00
Rigel Kent f2eb23cd87
emit more specific status codes on video upload (#3423)
- reduce http status codes list to potentially useful codes
- convert more codes to typed ones
- factorize html generator for error responses
2020-12-08 21:16:10 +01:00
Rigel Kent dc5bb5cea5
reword unclear sentences, check for grammar
fixes #3222
2020-11-12 21:09:28 +01:00
Chocobozzz 66357162f8
Migrate to $localize
* Remove i18n polyfill to translate things in components
 * Reduce bundle sizes
 * Improve runtime perf
 * Reduce a lot the time to make a full client build
 * Reduce client build complexity
 * We don't need a service to translate things anymore (so we will be able to translate title pages etc)

Unfortunately we may loose some translations in the migration process.
I'll put a message on weblate to notify translators
2020-08-14 10:28:30 +02:00
Chocobozzz 67ed6552b8 Reorganize client shared modules 2020-06-23 16:00:49 +02:00