Commit Graph

45 Commits (273d57023becd32c2728ace16341e99f242ff387)

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
Wicklow 40346ead2b
Feature/password protected videos (#5836)
* Add server endpoints

* Refactoring test suites

* Update server and add openapi documentation

* fix compliation and tests

* upload/import password protected video on client

* add server error code

* Add video password to update resolver

* add custom message when sharing pw protected video

* improve confirm component

* Add new alert in component

* Add ability to watch protected video on client

* Cannot have password protected replay privacy

* Add migration

* Add tests

* update after review

* Update check params tests

* Add live videos test

* Add more filter test

* Update static file privacy test

* Update object storage tests

* Add test on feeds

* Add missing word

* Fix tests

* Fix tests on live videos

* add embed support on password protected videos

* fix style

* Correcting data leaks

* Unable to add password protected privacy on replay

* Updated code based on review comments

* fix validator and command

* Updated code based on review comments
2023-06-29 09:48:55 +02:00
Chocobozzz 5490930428
Remove suppressImplicitAnyIndexErrors
It's deprecated by TS
2023-05-24 16:56:05 +02:00
Chocobozzz d0fbc9fd0a
Fix lint 2023-05-24 15:27:15 +02:00
Wicklow cadc1a1b0b
Add an option to provide responsive embed (#5690)
* Add option to provide responsive embed

* Fix typo

* More understandable parameter
2023-03-14 09:32:16 +01:00
Chocobozzz 3a380e9a71
Merge branch 'release/5.0.0' into develop 2023-01-24 13:43:25 +01:00
Chocobozzz 2e5dd0bef8
Handle hook with Promise as result 2023-01-24 13:42:55 +01:00
Chocobozzz 2570fd9c1c
Redirect to default login url on 401
Can be an external URL
2023-01-04 11:41:29 +01:00
Chocobozzz d522369bed
Prevent sending log error to server on 404 2022-12-28 15:15:44 +01:00
Chocobozzz 3545e72c68 Put private videos under a specific subdirectory 2022-10-24 14:48:24 +02:00
Chocobozzz 6a02dd1c3d
Fix metric with old webtorrent videos 2022-08-17 10:51:51 +02:00
Chocobozzz 426a8cab45
Add more info to client error stacktrace 2022-08-17 09:53:47 +02:00
Chocobozzz de61544582
Add plugin hooks/placeholder to share modal 2022-08-11 15:28:11 +02:00
Chocobozzz 9ca0f688e9
Add channel hooks 2022-08-03 10:39:40 +02:00
Chocobozzz 22df69fdec
Add job queue hooks 2022-08-02 15:50:05 +02:00
Chocobozzz 42b4063699
Add ability for client to create server logs 2022-07-18 11:37:18 +02:00
kontrollanten f8b4a71d42
hooks filter:api.my-lib.playlist-elems.get.* (#5098)
* hooks filter:api.my-lib.playlist-elems.get.*

closes #4776

* Introduce my-library plugin scope

Co-authored-by: Chocobozzz <me@florianbigard.com>
2022-07-08 10:50:10 +02:00
Chocobozzz f1a0f3b701
Refactor embed 2022-05-31 10:39:56 +02:00
Chocobozzz ff6a266e3f
Clearer theme select labels 2022-03-15 15:19:41 +01:00
Chocobozzz 57d6503286
Reorganize player files 2022-03-14 14:36:35 +01:00
Chocobozzz fb3c9e2bf5
Translate plugin settings 2021-12-29 14:08:07 +01:00
Chocobozzz c7cdac4409
Fix type conflict 2021-12-24 10:40:51 +01:00
Chocobozzz a9bfa85d2c
Add ability for admins to set default p2p policy 2021-12-16 10:08:55 +01:00
Chocobozzz d63e6d4604
Add ability for plugins to register client routes 2021-12-10 15:01:12 +01:00
Chocobozzz 0bc53e2029
Add ability to redirect users on external auth 2021-12-03 17:04:47 +01:00
Chocobozzz 52d1477ac4
Fix client build 2021-10-11 09:37:26 +02:00
Chocobozzz db9df9a72c
Fix local/session storage polyfill 2021-10-11 09:37:26 +02:00
Chocobozzz 0ea2f79d45
Safer image preview 2021-09-08 10:16:39 +02:00
Chocobozzz 2b36e477bf
Add import polyfill 2021-08-30 14:13:31 +02: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
kontrollanten 72f611ca15 add client hook filter:videojs.options
closes #4086
2021-06-14 13:35:48 +02:00
Chocobozzz fc21ef5c62
Speed up plugins loading 2021-06-04 15:45:44 +02:00
Chocobozzz 0f01a8bacd Remove ngx-meta
Unmaintained
2021-05-27 16:00:13 +02:00
Chocobozzz 428ccb8b7a
Reorganize plugin models 2021-05-11 13:33:11 +02:00
Chocobozzz 3c47fa3bc0
Add ability to hide plugin settings 2021-04-09 13:50:31 +02:00
Chocobozzz 72aa835e17
Upgrade client dependencies 2021-02-03 11:44:43 +01:00
Rigel Kent afff310e50 allow private syndication feeds via a user feedToken 2020-11-25 11:07:56 +01:00
Chocobozzz 210856a7be
Try to fix live segments check 2020-11-10 14:15:59 +01:00
Rigel Kent 61379e4311
check for null local/session storage
fixes #3156
2020-11-06 17:42:25 +01:00
Chocobozzz 7294aab0c8 Add ability to set custom field to video form 2020-08-21 15:39:51 +02:00
Chocobozzz f95628636b Support plugin hooks in embed 2020-08-20 14:23:57 +02:00
Chocobozzz b4c3c51dc8
Fix circular dependencies 2020-08-14 17:28:54 +02:00
Chocobozzz a4ff3100d3 Cleanup tokens logic in embed 2020-08-07 08:55:02 +02:00
Rigel Kent 4504f09f6e deal with refresh token in embed 2020-08-06 15:08:58 +02:00