Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Migrate to typescript 7 for server

Chocobozzz4e8ca8401c8c
diff --git a/package.json b/package.json
index a5e5948701..bd2702b401 100644
--- a/package.json
+++ b/package.json
@@ -70,15 +70,15 @@
"release-embed-api": "bash ./scripts/release-embed-api.sh",
"release": "bash ./scripts/release.sh",
"reset-password": "node ./dist/scripts/reset-password.js",
- "resolve-tspaths:server-lib": "npm run resolve-tspaths -- --project server/tsconfig.lib.json --src server --out server/dist",
- "resolve-tspaths:server": "npm run resolve-tspaths -- --project server/tsconfig.json --src server --out dist",
- "resolve-tspaths:tests": "npm run resolve-tspaths -- --project packages/tests/tsconfig.json --src packages/tests/src --out packages/tests/dist",
- "resolve-tspaths": "resolve-tspaths",
"simulate-many-viewers": "tsx --conditions=peertube:tsx ./scripts/simulate-many-viewers.ts",
"start:server": "node dist/server --no-client",
"start": "node dist/server",
"swagger-cli": "swagger-cli",
"test": "bash ./scripts/test.sh",
+ "tsc-alias:server-lib": "npm run tsc-alias -- --project server/tsconfig.lib.json",
+ "tsc-alias:server": "npm run tsc-alias -- --project server/tsconfig.json",
+ "tsc-alias:tests": "npm run tsc-alias -- --project packages/tests/tsconfig.json",
+ "tsc-alias": "tsc-alias",
"tsc": "tsc",
"tsx": "tsx",
"update-host": "node ./dist/scripts/update-host.js"
@@ -206,7 +206,6 @@
"yauzl": "^3.4.0"
},
"devDependencies": {
- "@peertube/resolve-tspaths": "^0.8.14",
"@stylistic/eslint-plugin": "^5.10.0",
"@types/archiver": "^8.0.0",
"@types/bcrypt": "^6.0.0",
@@ -241,6 +240,7 @@
"@types/webtorrent": "^0.110.2",
"@types/ws": "^8.18.1",
"@types/yauzl": "^3.4.0",
+ "@typescript/typescript6": "^6.0.2",
"ajv": "^8.20.0",
"autocannon": "^8.0.0",
"chai": "^6.2.2",
@@ -263,10 +263,11 @@
"rollup-plugin-dts": "^6.5.1",
"socket.io-client": "^4.8.3",
"swagger-cli": "^4.0.4",
+ "tsc-alias": "^1.9.1",
"tsc-watch": "^7.2.1",
"tsx": "^4.23.11",
"type-fest": "^5.8.0",
- "typescript": "~6.0.3"
+ "typescript": "~7.0.2"
},
"packageManager": "[email protected]+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
}
diff --git a/packages/tests/src/shared/p2p.ts b/packages/tests/src/shared/p2p.ts
index e03a93fb87..c553f1629e 100644
--- a/packages/tests/src/shared/p2p.ts
+++ b/packages/tests/src/shared/p2p.ts
@@ -1,12 +1,11 @@
import { VideoFile } from '@peertube/peertube-models'
import { PeerTubeServer } from '@peertube/peertube-server-commands'
-import { OverloadedParameters } from '@peertube/peertube-typescript-utils'
import { expect } from 'chai'
import { readFile } from 'fs/promises'
import type { Instance as MagnetUriInstance } from 'magnet-uri'
-import type { ParseTorrent } from 'parse-torrent'
+import type { Instance as ParseTorrentInstance } from 'parse-torrent'
import { basename, join } from 'path'
-import type { Torrent, Instance, WebTorrent } from 'webtorrent'
+import type { Instance, Torrent, WebTorrent } from 'webtorrent'
export async function checkWebTorrentWorks (magnetUri: string, pathMatch?: RegExp) {
let res: { webtorrent: Instance, torrent: Torrent }
@@ -33,7 +32,7 @@ export async function checkWebTorrentWorks (magnetUri: string, pathMatch?: RegEx
webtorrent.destroy()
}
-export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile): Promise<OverloadedParameters<ReturnType<ParseTorrent>>> {
+export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile): Promise<ParseTorrentInstance> {
const torrentName = basename(file.torrentUrl)
const torrentPath = server.servers.buildDirectory(join('torrents', torrentName))
diff --git a/packages/tests/tsconfig.json b/packages/tests/tsconfig.json
index dad850c64d..c9f1a18d93 100644
--- a/packages/tests/tsconfig.json
+++ b/packages/tests/tsconfig.json
@@ -7,9 +7,7 @@
"types": [ "node", "mocha" ],
"paths": {
"@tests/*": [ "./src/*" ],
- "@server/*": [ "../../server/core/*" ],
- "@peertube/peertube-transcription": [ "../transcription" ],
- "@peertube/peertube-transcription-devtools": [ "../transcription-devtools" ],
+ "@server/*": [ "../../server/core/*" ]
}
},
"references": [
diff --git a/packages/types-generator/generate-package.ts b/packages/types-generator/generate-package.ts
index 5c641fa625..20d7cf962d 100644
--- a/packages/types-generator/generate-package.ts
+++ b/packages/types-generator/generate-package.ts
@@ -41,10 +41,7 @@ async function run () {
await remove(typesDistTMPPath)
execSync(`npm run tsc -- -b ${typesTsConfigPath} --verbose`, { stdio: 'inherit' })
- // oxlint-disable-next-line max-len
- execSync(`npm run resolve-tspaths -- --project ${distTmpTsConfigPath} --src ${typesDistTMPPath} --out ${typesDistTMPPath}`, {
- stdio: 'inherit'
- })
+ execSync(`npm run tsc-alias -- --project ${distTmpTsConfigPath}`, { stdio: 'inherit' })
execSync(`./node_modules/.bin/rollup -c ${rollupConfig}`, { stdio: 'inherit' })
await remove(typesDistTMPPath)
diff --git a/packages/types-generator/tsconfig.dist-tmp.json b/packages/types-generator/tsconfig.dist-tmp.json
index 8bdb291f02..625a6fa92b 100644
--- a/packages/types-generator/tsconfig.dist-tmp.json
+++ b/packages/types-generator/tsconfig.dist-tmp.json
@@ -1,6 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
+ "outDir": "./dist-tmp",
"typeRoots": [
"node_modules/@types",
"client/node_modules/@types"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4e00b1eec5..3e9c087ead 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -214,7 +214,7 @@ importers:
version: 0.1.7
i18next:
specifier: ^26.3.6
- version: 26.3.6([email protected])
+ version: 26.3.6([email protected])
i18next-icu:
specifier: ^2.4.4
version: 2.4.4([email protected])
@@ -366,9 +366,6 @@ importers:
specifier: ^3.4.0
version: 3.4.0
devDependencies:
- '@peertube/resolve-tspaths':
- specifier: ^0.8.14
- version: 0.8.14([email protected])
'@stylistic/eslint-plugin':
specifier: ^5.10.0
@@ -471,6 +468,9 @@ importers:
'@types/yauzl':
specifier: ^3.4.0
version: 3.4.0
+ '@typescript/typescript6':
+ specifier: ^6.0.2
+ version: 6.0.2
ajv:
specifier: ^8.20.0
version: 8.20.0
@@ -497,7 +497,7 @@ importers:
i18next-cli:
specifier: ^1.67.7
- version: 1.67.7(@types/[email protected])([email protected])
+ version: 1.67.7(@types/[email protected])([email protected])
jszip:
specifier: ^3.10.1
version: 3.10.1
@@ -530,16 +530,19 @@ importers:
version: 4.62.4
rollup-plugin-dts:
specifier: ^6.5.1
socket.io-client:
specifier: ^4.8.3
swagger-cli:
specifier: ^4.0.4
version: 4.0.4([email protected])
+ tsc-alias:
+ specifier: ^1.9.1
+ version: 1.9.1
tsc-watch:
specifier: ^7.2.1
- version: 7.2.1([email protected])
+ version: 7.2.1([email protected])
tsx:
specifier: ^4.23.11
version: 4.23.11
@@ -547,8 +550,8 @@ importers:
specifier: ^5.8.0
version: 5.8.0
typescript:
- specifier: ~6.0.3
- version: 6.0.3
+ specifier: ~7.0.2
+ version: 7.0.2
optionalDependencies:
webtorrent:
specifier: ^3.0.21
@@ -567,7 +570,7 @@ importers:
version: 3.1.6
tsdown:
specifier: 0.21.0-beta.2
apps/peertube-runner:
devDependencies:
@@ -597,7 +600,7 @@ importers:
version: 1.7.1
tsdown:
specifier: 0.21.0-beta.2
client:
devDependencies:
@@ -3502,12 +3505,6 @@ packages:
resolution: {integrity: sha512-VGog0A2gk0P8UnP0ZjCoYQumELiqqQY5i+gt18avTC7NJNJLUxMRMI045NAVSDFVbqt2EJJPsbZf3LFjUWRtmw==}
engines: {node: '>=10.0.0'}
- '@peertube/[email protected]':
- resolution: {integrity: sha512-EnYh2GSY5qDPJ0TVt/UexuLQrB1vshOFXOM6OnqaV4e1WOYpxmtzu5amPFBRBLcGH9aJ4HM5eyDR3ka7Corjjw==}
- hasBin: true
- peerDependencies:
- typescript: '>=3.0.3'
-
'@peertube/[email protected]':
resolution: {integrity: sha512-+xyVqAgl6d+Y2boP3BpqNBovJKP0WWHWvNXZhTLXjJefCg2ih+x2TdwQ5yG1q2PjyY0/TjrHPrnWn6FmnAAn1A==}
engines: {node: '>=10.0'}
@@ -4773,6 +4770,130 @@ packages:
resolution: {integrity: sha512-dkKR8q+lKciskj1Y3vthHktl+3cMLWGyVUP23bRiPZ5O9BRT++4EqDDV+TVeIKBL1VXVEqrJlz8MYbcnvJcAlg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [ppc64]
+ os: [aix]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [freebsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [loong64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [mips64el]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [ppc64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==}
+ engines: {node: '>=16.20.0'}
+ cpu: [s390x]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [linux]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [netbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [netbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [openbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [openbsd]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [sunos]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==}
+ engines: {node: '>=16.20.0'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==}
+ engines: {node: '>=16.20.0'}
+ cpu: [x64]
+ os: [win32]
+
+ '@typescript/[email protected]':
+ resolution: {integrity: sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==}
+ hasBin: true
+
'@uploadx/[email protected]':
resolution: {integrity: sha512-2XeeyKmtTuHHMzlM5tDgMX457dpXE+ec9MdPltAz2sIC3PD2rDV1Aj3lI6F5c7zaZIUZkRYeH+DqUtL/FSc95Q==}
engines: {node: '>=20.19.0'}
@@ -5850,10 +5971,6 @@ packages:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
- resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==}
- engines: {node: '>=16'}
-
resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
engines: {node: '>=18'}
@@ -6333,6 +6450,10 @@ packages:
resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==}
+ resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==}
@@ -6894,10 +7015,6 @@ packages:
resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==}
- resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==}
- engines: {node: '>=8.6.0'}
-
resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
engines: {node: '>=8.6.0'}
@@ -7283,6 +7400,10 @@ packages:
resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-NLvV9ubZ6NDsJaOpKPy3cQeJpKi9DcWiyCiFUpJPA0YihRqiE6RWaLUmgNNPr8MgPpLZjnBjSmou7uZBRJv9wA==}
engines: {node: '>=20'}
@@ -8830,6 +8951,10 @@ packages:
engines: {node: '>=8', npm: '>=5'}
hasBin: true
+ resolution: {integrity: sha512-BzQguy9W9NJgoVn2mRWzbFrFWWztGCcng2QI9+41frfk+Athwgx3qhqhvStz7ExeUUu7Kzw427sNzHpEZNINog==}
+ engines: {node: '>=16.0.0'}
+
resolution: {integrity: sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -9536,6 +9661,10 @@ packages:
resolution: {integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==}
+ resolution: {integrity: sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==}
+ engines: {node: '>=12'}
+
resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==}
engines: {node: '>=10.13.0'}
@@ -9805,6 +9934,10 @@ packages:
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
+ resolution: {integrity: sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==}
+ engines: {node: '>=12'}
+
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
@@ -11109,6 +11242,11 @@ packages:
'@swc/wasm':
optional: true
+ resolution: {integrity: sha512-sFZdVFthH8uvdplPJrOYGOHcxu6UPtcAcY678JPwEQiMzgLZYFO7Qc/rzELp7ingTc+OxtzH6n+8Pn2eVQep6w==}
+ engines: {node: '>=16.20.2'}
+ hasBin: true
+
resolution: {integrity: sha512-FcntBnz5bXGQ/q265acfDzU7xi6R/sgwMokI+Iu293n14Wu8ovAtcwqNfU9vv/DM1THlnmmxatSSyGOvWsSblg==}
engines: {node: '>=12.12.0'}
@@ -11239,6 +11377,11 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
+ resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==}
+ engines: {node: '>=16.20.0'}
+ hasBin: true
+
resolution: {integrity: sha512-RwKDW2p3iyWn4UbaxpP2+VxwqXh0jpvdxsYpZ5j/MLLiQOfbsV5shpgQiw93+KMYQPcteeMQ289MaAFzs3G9pw==}
@@ -12976,10 +13119,10 @@ snapshots:
- vite
- webpack
dependencies:
birpc: 4.0.0
pathe: 2.0.3
perfect-debounce: 2.1.0
@@ -14630,13 +14773,6 @@ snapshots:
smtp-server: 3.19.2
wildstring: 1.0.9
- dependencies:
- ansi-colors: 4.1.3
- commander: 11.0.0
- fast-glob: 3.3.1
- typescript: 6.0.3
-
'@peertube/[email protected]':
dependencies:
'@xmldom/xmldom': 0.8.13
@@ -15767,6 +15903,70 @@ snapshots:
'@typescript-eslint/types': 8.66.0
eslint-visitor-keys: 5.0.1
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ optional: true
+
+ '@typescript/[email protected]':
+ dependencies:
+ '@typescript/old': [email protected]
+
'@uploadx/[email protected]':
dependencies:
'@logtape/logtape': 2.3.0
@@ -15781,6 +15981,11 @@ snapshots:
dependencies:
valibot: 1.4.2([email protected])
+ dependencies:
+ valibot: 1.4.2([email protected])
+ optional: true
+
'@videojs/[email protected]([email protected](patch_hash=66459642658d85da52b45ff0472242e9daade1ff3dd765974103db72a7c55377))':
dependencies:
'@babel/runtime': 7.29.7
@@ -15829,11 +16034,11 @@ snapshots:
- utf-8-validate
- webpack
dependencies:
birpc: 4.0.0
mlly: 1.8.2
nostics: 1.2.0
pathe: 2.0.3
@@ -15915,15 +16120,15 @@ snapshots:
- vue
- webpack
dependencies:
'@floating-ui/dom': 1.8.0
'@rolldown/debug': 1.2.2
birpc: 4.0.0
cac: 7.0.0
d3-shape: 3.2.0
diff: 9.0.0
get-port-please: 3.2.0
h3: 2.0.1-rc.22
@@ -15936,7 +16141,7 @@ snapshots:
tinyglobby: 0.2.17
unconfig: 7.5.0
unstorage: 1.17.5([email protected])
- vue-virtual-scroller: 3.0.4([email protected]([email protected]))
+ vue-virtual-scroller: 3.0.4([email protected]([email protected]))
transitivePeerDependencies:
- '@azure/app-configuration'
@@ -16027,14 +16232,14 @@ snapshots:
- utf-8-validate
- webpack
dependencies:
birpc: 4.0.0
cac: 7.0.0
h3: 2.0.1-rc.22
mlly: 1.8.2
nostics: 1.2.0
@@ -16043,7 +16248,7 @@ snapshots:
perfect-debounce: 2.1.0
tinyexec: 1.3.0
- vue: 3.5.40([email protected])
+ vue: 3.5.40([email protected])
transitivePeerDependencies:
- '@azure/app-configuration'
@@ -17516,8 +17721,6 @@ snapshots:
dependencies:
delayed-stream: 1.0.0
-
@@ -18028,16 +18231,16 @@ snapshots:
- vite
- webpack
dependencies:
- '@valibot/to-json-schema': 1.7.1([email protected]([email protected]))
+ '@valibot/to-json-schema': 1.7.1([email protected]([email protected]))
birpc: 4.0.0
cac: 7.0.0
h3: 2.0.1-rc.22
mrmime: 2.0.1
pathe: 2.0.3
- valibot: 1.4.2([email protected])
+ valibot: 1.4.2([email protected])
optionalDependencies:
'@modelcontextprotocol/sdk': 1.29.0([email protected])
@@ -18080,6 +18283,10 @@ snapshots:
+ dependencies:
+ path-type: 4.0.0
+
@@ -18976,14 +19183,6 @@ snapshots:
- dependencies:
- '@nodelib/fs.stat': 2.0.5
- '@nodelib/fs.walk': 1.2.8
- glob-parent: 5.1.2
- merge2: 1.4.1
- micromatch: 4.0.8
-
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -19451,6 +19650,15 @@ snapshots:
define-properties: 1.2.1
gopd: 1.2.0
+ dependencies:
+ array-union: 2.1.0
+ dir-glob: 3.0.1
+ fast-glob: 3.3.3
+ ignore: 5.3.2
+ merge2: 1.4.1
+ slash: 3.0.0
+
dependencies:
'@sindresorhus/merge-streams': 4.0.0
@@ -19766,7 +19974,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@croct/json5-parser': 0.2.2
'@swc/core': 1.15.47
@@ -19774,7 +19982,7 @@ snapshots:
commander: 14.0.3
execa: 9.6.1
glob: 13.0.6
- i18next: 26.3.6([email protected])
+ i18next: 26.3.6([email protected])
i18next-resources-for-ts: 2.1.0
inquirer: 14.0.2(@types/[email protected])
jiti: 2.7.0
@@ -19783,7 +19991,7 @@ snapshots:
minimatch: 10.2.6
ora: 9.4.1
react: 19.2.8
yaml: 2.9.0
transitivePeerDependencies:
- '@swc/helpers'
@@ -19805,9 +20013,9 @@ snapshots:
transitivePeerDependencies:
- '@swc/helpers'
optionalDependencies:
- typescript: 6.0.3
+ typescript: 7.0.2
dependencies:
@@ -21161,6 +21369,8 @@ snapshots:
'@babel/runtime': 7.29.7
global: 4.4.0
+
@@ -22072,6 +22282,10 @@ snapshots:
dependencies:
semver-compare: 1.0.0
+ dependencies:
+ queue-lit: 1.5.2
+
@@ -22400,6 +22614,8 @@ snapshots:
+
@@ -22483,15 +22699,15 @@ snapshots:
dependencies:
setimmediate: 1.0.5
dependencies:
'@babel/runtime': 7.29.7
html-parse-stringify: 4.0.1
- i18next: 26.3.6([email protected])
+ i18next: 26.3.6([email protected])
react: 19.2.8
use-sync-external-store: 1.6.0([email protected])
optionalDependencies:
- typescript: 6.0.3
+ typescript: 7.0.2
@@ -22717,7 +22933,7 @@ snapshots:
hash-base: 3.1.2
inherits: 2.0.4
dependencies:
'@babel/generator': 8.0.0-rc.2
'@babel/helper-validator-identifier': 8.0.0-rc.2
@@ -22730,7 +22946,7 @@ snapshots:
obug: 2.1.4
rolldown: 1.0.0-rc.5(@emnapi/[email protected])(@emnapi/[email protected])
optionalDependencies:
- typescript: 6.0.3
+ typescript: 7.0.2
transitivePeerDependencies:
- oxc-resolver
@@ -22839,16 +23055,17 @@ snapshots:
'@rolldown/binding-win32-arm64-msvc': 1.2.2
'@rolldown/binding-win32-x64-msvc': 1.2.2
dependencies:
'@jridgewell/remapping': 2.3.5
'@jridgewell/sourcemap-codec': 1.5.5
convert-source-map: 2.0.0
magic-string: 0.30.21
rollup: 4.62.4
- typescript: 6.0.3
+ typescript: 7.0.2
optionalDependencies:
'@babel/code-frame': 8.0.0
+ '@typescript/typescript6': 6.0.2
dependencies:
@@ -24038,13 +24255,23 @@ snapshots:
optionalDependencies:
'@swc/core': 1.15.47
+ dependencies:
+ chokidar: 3.6.0
+ commander: 9.5.0
+ get-tsconfig: 4.14.1
+ globby: 11.1.0
+ mylas: 2.1.14
+ normalize-path: 3.0.0
+ plimit-lit: 1.6.1
+
dependencies:
cross-spawn: 7.0.6
node-cleanup: 2.1.2
ps-tree: 1.2.0
string-argv: 0.3.2
- typescript: 6.0.3
+ typescript: 7.0.2
dependencies:
@@ -24053,7 +24280,7 @@ snapshots:
minimist: 1.2.8
strip-bom: 3.0.0
dependencies:
ansis: 4.3.1
cac: 6.7.14
@@ -24064,7 +24291,7 @@ snapshots:
obug: 2.1.4
picomatch: 4.0.5
rolldown: 1.0.0-rc.5(@emnapi/[email protected])(@emnapi/[email protected])
- rolldown-plugin-dts: 0.22.5([email protected](@emnapi/[email protected])(@emnapi/[email protected]))([email protected])
+ rolldown-plugin-dts: 0.22.5([email protected](@emnapi/[email protected])(@emnapi/[email protected]))([email protected])
semver: 7.8.5
tinyexec: 1.3.0
tinyglobby: 0.2.17
@@ -24072,9 +24299,9 @@ snapshots:
unconfig-core: 7.5.0
unrun: 0.2.39
optionalDependencies:
publint: 0.3.23
- typescript: 6.0.3
+ typescript: 7.0.2
transitivePeerDependencies:
- '@emnapi/core'
- '@emnapi/runtime'
@@ -24196,6 +24423,29 @@ snapshots:
+ optionalDependencies:
+ '@typescript/typescript-aix-ppc64': 7.0.2
+ '@typescript/typescript-darwin-arm64': 7.0.2
+ '@typescript/typescript-darwin-x64': 7.0.2
+ '@typescript/typescript-freebsd-arm64': 7.0.2
+ '@typescript/typescript-freebsd-x64': 7.0.2
+ '@typescript/typescript-linux-arm': 7.0.2
+ '@typescript/typescript-linux-arm64': 7.0.2
+ '@typescript/typescript-linux-loong64': 7.0.2
+ '@typescript/typescript-linux-mips64el': 7.0.2
+ '@typescript/typescript-linux-ppc64': 7.0.2
+ '@typescript/typescript-linux-riscv64': 7.0.2
+ '@typescript/typescript-linux-s390x': 7.0.2
+ '@typescript/typescript-linux-x64': 7.0.2
+ '@typescript/typescript-netbsd-arm64': 7.0.2
+ '@typescript/typescript-netbsd-x64': 7.0.2
+ '@typescript/typescript-openbsd-arm64': 7.0.2
+ '@typescript/typescript-openbsd-x64': 7.0.2
+ '@typescript/typescript-sunos-x64': 7.0.2
+ '@typescript/typescript-win32-arm64': 7.0.2
+ '@typescript/typescript-win32-x64': 7.0.2
+
@@ -24404,6 +24654,11 @@ snapshots:
optionalDependencies:
typescript: 6.0.3
+ optionalDependencies:
+ typescript: 7.0.2
+ optional: true
+
@@ -24516,7 +24771,7 @@ snapshots:
tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 24.13.3
esbuild: 0.28.1
fsevents: 2.3.3
jiti: 2.7.0
@@ -24534,6 +24789,11 @@ snapshots:
dependencies:
vue: 3.5.40([email protected])
+ dependencies:
+ vue: 3.5.40([email protected])
+ optional: true
+
dependencies:
'@vue/compiler-dom': 3.5.40
@@ -24544,6 +24804,17 @@ snapshots:
optionalDependencies:
typescript: 6.0.3
+ dependencies:
+ '@vue/compiler-dom': 3.5.40
+ '@vue/compiler-sfc': 3.5.40
+ '@vue/runtime-dom': 3.5.40
+ '@vue/server-renderer': 3.5.40
+ '@vue/shared': 3.5.40
+ optionalDependencies:
+ typescript: 7.0.2
+ optional: true
+
dependencies:
xml-name-validator: 5.0.0
diff --git a/scripts/build/server.sh b/scripts/build/server.sh
index e605164de2..12125ee978 100755
--- a/scripts/build/server.sh
+++ b/scripts/build/server.sh
@@ -7,7 +7,7 @@ if [ -z ${1+x} ] || [ "$1" != "--incremental" ]; then
fi
npm run tsc -- -b --verbose server/tsconfig.json
-npm run resolve-tspaths:server
+npm run tsc-alias:server
cp -r "./server/core/static" "./server/core/assets" ./dist/core
cp -r "./server/locales" ./dist
diff --git a/scripts/build/tests.sh b/scripts/build/tests.sh
index f94dde2a4d..7068895f92 100755
--- a/scripts/build/tests.sh
+++ b/scripts/build/tests.sh
@@ -5,5 +5,5 @@ set -eu
rm -rf ./packages/tests/dist
npm run tsc -- -b --verbose ./packages/tests/tsconfig.json
-npm run resolve-tspaths:server-lib
-npm run resolve-tspaths:tests
+npm run tsc-alias:server-lib
+npm run tsc-alias:tests
diff --git a/scripts/dev/server.sh b/scripts/dev/server.sh
index b90b0aaf6b..5ddc109c0e 100755
--- a/scripts/dev/server.sh
+++ b/scripts/dev/server.sh
@@ -17,9 +17,9 @@ cp -r "./client/src/locale" "./client/dist/locale"
mkdir -p "./dist/core/lib"
npm run tsc -- -b -v --incremental server/tsconfig.json
-npm run resolve-tspaths:server
+npm run tsc-alias:server
cp -r "./server/core/static" "./server/core/assets" ./dist/core
cp -r "./server/locales" ./dist
-./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=dev node --inspect --enable-source-maps dist/server"' server/tsconfig.json
+./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run tsc-alias:server && NODE_ENV=dev node --inspect --enable-source-maps dist/server"' server/tsconfig.json
diff --git a/server/core/helpers/requests.ts b/server/core/helpers/requests.ts
index af6c22d4b0..7886cfb281 100644
--- a/server/core/helpers/requests.ts
+++ b/server/core/helpers/requests.ts
@@ -3,6 +3,7 @@ import { CONFIG } from '@server/initializers/config.js'
import { createWriteStream } from 'fs'
import { remove } from 'fs-extra/esm'
import got, {
+ Got,
OptionsInit,
OptionsOfBufferResponseBody,
OptionsOfTextResponseBody,
@@ -138,7 +139,7 @@ const unsafeSSRFGot = got.extend({
}
})
-export const peertubeGot = CONFIG.FEDERATION.PREVENT_SSRF
+export const peertubeGot: Got = CONFIG.FEDERATION.PREVENT_SSRF
? got.extend(gotSsrf, unsafeSSRFGot)
: unsafeSSRFGot