1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Migrate to pnpm

This commit is contained in:
Chocobozzz 2025-09-11 11:17:58 +02:00
parent bbc1afada5
commit 2cffe3d6ac
No known key found for this signature in database
GPG key ID: 583A612D890159BE
47 changed files with 23797 additions and 23122 deletions

View file

@ -79,7 +79,7 @@ First, you should use a server or PC with at least 4GB of RAM. Less RAM may lead
git clone https://github.com/Chocobozzz/PeerTube git clone https://github.com/Chocobozzz/PeerTube
cd PeerTube cd PeerTube
git remote add me git@github.com:YOUR_GITHUB_USERNAME/PeerTube.git git remote add me git@github.com:YOUR_GITHUB_USERNAME/PeerTube.git
yarn install --pure-lockfile npm run install-node-dependencies
``` ```
Note that development is done on the `develop` branch. If you want to hack on Note that development is done on the `develop` branch. If you want to hack on

View file

@ -11,32 +11,20 @@ runs:
using: "composite" using: "composite"
steps: steps:
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js - name: Use Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: ${{ inputs.node-version }} node-version: ${{ inputs.node-version }}
cache: 'pnpm'
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies - name: Install dependencies
shell: bash shell: bash
run: yarn install --frozen-lockfile run: npm run install-node-dependencies
- name: Install peertube runner dependencies
shell: bash
run: cd apps/peertube-runner && yarn install --frozen-lockfile
- name: Install peertube CLI dependencies
shell: bash
run: cd apps/peertube-cli && yarn install --frozen-lockfile
- name: Display PeerTube dependencies - name: Display PeerTube dependencies
shell: bash shell: bash

View file

@ -34,7 +34,7 @@ jobs:
run: | run: |
wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip" wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip"
unzip "scc-3.0.0-x86_64-unknown-linux.zip" unzip "scc-3.0.0-x86_64-unknown-linux.zip"
./scc --format=json --exclude-dir .git,node_modules,client/node_modules,client/dist,dist,yarn.lock,client/yarn.lock,client/src/locale,test1,test2,test3,client/src/assets/images,config,storage,packages/tests/fixtures,support/openapi,.idea,.vscode,docker-volume,ffmpeg-3,ffmpeg-4 > ./scc.json ./scc --format=json --exclude-dir .git,node_modules,client/node_modules,client/dist,dist,pnpm-lock.yaml,client/src/locale,test1,test2,test3,client/src/assets/images,config,storage,packages/tests/fixtures,support/openapi,.idea,.vscode,docker-volume,ffmpeg-3,ffmpeg-4 > ./scc.json
- name: PeerTube client stats - name: PeerTube client stats
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'

2
.gitignore vendored
View file

@ -1,9 +1,7 @@
# NPM instalation # NPM instalation
node_modules node_modules
*npm-debug.log *npm-debug.log
yarn-error.log
*-ci.log *-ci.log
.yarn
# Testing # Testing
/test1/ /test1/

View file

@ -10,8 +10,7 @@ See https://docs.joinpeertube.org/maintain/tools#remote-tools
```bash ```bash
cd peertube-root cd peertube-root
yarn install --pure-lockfile npm run install-node-dependencies
cd apps/peertube-cli && yarn install --pure-lockfile
``` ```
## Develop ## Develop

View file

@ -1,236 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@colors/colors@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
application-config-path@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/application-config-path/-/application-config-path-1.0.0.tgz#9c25b8c00ac9a342db27275abd3f38c67bbe5a05"
integrity sha512-6ZDlLTlfqrTybVzZJDpX2K2ZufqyMyiTbOG06GpxmkmczFgTN+YYRGcTcMCXv/F5P5SrZijVjzzpPUE9BvheLg==
application-config@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/application-config/-/application-config-3.0.0.tgz#9adec84dd2d81e97dd78ea0dffcbf97381a1f55c"
integrity sha512-7ViR4soQJDx2O9iLf1vGxvekkPqvwqV/AZ2OL3DNcAQrg03UjJE1VeBk7oYNoN9AKB0eNyVrcM7kPD30NKeLLw==
dependencies:
application-config-path "^1.0.0"
load-json-file "^7.0.1"
write-json-file "^5.0.0"
cli-table3@^0.6.0:
version "0.6.5"
resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f"
integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==
dependencies:
string-width "^4.2.0"
optionalDependencies:
"@colors/colors" "1.5.0"
cross-spawn@^6.0.0:
version "6.0.6"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.6.tgz#30d0efa0712ddb7eb5a76e1e8721bffafa6b5d57"
integrity sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==
dependencies:
nice-try "^1.0.4"
path-key "^2.0.1"
semver "^5.5.0"
shebang-command "^1.2.0"
which "^1.2.9"
debug@^3.1.0:
version "3.2.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
dependencies:
ms "^2.1.1"
detect-indent@^7.0.0:
version "7.0.1"
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-7.0.1.tgz#cbb060a12842b9c4d333f1cac4aa4da1bb66bc25"
integrity sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==
emoji-regex@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
execa@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50"
integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==
dependencies:
cross-spawn "^6.0.0"
get-stream "^3.0.0"
is-stream "^1.1.0"
npm-run-path "^2.0.0"
p-finally "^1.0.0"
signal-exit "^3.0.0"
strip-eof "^1.0.0"
get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
is-fullwidth-code-point@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
is-plain-obj@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0"
integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==
is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==
is-typedarray@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
load-json-file@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-7.0.1.tgz#a3c9fde6beffb6bedb5acf104fad6bb1604e1b00"
integrity sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
netrc-parser@^3.1.6:
version "3.1.6"
resolved "https://registry.yarnpkg.com/netrc-parser/-/netrc-parser-3.1.6.tgz#7243c9ec850b8e805b9bdc7eae7b1450d4a96e72"
integrity sha512-lY+fmkqSwntAAjfP63jB4z5p5WbuZwyMCD3pInT7dpHU/Gc6Vv90SAC6A0aNiqaRGHiuZFBtiwu+pu8W/Eyotw==
dependencies:
debug "^3.1.0"
execa "^0.10.0"
nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
npm-run-path@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==
dependencies:
path-key "^2.0.0"
p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==
path-key@^2.0.0, path-key@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==
semver@^5.5.0:
version "5.7.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==
dependencies:
shebang-regex "^1.0.0"
shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.7"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
sort-keys@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-5.1.0.tgz#50a3f3d1ad3c5a76d043e0aeeba7299241e9aa5c"
integrity sha512-aSbHV0DaBcr7u0PVHXzM6NbZNAtrr9sF6+Qfs9UUVG7Ll3jQ6hHi8F/xqIIcn2rvIVbr0v/2zyjSdwSV47AgLQ==
dependencies:
is-plain-obj "^4.0.0"
string-width@^4.2.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==
typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
dependencies:
is-typedarray "^1.0.0"
which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
dependencies:
isexe "^2.0.0"
write-file-atomic@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8"
integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==
dependencies:
imurmurhash "^0.1.4"
is-typedarray "^1.0.0"
signal-exit "^3.0.2"
typedarray-to-buffer "^3.1.5"
write-json-file@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-5.0.0.tgz#11c329a8ea9e8e23fb92a87cc27412a15f87708b"
integrity sha512-ddSsCLa4aQ3kI21BthINo4q905/wfhvQ3JL3774AcRjBaiQmfn5v4rw77jQ7T6CmAit9VOQO+FsLyPkwxoB1fw==
dependencies:
detect-indent "^7.0.0"
is-plain-obj "^4.0.0"
sort-keys "^5.0.0"
write-file-atomic "^3.0.3"

View file

@ -10,8 +10,7 @@ Commands below has to be run at the root of PeerTube git repository.
```bash ```bash
cd peertube-root cd peertube-root
yarn install --pure-lockfile npm run install-node-dependencies
cd apps/peertube-runner && yarn install --pure-lockfile
``` ```
### Develop ### Develop

View file

@ -5,10 +5,10 @@
"main": "dist/peertube-runner.js", "main": "dist/peertube-runner.js",
"bin": "dist/peertube-runner.js", "bin": "dist/peertube-runner.js",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": {},
"devDependencies": { "devDependencies": {
"@iarna/toml": "^2.2.5", "@iarna/toml": "^2.2.5",
"@types/follow-redirects": "1.14.4", "@types/follow-redirects": "1.14.4",
"cli-table3": "^0.6.5",
"env-paths": "^3.0.0", "env-paths": "^3.0.0",
"follow-redirects": "^1.15.5", "follow-redirects": "^1.15.5",
"net-ipc": "^2.2.2", "net-ipc": "^2.2.2",

View file

@ -21,7 +21,7 @@ import { processVideoTranscription } from './shared/process-transcription.js'
export async function processJob (options: ProcessOptions) { export async function processJob (options: ProcessOptions) {
const { server, job } = options const { server, job } = options
logger.info(`[${server.url}] Processing job of type ${job.type}: ${job.uuid}`, { payload: job.payload }) logger.info({ payload: job.payload }, `[${server.url}] Processing job of type ${job.type}: ${job.uuid}`)
switch (job.type) { switch (job.type) {
case 'vod-audio-merge-transcoding': case 'vod-audio-merge-transcoding':

View file

@ -57,7 +57,7 @@ export class RunnerServer {
try { try {
await ipcServer.run(this) await ipcServer.run(this)
} catch (err) { } catch (err) {
logger.error('Cannot start local socket for IPC communication', err) logger.error(err, 'Cannot start local socket for IPC communication')
process.exit(-1) process.exit(-1)
} }

View file

@ -63,6 +63,6 @@ export class IPCServer {
body: IPCResponse<T> body: IPCResponse<T>
) { ) {
response(body) response(body)
.catch(err => logger.error('Cannot send response after IPC request', err)) .catch(err => logger.error(err, 'Cannot send response after IPC request'))
} }
} }

View file

@ -1,287 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@iarna/toml@^2.2.5":
version "2.2.5"
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c"
integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==
"@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz#9edec61b22c3082018a79f6d1c30289ddf3d9d11"
integrity sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==
"@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz#33677a275204898ad8acbf62734fc4dc0b6a4855"
integrity sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==
"@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz#19edf7cdc2e7063ee328403c1d895a86dd28f4bb"
integrity sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==
"@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz#94fb0543ba2e28766c3fc439cabbe0440ae70159"
integrity sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==
"@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz#4a0609ab5fe44d07c9c60a11e4484d3c38bbd6e3"
integrity sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==
"@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz#0aa5502d547b57abfc4ac492de68e2006e417242"
integrity sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==
"@types/follow-redirects@1.14.4":
version "1.14.4"
resolved "https://registry.yarnpkg.com/@types/follow-redirects/-/follow-redirects-1.14.4.tgz#ca054d72ef574c77949fc5fff278b430fcd508ec"
integrity sha512-GWXfsD0Jc1RWiFmMuMFCpXMzi9L7oPDVwxUnZdg89kDNnqsRfUKXEtUYtA98A6lig1WXH/CYY/fvPW9HuN5fTA==
dependencies:
"@types/node" "*"
"@types/node@*":
version "24.1.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.1.0.tgz#0993f7dc31ab5cc402d112315b463e383d68a49c"
integrity sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==
dependencies:
undici-types "~7.8.0"
atomic-sleep@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b"
integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==
colorette@^2.0.7:
version "2.0.20"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==
dateformat@^4.6.3:
version "4.6.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5"
integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==
detect-libc@^2.0.1:
version "2.0.4"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8"
integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==
end-of-stream@^1.1.0:
version "1.4.5"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.5.tgz#7344d711dea40e0b74abc2ed49778743ccedb08c"
integrity sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==
dependencies:
once "^1.4.0"
env-paths@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-3.0.0.tgz#2f1e89c2f6dbd3408e1b1711dd82d62e317f58da"
integrity sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==
fast-copy@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/fast-copy/-/fast-copy-3.0.2.tgz#59c68f59ccbcac82050ba992e0d5c389097c9d35"
integrity sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==
fast-redact@^3.1.1:
version "3.5.0"
resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.5.0.tgz#e9ea02f7e57d0cd8438180083e93077e496285e4"
integrity sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==
fast-safe-stringify@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884"
integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==
fast-zlib@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/fast-zlib/-/fast-zlib-2.0.1.tgz#be624f592fc80ad8019ee2025d16a367a4e9b024"
integrity sha512-DCoYgNagM2Bt1VIpXpdGnRx4LzqJeYG0oh6Nf/7cWo6elTXkFGMw9CrRCYYUIapYNrozYMoyDRflx9mgT3Awyw==
follow-redirects@^1.15.5:
version "1.15.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1"
integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==
help-me@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/help-me/-/help-me-5.0.0.tgz#b1ebe63b967b74060027c2ac61f9be12d354a6f6"
integrity sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==
joycon@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03"
integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==
minimist@^1.2.6:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
msgpackr-extract@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz#e9d87023de39ce714872f9e9504e3c1996d61012"
integrity sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==
dependencies:
node-gyp-build-optional-packages "5.2.2"
optionalDependencies:
"@msgpackr-extract/msgpackr-extract-darwin-arm64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-darwin-x64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-linux-arm" "3.0.3"
"@msgpackr-extract/msgpackr-extract-linux-arm64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.3"
msgpackr@1.11.5:
version "1.11.5"
resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.11.5.tgz#edf0b9d9cb7d8ed6897dd0e42cfb865a2f4b602e"
integrity sha512-UjkUHN0yqp9RWKy0Lplhh+wlpdt9oQBYgULZOiFhV3VclSF1JnSQWZ5r9gORQlNYaUKQoR8itv7g7z1xDDuACA==
optionalDependencies:
msgpackr-extract "^3.0.2"
net-ipc@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/net-ipc/-/net-ipc-2.2.2.tgz#2c5e6042f2a7c1f388ab86744b8c0f0c2b3eb173"
integrity sha512-HGXL5ql3Moru1xaS79zEscXpoUyUwVy9arOplClKHDaEWfUaoyOtSLXLe1xUOHoyZ0aM61WtZg0TCYYRheYMvw==
optionalDependencies:
fast-zlib "2.0.1"
msgpackr "1.11.5"
node-gyp-build-optional-packages@5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz#522f50c2d53134d7f3a76cd7255de4ab6c96a3a4"
integrity sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==
dependencies:
detect-libc "^2.0.1"
on-exit-leak-free@^2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz#fed195c9ebddb7d9e4c3842f93f281ac8dadd3b8"
integrity sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==
once@^1.3.1, once@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
dependencies:
wrappy "1"
pino-abstract-transport@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-2.0.0.tgz#de241578406ac7b8a33ce0d77ae6e8a0b3b68a60"
integrity sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==
dependencies:
split2 "^4.0.0"
pino-pretty@^13.0.0:
version "13.0.0"
resolved "https://registry.yarnpkg.com/pino-pretty/-/pino-pretty-13.0.0.tgz#21d57fe940e34f2e279905d7dba2d7e2c4f9bf17"
integrity sha512-cQBBIVG3YajgoUjo1FdKVRX6t9XPxwB9lcNJVD5GCnNM4Y6T12YYx8c6zEejxQsU0wrg9TwmDulcE9LR7qcJqA==
dependencies:
colorette "^2.0.7"
dateformat "^4.6.3"
fast-copy "^3.0.2"
fast-safe-stringify "^2.1.1"
help-me "^5.0.0"
joycon "^3.1.1"
minimist "^1.2.6"
on-exit-leak-free "^2.1.0"
pino-abstract-transport "^2.0.0"
pump "^3.0.0"
secure-json-parse "^2.4.0"
sonic-boom "^4.0.1"
strip-json-comments "^3.1.1"
pino-std-serializers@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz#7c625038b13718dbbd84ab446bd673dc52259e3b"
integrity sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==
pino@^9.6.0:
version "9.7.0"
resolved "https://registry.yarnpkg.com/pino/-/pino-9.7.0.tgz#ff7cd86eb3103ee620204dbd5ca6ffda8b53f645"
integrity sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg==
dependencies:
atomic-sleep "^1.0.0"
fast-redact "^3.1.1"
on-exit-leak-free "^2.1.0"
pino-abstract-transport "^2.0.0"
pino-std-serializers "^7.0.0"
process-warning "^5.0.0"
quick-format-unescaped "^4.0.3"
real-require "^0.2.0"
safe-stable-stringify "^2.3.1"
sonic-boom "^4.0.1"
thread-stream "^3.0.0"
process-warning@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-5.0.0.tgz#566e0bf79d1dff30a72d8bbbe9e8ecefe8d378d7"
integrity sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==
pump@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.3.tgz#151d979f1a29668dc0025ec589a455b53282268d"
integrity sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
quick-format-unescaped@^4.0.3:
version "4.0.4"
resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7"
integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==
real-require@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78"
integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==
safe-stable-stringify@^2.3.1:
version "2.5.0"
resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd"
integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==
secure-json-parse@^2.4.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862"
integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==
sonic-boom@^4.0.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-4.2.0.tgz#e59a525f831210fa4ef1896428338641ac1c124d"
integrity sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==
dependencies:
atomic-sleep "^1.0.0"
split2@^4.0.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4"
integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==
strip-json-comments@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
thread-stream@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-3.1.0.tgz#4b2ef252a7c215064507d4ef70c05a5e2d34c4f1"
integrity sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==
dependencies:
real-require "^0.2.0"
undici-types@~7.8.0:
version "7.8.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294"
integrity sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==

View file

@ -151,10 +151,7 @@ export class VideoWatchPage {
await this.clickOnMoreDropdownIcon() await this.clickOnMoreDropdownIcon()
// We need the await expression // We need the await expression
// eslint-disable-next-line @typescript-eslint/await-thenable return $$('.dropdown-menu.show .dropdown-item').mapSeries(async item => {
const items = await $$('.dropdown-menu.show .dropdown-item')
for (const item of items) {
const content = await item.getText() const content = await item.getText()
if (content.includes('Manage')) { if (content.includes('Manage')) {
@ -162,7 +159,7 @@ export class VideoWatchPage {
await $('#name').waitForClickable() await $('#name').waitForClickable()
return return
} }
} })
} }
async clickOnMoreDropdownIcon () { async clickOnMoreDropdownIcon () {

View file

@ -7,6 +7,7 @@
"module": "commonjs", "module": "commonjs",
"target": "ES2018", "target": "ES2018",
"typeRoots": [ "typeRoots": [
"../node_modules/@wdio",
"../node_modules/@types", "../node_modules/@types",
"../node_modules" "../node_modules"
], ],

View file

@ -53,6 +53,7 @@
"@ngx-loading-bar/http-client": "^7.0.0", "@ngx-loading-bar/http-client": "^7.0.0",
"@ngx-loading-bar/router": "^7.0.0", "@ngx-loading-bar/router": "^7.0.0",
"@peertube/maildev": "^1.2.0", "@peertube/maildev": "^1.2.0",
"@peertube/player": "workspace:*",
"@peertube/xliffmerge": "^2.0.3", "@peertube/xliffmerge": "^2.0.3",
"@plussub/srt-vtt-parser": "^2.0.5", "@plussub/srt-vtt-parser": "^2.0.5",
"@popperjs/core": "^2.11.5", "@popperjs/core": "^2.11.5",
@ -70,6 +71,7 @@
"@types/video.js": "^7.3.40", "@types/video.js": "^7.3.40",
"@wdio/browserstack-service": "^9.12.7", "@wdio/browserstack-service": "^9.12.7",
"@wdio/cli": "^9.12.7", "@wdio/cli": "^9.12.7",
"@wdio/globals": "^9.17.0",
"@wdio/local-runner": "^9.12.7", "@wdio/local-runner": "^9.12.7",
"@wdio/mocha-framework": "^9.12.6", "@wdio/mocha-framework": "^9.12.6",
"@wdio/shared-store-service": "^9.12.7", "@wdio/shared-store-service": "^9.12.7",

View file

@ -1,7 +1,4 @@
import 'zone.js' import 'zone.js'
;(window as any).global = window ;(window as any).global = window
;(window as any).process = require('process/')
;(window as any).Buffer = require('buffer/').Buffer
import '@angular/localize/init' import '@angular/localize/init'

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@
"licence": "AGPL-3.0", "licence": "AGPL-3.0",
"engines": { "engines": {
"node": ">=20.x", "node": ">=20.x",
"yarn": ">=1.x" "pnpm": ">=10.9"
}, },
"type": "module", "type": "module",
"author": { "author": {
@ -19,12 +19,8 @@
"url": "git+https://github.com/Chocobozzz/PeerTube.git" "url": "git+https://github.com/Chocobozzz/PeerTube.git"
}, },
"typings": "*.d.ts", "typings": "*.d.ts",
"workspaces": [
"packages/*",
"server"
],
"scripts": { "scripts": {
"install-node-dependencies": "yarn install --pure-lockfile", "install-node-dependencies": "pnpm install --frozen-lockfile",
"benchmark-server": "tsx --conditions=peertube:tsx ./scripts/benchmark.ts", "benchmark-server": "tsx --conditions=peertube:tsx ./scripts/benchmark.ts",
"benchmark-transcription": "tsx --conditions=peertube:tsx --tsconfig ./packages/transcription/tsconfig.json ./packages/transcription/src/benchmark.ts", "benchmark-transcription": "tsx --conditions=peertube:tsx --tsconfig ./packages/transcription/tsconfig.json ./packages/transcription/src/benchmark.ts",
"build:client": "bash ./scripts/build/client.sh", "build:client": "bash ./scripts/build/client.sh",
@ -67,7 +63,6 @@
"parse-log": "node ./dist/scripts/parse-log.js", "parse-log": "node ./dist/scripts/parse-log.js",
"plugin:install": "node ./dist/scripts/plugin/install.js", "plugin:install": "node ./dist/scripts/plugin/install.js",
"plugin:uninstall": "node ./dist/scripts/plugin/uninstall.js", "plugin:uninstall": "node ./dist/scripts/plugin/uninstall.js",
"postinstall": "test -n \"$NOCLIENT\" || (cd client && yarn install --pure-lockfile)",
"prune-storage": "LOGGER_LEVEL=warn node ./dist/scripts/prune-storage.js", "prune-storage": "LOGGER_LEVEL=warn node ./dist/scripts/prune-storage.js",
"regenerate-thumbnails": "node ./dist/scripts/regenerate-thumbnails.js", "regenerate-thumbnails": "node ./dist/scripts/regenerate-thumbnails.js",
"release-embed-api": "bash ./scripts/release-embed-api.sh", "release-embed-api": "bash ./scripts/release-embed-api.sh",
@ -99,6 +94,7 @@
"@aws-sdk/lib-storage": "^3.190.0", "@aws-sdk/lib-storage": "^3.190.0",
"@aws-sdk/s3-request-presigner": "^3.345.0", "@aws-sdk/s3-request-presigner": "^3.345.0",
"@commander-js/extra-typings": "^13.1.0", "@commander-js/extra-typings": "^13.1.0",
"@jimp/plugin-color": "^1.6.0",
"@node-oauth/oauth2-server": "^5.1.0", "@node-oauth/oauth2-server": "^5.1.0",
"@opentelemetry/api": "^1.1.0", "@opentelemetry/api": "^1.1.0",
"@opentelemetry/exporter-jaeger": "^2.0.0", "@opentelemetry/exporter-jaeger": "^2.0.0",
@ -118,9 +114,18 @@
"@peertube/bittorrent-tracker-server": "^11.1.2", "@peertube/bittorrent-tracker-server": "^11.1.2",
"@peertube/feed": "^5.4.1", "@peertube/feed": "^5.4.1",
"@peertube/http-signature": "^1.7.0", "@peertube/http-signature": "^1.7.0",
"@peertube/peertube-core-utils": "workspace:*",
"@peertube/peertube-ffmpeg": "workspace:*",
"@peertube/peertube-models": "workspace:*",
"@peertube/peertube-node-utils": "workspace:*",
"@peertube/peertube-server-commands": "workspace:*",
"@peertube/peertube-transcription": "workspace:*",
"@peertube/peertube-typescript-utils": "workspace:*",
"@smithy/node-http-handler": "^4.0.2", "@smithy/node-http-handler": "^4.0.2",
"@types/parse-torrent": "^5.8.7",
"@uploadx/core": "^6.1.8", "@uploadx/core": "^6.1.8",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"async": "^3.2.6",
"async-mutex": "^0.5.0", "async-mutex": "^0.5.0",
"bcrypt": "5.1.1", "bcrypt": "5.1.1",
"bencode": "^4.0.0", "bencode": "^4.0.0",
@ -212,6 +217,7 @@
"@types/config": "^3.3.0", "@types/config": "^3.3.0",
"@types/create-torrent": "^5.0.0", "@types/create-torrent": "^5.0.0",
"@types/express": "4.17.9", "@types/express": "4.17.9",
"@types/express-serve-static-core": "4.19.5",
"@types/fluent-ffmpeg": "^2.1.16", "@types/fluent-ffmpeg": "^2.1.16",
"@types/fs-extra": "^11.0.1", "@types/fs-extra": "^11.0.1",
"@types/jsonld": "^1.5.9", "@types/jsonld": "^1.5.9",
@ -227,7 +233,6 @@
"@types/node": "22.14.1", "@types/node": "22.14.1",
"@types/nodemailer": "^6.2.0", "@types/nodemailer": "^6.2.0",
"@types/pug": "^2.0.10", "@types/pug": "^2.0.10",
"@types/supertest": "^6.0.2",
"@types/validator": "^13.9.0", "@types/validator": "^13.9.0",
"@types/webtorrent": "^0.110.0", "@types/webtorrent": "^0.110.0",
"@types/ws": "^8.2.0", "@types/ws": "^8.2.0",
@ -254,7 +259,6 @@
"rollup": "^4.20.0", "rollup": "^4.20.0",
"rollup-plugin-dts": "^6.1.1", "rollup-plugin-dts": "^6.1.1",
"socket.io-client": "^4.5.4", "socket.io-client": "^4.5.4",
"supertest": "^7.0.0",
"swagger-cli": "^4.0.2", "swagger-cli": "^4.0.2",
"tsc-watch": "^6.0.0", "tsc-watch": "^6.0.0",
"tsx": "^4.7.1", "tsx": "^4.7.1",
@ -262,5 +266,5 @@
"typescript": "~5.8.3", "typescript": "~5.8.3",
"ua-parser-js": "^2.0.1" "ua-parser-js": "^2.0.1"
}, },
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" "packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
} }

View file

@ -3,17 +3,28 @@
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"main": "dist/index.js", "main": "dist/index.js",
"files": [ "dist" ], "files": [
"dist"
],
"exports": { "exports": {
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"peertube:tsx": "./src/index.ts", "peertube:tsx": "./src/index.ts",
"default": "./dist/index.js" "default": "./dist/index.js"
}, },
"type": "module", "type": "module",
"devDependencies": {}, "devDependencies": {
"@types/superagent": "^8.1.9",
"@types/supertest": "^6.0.3",
"supertest": "^7.1.4"
},
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"watch": "tsc -w" "watch": "tsc -w"
}, },
"dependencies": {} "dependencies": {
"@peertube/peertube-core-utils": "workspace:*",
"@peertube/peertube-models": "workspace:*",
"@peertube/peertube-node-utils": "workspace:*",
"@peertube/peertube-typescript-utils": "workspace:*"
}
} }

View file

@ -2,20 +2,19 @@ import { io } from 'socket.io-client'
import { AbstractCommand, OverrideCommandOptions } from '../shared/index.js' import { AbstractCommand, OverrideCommandOptions } from '../shared/index.js'
export class SocketIOCommand extends AbstractCommand { export class SocketIOCommand extends AbstractCommand {
getUserNotificationSocket (options: OverrideCommandOptions = {}): ReturnType<typeof io> {
getUserNotificationSocket (options: OverrideCommandOptions = {}) {
return io(this.server.url + '/user-notifications', { return io(this.server.url + '/user-notifications', {
query: { accessToken: options.token ?? this.server.accessToken } query: { accessToken: options.token ?? this.server.accessToken }
}) })
} }
getLiveNotificationSocket () { getLiveNotificationSocket (): ReturnType<typeof io> {
return io(this.server.url + '/live-videos') return io(this.server.url + '/live-videos')
} }
getRunnersSocket (options: { getRunnersSocket (options: {
runnerToken: string runnerToken: string
}) { }): ReturnType<typeof io> {
return io(this.server.url + '/runners', { return io(this.server.url + '/runners', {
reconnection: false, reconnection: false,
auth: { runnerToken: options.runnerToken } auth: { runnerToken: options.runnerToken }

View file

@ -3,11 +3,16 @@
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"devDependencies": {}, "devDependencies": {
"@peertube/peertube-server": "workspace:*",
"@peertube/peertube-transcription-devtools": "workspace:*",
"@types/superagent": "^8.1.9",
"@types/supertest": "^6.0.3",
"supertest": "^7.1.4"
},
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"watch": "tsc -w", "watch": "tsc -w",
"install-dependencies:transcription": "pip install -r ./requirements.txt -r ../transcription-devtools/requirements.txt" "install-dependencies:transcription": "pip install -r ./requirements.txt -r ../transcription-devtools/requirements.txt"
}, }
"dependencies": {}
} }

View file

@ -379,7 +379,6 @@ describe('Test plugins', function () {
await wait(3000) await wait(3000)
expect(await pathExists(join(baseNativeModule, 'build'))).to.be.true expect(await pathExists(join(baseNativeModule, 'build'))).to.be.true
expect(await pathExists(join(baseNativeModule, 'prebuilds'))).to.be.true
await makeGetRequest({ await makeGetRequest({
url: server.url, url: server.url,
@ -393,7 +392,6 @@ describe('Test plugins', function () {
await server.run() await server.run()
expect(await pathExists(join(baseNativeModule, 'build'))).to.be.false expect(await pathExists(join(baseNativeModule, 'build'))).to.be.false
expect(await pathExists(join(baseNativeModule, 'prebuilds'))).to.be.false
await makeGetRequest({ await makeGetRequest({
url: server.url, url: server.url,

View file

@ -1,8 +1,10 @@
import { VideoFile } from '@peertube/peertube-models' import { VideoFile } from '@peertube/peertube-models'
import { PeerTubeServer } from '@peertube/peertube-server-commands' import { PeerTubeServer } from '@peertube/peertube-server-commands'
import { OverloadedParameters } from '@peertube/peertube-typescript-utils'
import { expect } from 'chai' import { expect } from 'chai'
import { readFile } from 'fs/promises' import { readFile } from 'fs/promises'
import type { Instance as MagnetUriInstance } from 'magnet-uri' import type { Instance as MagnetUriInstance } from 'magnet-uri'
import type { ParseTorrent } from 'parse-torrent'
import { basename, join } from 'path' import { basename, join } from 'path'
import type { Torrent } from 'webtorrent' import type { Torrent } from 'webtorrent'
import WebTorrent from 'webtorrent' import WebTorrent from 'webtorrent'
@ -32,7 +34,7 @@ export async function checkWebTorrentWorks (magnetUri: string, pathMatch?: RegEx
webtorrent.destroy() webtorrent.destroy()
} }
export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile) { export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile): Promise<OverloadedParameters<ReturnType<ParseTorrent>>> {
const torrentName = basename(file.torrentUrl) const torrentName = basename(file.torrentUrl)
const torrentPath = server.servers.buildDirectory(join('torrents', torrentName)) const torrentPath = server.servers.buildDirectory(join('torrents', torrentName))

View file

@ -9,11 +9,6 @@ Npm:
npm install --save-dev @peertube/peertube-types npm install --save-dev @peertube/peertube-types
``` ```
Yarn:
```
yarn add --dev @peertube/peertube-types
```
## Usage ## Usage
> See [contribute-plugins](https://docs.joinpeertube.org/contribute/plugins#typescript) **Typescript** section of the doc. > See [contribute-plugins](https://docs.joinpeertube.org/contribute/plugins#typescript) **Typescript** section of the doc.

View file

@ -4,6 +4,6 @@
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@peertube/peertube-core-utils": "*" "@peertube/peertube-core-utils": "workspace:*"
} }
} }

View file

@ -20,23 +20,19 @@ export type PickWithOpt<T, KT extends keyof T, V> = {
// https://github.com/krzkaczor/ts-essentials Rocks! // https://github.com/krzkaczor/ts-essentials Rocks!
export type DeepPartial<T> = { export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Array<infer U> [P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>>
? Array<DeepPartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T[P] extends ReadonlyArray<infer U> : DeepPartial<T[P]>
? ReadonlyArray<DeepPartial<U>>
: DeepPartial<T[P]>
} }
type Primitive = string | Function | number | boolean | symbol | undefined | null type Primitive = string | Function | number | boolean | symbol | undefined | null
export type DeepOmitHelper<T, K extends keyof T> = { export type DeepOmitHelper<T, K extends keyof T> = {
[P in K]: // extra level of indirection needed to trigger homomorhic behavior [P in K]: // extra level of indirection needed to trigger homomorhic behavior
T[P] extends infer TP // distribute over unions T[P] extends infer TP // distribute over unions
? TP extends Primitive ? TP extends Primitive ? TP // leave primitives and functions alone
? TP // leave primitives and functions alone : TP extends any[] ? DeepOmitArray<TP, K> // Array special handling
: TP extends any[] : DeepOmit<TP, K>
? DeepOmitArray<TP, K> // Array special handling : never
: DeepOmit<TP, K>
: never
} }
export type DeepOmit<T, K> = T extends Primitive ? T : DeepOmitHelper<T, Exclude<keyof T, K>> export type DeepOmit<T, K> = T extends Primitive ? T : DeepOmitHelper<T, Exclude<keyof T, K>>
@ -47,3 +43,12 @@ export type DeepOmitArray<T extends any[], K> = {
export type Unpacked<T> = T extends (infer U)[] ? U : T export type Unpacked<T> = T extends (infer U)[] ? U : T
export type Awaitable<T> = T | PromiseLike<T> export type Awaitable<T> = T | PromiseLike<T>
// Thanks https://stackoverflow.com/a/52761156
export type OverloadedParameters<T> =
// eslint-disable-next-line max-len
T extends { (...args: infer A1): any, (...args: infer A2): any, (...args: infer A3): any, (...args: infer A4): any } ? A1 | A2 | A3 | A4 :
T extends { (...args: infer A1): any, (...args: infer A2): any, (...args: infer A3): any } ? A1 | A2 | A3 :
T extends { (...args: infer A1): any, (...args: infer A2): any } ? A1 | A2 :
T extends (...args: infer A) => any ? A
: any

23565
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

22
pnpm-workspace.yaml Normal file
View file

@ -0,0 +1,22 @@
packages:
- packages/*
- apps/*
- server
- client
- client/packages/*
- client/src/standalone/player
onlyBuiltDependencies:
- '@parcel/watcher'
- bcrypt
- bufferutil
- core-js
- edgedriver
- es5-ext
- esbuild
- geckodriver
- lmdb
- msgpackr-extract
- node-datachannel
- utf-8-validate
- utp-native

View file

@ -61,7 +61,7 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t
additionalParams="--source-map=true" additionalParams="--source-map=true"
fi fi
node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams NODE_OPTIONS=--max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams
for key in "${!languages[@]}"; do for key in "${!languages[@]}"; do
lang=${languages[$key]} lang=${languages[$key]}
@ -86,7 +86,7 @@ else
export ANALYZE_BUNDLE=true export ANALYZE_BUNDLE=true
fi fi
node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \ NODE_OPTIONS=--max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \
--configuration production --stats-json $additionalParams --configuration production --stats-json $additionalParams
fi fi

View file

@ -150,7 +150,7 @@ elif [ "$1" = "lint" ]; then
( cd client && npm run lint ) ( cd client && npm run lint )
elif [ "$1" = "transcription" ]; then elif [ "$1" = "transcription" ]; then
npm run install-dependencies:transcription --workspace=@peertube/tests pnpm run --filter=@peertube/tests install-dependencies:transcription
npm run build:server npm run build:server
npm run build:tests npm run build:tests

View file

@ -11,17 +11,17 @@ if [ ! -z ${2+x} ] && [ "$2" = "--ar-locale" ]; then
fi fi
embedCommand="cd client/src/standalone/player && npm run dev" embedCommand="cd client/src/standalone/player && npm run dev"
clientCommand="cd client && node --max_old_space_size=4096 node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration $clientConfiguration --host 0.0.0.0 --port 3000" clientCommand="cd client && NODE_OPTIONS=--max_old_space_size=8192 node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration $clientConfiguration --host 0.0.0.0 --port 3000"
serverCommand="NODE_ENV=dev node dist/server" serverCommand="NODE_ENV=dev node dist/server"
if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then
node node_modules/.bin/concurrently -k \ node_modules/.bin/concurrently -k \
"$embedCommand" \ "$embedCommand" \
"$clientCommand" "$clientCommand"
else else
npm run build:server npm run build:server
node node_modules/.bin/concurrently -k \ node_modules/.bin/concurrently -k \
"$embedCommand" \ "$embedCommand" \
"$clientCommand" \ "$clientCommand" \
"$serverCommand" "$serverCommand"

View file

@ -41,13 +41,13 @@ sed -i 's/"version": "\([^"]\+\)"/"version": "\1-'"$nightly_version"'"/' ./packa
"$directory_name/packages/node-utils/dist/" "$directory_name/packages/node-utils/package.json" \ "$directory_name/packages/node-utils/dist/" "$directory_name/packages/node-utils/package.json" \
"$directory_name/packages/models/dist/" "$directory_name/packages/models/package.json" \ "$directory_name/packages/models/dist/" "$directory_name/packages/models/package.json" \
"$directory_name/packages/transcription/dist/" "$directory_name/packages/transcription/package.json" \ "$directory_name/packages/transcription/dist/" "$directory_name/packages/transcription/package.json" \
"$directory_name/client/dist/" "$directory_name/client/yarn.lock" \ "$directory_name/client/dist/" \
"$directory_name/client/package.json" "$directory_name/config" \ "$directory_name/client/package.json" "$directory_name/config" \
"$directory_name/dist" "$directory_name/package.json" \ "$directory_name/dist" "$directory_name/package.json" \
"$directory_name/scripts/upgrade.sh" "$directory_name/support/doc" "$directory_name/support/freebsd" \ "$directory_name/scripts/upgrade.sh" "$directory_name/support/doc" "$directory_name/support/freebsd" \
"$directory_name/support/init.d" "$directory_name/support/nginx" "$directory_name/support/openapi" \ "$directory_name/support/init.d" "$directory_name/support/nginx" "$directory_name/support/openapi" \
"$directory_name/support/sysctl.d" "$directory_name/support/systemd" \ "$directory_name/support/sysctl.d" "$directory_name/support/systemd" \
"$directory_name/yarn.lock") "$directory_name/pnpm-lock.yaml" "$directory_name/pnpm-workspace.yaml")
# temporary setup # temporary setup
cd .. cd ..

View file

@ -34,8 +34,7 @@ if [ "$branch" != "develop" ] && [[ "$branch" != release/* ]]; then
exit -1 exit -1
fi fi
yarn check --integrity --verify-tree pnpm install --frozen-lockfile
(cd client && yarn check --integrity --verify-tree)
version="v$1" version="v$1"
github_prerelease_option="" github_prerelease_option=""
@ -89,13 +88,13 @@ find dist/ packages/core-utils/dist/ \
"$directory_name/packages/node-utils/dist/" "$directory_name/packages/node-utils/package.json" \ "$directory_name/packages/node-utils/dist/" "$directory_name/packages/node-utils/package.json" \
"$directory_name/packages/models/dist/" "$directory_name/packages/models/package.json" \ "$directory_name/packages/models/dist/" "$directory_name/packages/models/package.json" \
"$directory_name/packages/transcription/dist/" "$directory_name/packages/transcription/package.json" \ "$directory_name/packages/transcription/dist/" "$directory_name/packages/transcription/package.json" \
"$directory_name/client/dist/" "$directory_name/client/yarn.lock" \ "$directory_name/client/dist/" \
"$directory_name/client/package.json" "$directory_name/config" \ "$directory_name/client/package.json" "$directory_name/config" \
"$directory_name/dist" "$directory_name/package.json" \ "$directory_name/dist" "$directory_name/package.json" \
"$directory_name/scripts/upgrade.sh" "$directory_name/support/doc" "$directory_name/support/freebsd" \ "$directory_name/scripts/upgrade.sh" "$directory_name/support/doc" "$directory_name/support/freebsd" \
"$directory_name/support/init.d" "$directory_name/support/nginx" "$directory_name/support/openapi" \ "$directory_name/support/init.d" "$directory_name/support/nginx" "$directory_name/support/openapi" \
"$directory_name/support/sysctl.d" "$directory_name/support/systemd" \ "$directory_name/support/sysctl.d" "$directory_name/support/systemd" \
"$directory_name/yarn.lock") "$directory_name/pnpm-lock.yaml" "$directory_name/pnpm-workspace.yaml")
# temporary setup # temporary setup
cd .. cd ..

View file

@ -110,7 +110,7 @@ async function jimpProcessor (options: {
} }
} }
async function autoResize (options: { function autoResize (options: {
sourceImage: Jimp sourceImage: Jimp
newSize: { width: number, height: number } newSize: { width: number, height: number }
destination: string destination: string

View file

@ -33,11 +33,11 @@ const consoleLoggerFormat = format.printf(info => {
return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}` return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}`
}) })
export const jsonLoggerFormat = format.printf(info => { export const jsonLoggerFormat: ReturnType<typeof format.printf> = format.printf(info => {
return JSON.stringify(info, removeCyclicValues()) return JSON.stringify(info, removeCyclicValues())
}) })
export const labelFormatter = (suffix?: string) => { export const labelFormatter: (suffix?: string) => ReturnType<typeof format.printf> = (suffix?: string) => {
return format.label({ return format.label({
label: suffix ? `${label} ${suffix}` : label label: suffix ? `${label} ${suffix}` : label
}) })

View file

@ -15,6 +15,7 @@ import { applicationExist, clientsExist, usersExist } from './checker-after-init
import { CONFIG } from './config.js' import { CONFIG } from './config.js'
import { DIRECTORIES, FILES_CACHE, LAST_MIGRATION_VERSION } from './constants.js' import { DIRECTORIES, FILES_CACHE, LAST_MIGRATION_VERSION } from './constants.js'
import { sequelizeTypescript } from './database.js' import { sequelizeTypescript } from './database.js'
import { initPNPM } from '@server/lib/plugins/package-manager.js'
async function installApplication () { async function installApplication () {
try { try {
@ -26,7 +27,8 @@ async function installApplication () {
createApplicationIfNotExist(), createApplicationIfNotExist(),
createOAuthClientIfNotExist(), createOAuthClientIfNotExist(),
createOAuthAdminIfNotExist(), createOAuthAdminIfNotExist(),
createRunnerRegistrationTokenIfNotExist() createRunnerRegistrationTokenIfNotExist(),
initPNPM()
]) ])
}), }),
@ -81,7 +83,7 @@ async function removeDirectoryOrContent (dir: string) {
function createDirectoriesIfNotExist () { function createDirectoriesIfNotExist () {
const storage = CONFIG.STORAGE const storage = CONFIG.STORAGE
const cacheDirectories = Object.keys(FILES_CACHE) const cacheDirectories = Object.keys(FILES_CACHE)
.map(k => FILES_CACHE[k].DIRECTORY) .map(k => FILES_CACHE[k].DIRECTORY)
const tasks: Promise<void>[] = [] const tasks: Promise<void>[] = []
for (const key of Object.keys(storage)) { for (const key of Object.keys(storage)) {

View file

@ -1,18 +1,16 @@
import { mapToJSON } from '@server/helpers/core-utils.js'
import { logger, loggerTagsFactory } from '@server/helpers/logger.js'
import { MStreamingPlaylistVideo } from '@server/types/models/index.js'
import { writeJson } from 'fs-extra/esm' import { writeJson } from 'fs-extra/esm'
import { rename } from 'fs/promises' import { rename } from 'fs/promises'
import PQueue from 'p-queue' import PQueue from 'p-queue'
import { basename } from 'path' import { basename } from 'path'
import { mapToJSON } from '@server/helpers/core-utils.js'
import { logger, loggerTagsFactory } from '@server/helpers/logger.js'
import { MStreamingPlaylistVideo } from '@server/types/models/index.js'
import { buildSha256Segment } from '../hls.js' import { buildSha256Segment } from '../hls.js'
import { storeHLSFileFromPath } from '../object-storage/index.js' import { storeHLSFileFromPath } from '../object-storage/index.js'
import { JFWriteOptions } from 'jsonfile'
const lTags = loggerTagsFactory('live') const lTags = loggerTagsFactory('live')
class LiveSegmentShaStore { class LiveSegmentShaStore {
private readonly segmentsSha256 = new Map<string, string>() private readonly segmentsSha256 = new Map<string, string>()
private readonly videoUUID: string private readonly videoUUID: string
@ -62,7 +60,9 @@ class LiveSegmentShaStore {
if (!this.segmentsSha256.has(segmentName)) { if (!this.segmentsSha256.has(segmentName)) {
logger.warn( logger.warn(
'Unknown segment in live segment hash store for video %s and segment %s.', 'Unknown segment in live segment hash store for video %s and segment %s.',
this.videoUUID, segmentPath, lTags(this.videoUUID) this.videoUUID,
segmentPath,
lTags(this.videoUUID)
) )
return return
} }
@ -77,7 +77,8 @@ class LiveSegmentShaStore {
logger.debug(`Writing segment sha JSON ${this.sha256Path} of ${this.videoUUID} on disk.`, lTags(this.videoUUID)) logger.debug(`Writing segment sha JSON ${this.sha256Path} of ${this.videoUUID} on disk.`, lTags(this.videoUUID))
// Atomic write: use rename instead of move that is not atomic // Atomic write: use rename instead of move that is not atomic
await writeJson(this.sha256PathTMP, mapToJSON(this.segmentsSha256), { flush: true } as JFWriteOptions) // FIXME: jsonfile typings // FIXME: jsonfile typings
await (writeJson(this.sha256PathTMP, mapToJSON(this.segmentsSha256), { flush: true } as any) as unknown as Promise<void>)
await rename(this.sha256PathTMP, this.sha256Path) await rename(this.sha256PathTMP, this.sha256Path)
if (this.sendToObjectStorage) { if (this.sendToObjectStorage) {

View file

@ -0,0 +1,89 @@
import { isStableOrUnstableVersionValid } from '@server/helpers/custom-validators/misc.js'
import { outputJSON, pathExists, remove } from 'fs-extra/esm'
import { writeFile } from 'fs/promises'
import { join } from 'path'
import { execShell } from '../../helpers/core-utils.js'
import { isNpmPluginNameValid } from '../../helpers/custom-validators/plugins.js'
import { logger } from '../../helpers/logger.js'
import { CONFIG } from '../../initializers/config.js'
import { getLatestPluginVersion } from './plugin-index.js'
export async function installNpmPlugin (npmName: string, versionArg?: string) {
// Security check
checkNpmPluginNameOrThrow(npmName)
if (versionArg) checkPluginVersionOrThrow(versionArg)
const version = versionArg || await getLatestPluginVersion(npmName)
let toInstall = npmName
if (version) toInstall += `@${version}`
const { stdout } = await execPNPM('add ' + toInstall)
logger.debug('Added a pnpm package.', { stdout })
}
export async function installNpmPluginFromDisk (path: string) {
await execPNPM('add file:' + path)
}
export async function removeNpmPlugin (name: string) {
checkNpmPluginNameOrThrow(name)
await execPNPM('remove ' + name)
}
export async function rebuildNativePlugins () {
await execPNPM('rebuild')
}
// ---------------------------------------------------------------------------
async function execPNPM (command: string) {
try {
const pluginDirectory = CONFIG.STORAGE.PLUGINS_DIR
return execShell(`pnpm ${command}`, { cwd: pluginDirectory })
} catch (result) {
logger.error('Cannot exec pnpm.', { command, err: result.err, stderr: result.stderr })
throw result.err as Error
}
}
function checkNpmPluginNameOrThrow (name: string) {
if (!isNpmPluginNameValid(name)) throw new Error('Invalid NPM plugin name to install')
}
function checkPluginVersionOrThrow (name: string) {
if (!isStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install')
}
// ---------------------------------------------------------------------------
export async function initPNPM () {
const pluginDirectory = CONFIG.STORAGE.PLUGINS_DIR
const pluginPackageJSON = join(pluginDirectory, 'package.json')
// Create empty package.json file if needed
if (!await pathExists(pluginPackageJSON)) {
logger.info('Init package.json in plugin directory')
await outputJSON(pluginPackageJSON, {})
}
const pnpmWorkspace = join(pluginDirectory, 'pnpm-workspace.yaml')
if (!await pathExists(pnpmWorkspace)) {
logger.info('Init pnpm-workspace.yaml in plugin directory')
await writeFile(pnpmWorkspace, 'dangerouslyAllowAllBuilds: true\nnodeLinker: hoisted\n')
}
if (await pathExists(join(pluginDirectory, 'yarn.lock'))) {
logger.info('Migrate from yarn.lock in plugin directory')
await execPNPM('import yarn.lock')
await remove(join(pluginDirectory, 'yarn.lock'))
}
}

View file

@ -32,7 +32,7 @@ import {
} from '../../types/plugins/index.js' } from '../../types/plugins/index.js'
import { ClientHtml } from '../html/client-html.js' import { ClientHtml } from '../html/client-html.js'
import { RegisterHelpers } from './register-helpers.js' import { RegisterHelpers } from './register-helpers.js'
import { installNpmPlugin, installNpmPluginFromDisk, rebuildNativePlugins, removeNpmPlugin } from './yarn.js' import { installNpmPlugin, installNpmPluginFromDisk, rebuildNativePlugins, removeNpmPlugin } from './package-manager.js'
const require = createRequire(import.meta.url) const require = createRequire(import.meta.url)
@ -452,6 +452,8 @@ export class PluginManager implements ServerHook {
async rebuildNativePluginsIfNeeded () { async rebuildNativePluginsIfNeeded () {
if (!await ApplicationModel.nodeABIChanged()) return if (!await ApplicationModel.nodeABIChanged()) return
logger.info('Node ABI has changed, rebuilding native plugins')
return rebuildNativePlugins() return rebuildNativePlugins()
} }

View file

@ -1,65 +0,0 @@
import { isStableOrUnstableVersionValid } from '@server/helpers/custom-validators/misc.js'
import { outputJSON, pathExists } from 'fs-extra/esm'
import { join } from 'path'
import { execShell } from '../../helpers/core-utils.js'
import { isNpmPluginNameValid } from '../../helpers/custom-validators/plugins.js'
import { logger } from '../../helpers/logger.js'
import { CONFIG } from '../../initializers/config.js'
import { getLatestPluginVersion } from './plugin-index.js'
export async function installNpmPlugin (npmName: string, versionArg?: string) {
// Security check
checkNpmPluginNameOrThrow(npmName)
if (versionArg) checkPluginVersionOrThrow(versionArg)
const version = versionArg || await getLatestPluginVersion(npmName)
let toInstall = npmName
if (version) toInstall += `@${version}`
const { stdout } = await execYarn('add ' + toInstall)
logger.debug('Added a yarn package.', { yarnStdout: stdout })
}
export async function installNpmPluginFromDisk (path: string) {
await execYarn('add file:' + path)
}
export async function removeNpmPlugin (name: string) {
checkNpmPluginNameOrThrow(name)
await execYarn('remove ' + name)
}
export async function rebuildNativePlugins () {
await execYarn('install --pure-lockfile')
}
// ############################################################################
async function execYarn (command: string) {
try {
const pluginDirectory = CONFIG.STORAGE.PLUGINS_DIR
const pluginPackageJSON = join(pluginDirectory, 'package.json')
// Create empty package.json file if needed
if (!await pathExists(pluginPackageJSON)) {
await outputJSON(pluginPackageJSON, {})
}
return execShell(`yarn ${command}`, { cwd: pluginDirectory })
} catch (result) {
logger.error('Cannot exec yarn.', { command, err: result.err, stderr: result.stderr })
throw result.err as Error
}
}
function checkNpmPluginNameOrThrow (name: string) {
if (!isNpmPluginNameValid(name)) throw new Error('Invalid NPM plugin name to install')
}
function checkPluginVersionOrThrow (name: string) {
if (!isStableOrUnstableVersionValid(name)) throw new Error('Invalid NPM plugin version to install')
}

View file

@ -2,14 +2,14 @@
"name": "@peertube/peertube-server", "name": "@peertube/peertube-server",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"files": [ "dist" ], "files": [
"dist"
],
"type": "module", "type": "module",
"exports": { "exports": {
"./*": { "./*": {
"peertube:tsx": "./*", "peertube:tsx": "./*",
"default": "./dist/*" "default": "./dist/*"
} }
}, }
"devDependencies": {},
"dependencies": {}
} }

View file

@ -78,7 +78,7 @@ RELEASE_PAGE_URL="https://github.com/Chocobozzz/PeerTube/releases/tag/${VERSION}
LATEST_VERSION_DIRECTORY="$PEERTUBE_PATH/versions/peertube-${VERSION}" LATEST_VERSION_DIRECTORY="$PEERTUBE_PATH/versions/peertube-${VERSION}"
cd "$LATEST_VERSION_DIRECTORY" cd "$LATEST_VERSION_DIRECTORY"
NOCLIENT=1 npm run install-node-dependencies -- --production npm run install-node-dependencies -- --production
OLD_VERSION_DIRECTORY=$(readlink "$PEERTUBE_PATH/peertube-latest") OLD_VERSION_DIRECTORY=$(readlink "$PEERTUBE_PATH/peertube-latest")

View file

@ -11,10 +11,10 @@ For instance, the playground URL for the above embed URL is `https://my-instance
## Quick Start ## Quick Start
Given an existing PeerTube embed `<iframe>` **with API enabled** (`https://my-instance.example.com/videos/embed/52a10666-3a18-4e73-93da-e8d3c12c305a?api=1`), Given an existing PeerTube embed `<iframe>` **with API enabled** (`https://my-instance.example.com/videos/embed/52a10666-3a18-4e73-93da-e8d3c12c305a?api=1`),
one can use the PeerTube Embed API to control it by first including the library. You can include it via Yarn with: one can use the PeerTube Embed API to control it by first including the library. You can include it via NPM with:
``` ```
yarn add @peertube/embed-api npm install @peertube/embed-api
``` ```
Now just use the `PeerTubePlayer` class exported by the module: Now just use the `PeerTubePlayer` class exported by the module:

View file

@ -5,7 +5,7 @@
Main dependencies supported by PeerTube: Main dependencies supported by PeerTube:
* `node` LTS (>= 20.17 or 22.x) * `node` LTS (>= 20.17 or 22.x)
* `yarn` 1.x (**must not be >=2.x**) * `pnpm` >= 10.x
* `postgres` >=10.x * `postgres` >=10.x
* `redis-server` >=6.x * `redis-server` >=6.x
* `ffmpeg` >=4.3 (using a ffmpeg static build [is not recommended](https://github.com/Chocobozzz/PeerTube/issues/6308)) * `ffmpeg` >=4.3 (using a ffmpeg static build [is not recommended](https://github.com/Chocobozzz/PeerTube/issues/6308))

View file

@ -304,7 +304,7 @@ cd /var/www/peertube/peertube-latest/scripts && sudo -H -u peertube ./upgrade.sh
sudo systemctl restart peertube # Or use your OS command to restart PeerTube if you don't use systemd sudo systemctl restart peertube # Or use your OS command to restart PeerTube if you don't use systemd
``` ```
You may want to run `sudo -u peertube yarn cache clean` after several upgrades to free up disk space. You may want to run `sudo -u peertube pnpm store prune` after several upgrades to free up disk space.
<details> <details>
<summary><strong>Prefer manual upgrade?</strong></summary> <summary><strong>Prefer manual upgrade?</strong></summary>

View file

@ -29,14 +29,14 @@ USER peertube
# Install manually client dependencies to apply our network timeout option # Install manually client dependencies to apply our network timeout option
RUN if [ "${ALREADY_BUILT}" = 0 ]; then \ RUN if [ "${ALREADY_BUILT}" = 0 ]; then \
npm run install-node-dependencies -- --network-timeout 1200000 \ npm run install-node-dependencies \
&& npm run build; \ && npm run build; \
else \ else \
echo "Do not build application inside Docker because of ALREADY_BUILT build argument"; \ echo "Do not build application inside Docker because of ALREADY_BUILT build argument"; \
fi; \ fi; \
rm -rf ./node_modules ./client/node_modules ./client/.angular \ rm -rf ./node_modules ./client/node_modules ./client/.angular \
&& NOCLIENT=1 npm run install-node-dependencies -- --production --network-timeout 1200000 --network-concurrency 20 \ && npm run install-node-dependencies -- --production \
&& yarn cache clean && pnpm store prune
USER root USER root

12278
yarn.lock

File diff suppressed because it is too large Load diff