PeerTube/package.json
kontrollanten f6d6e7f861
Resumable video uploads (#3933)
* WIP: resumable video uploads

relates to #324

* fix review comments

* video upload: error handling

* fix audio upload

* fixes after self review

* Update server/controllers/api/videos/index.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* Update server/middlewares/validators/videos/videos.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* Update server/controllers/api/videos/index.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* update after code review

* refactor upload route

- restore multipart upload route
- move resumable to dedicated upload-resumable route
- move checks to middleware
- do not leak internal fs structure in response

* fix yarn.lock upon rebase

* factorize addVideo for reuse in both endpoints

* add resumable upload API to openapi spec

* add initial test and test helper for resumable upload

* typings for videoAddResumable middleware

* avoid including aws and google packages via node-uploadx, by only including uploadx/core

* rename ex-isAudioBg to more explicit name mentioning it is a preview file for audio

* add video-upload-tmp-folder-cleaner job

* stronger typing of video upload middleware

* reduce dependency to @uploadx/core

* add audio upload test

* refactor resumable uploads cleanup from job to scheduler

* refactor resumable uploads scheduler to compare to last execution time

* make resumable upload validator to always cleanup on failure

* move legacy upload request building outside of uploadVideo test helper

* filter upload-resumable middlewares down to POST, PUT, DELETE

also begin to type metadata

* merge add duration functions

* stronger typings and documentation for uploadx behaviour, move init validator up

* refactor(client/video-edit): options > uploadxOptions

* refactor(client/video-edit): remove obsolete else

* scheduler/remove-dangling-resum: rename tag

* refactor(server/video): add UploadVideoFiles type

* refactor(mw/validators): restructure eslint disable

* refactor(mw/validators/videos): rename import

* refactor(client/vid-upload): rename html elem id

* refactor(sched/remove-dangl): move fn to method

* refactor(mw/async): add method typing

* refactor(mw/vali/video): double quote > single

* refactor(server/upload-resum): express use > all

* proper http methud enum server/middlewares/async.ts

* properly type http methods

* factorize common video upload validation steps

* add check for maximum partially uploaded file size

* fix audioBg use

* fix extname(filename) in addVideo

* document parameters for uploadx's resumable protocol

* clear META files in scheduler

* last audio refactor before cramming preview in the initial POST form data

* refactor as mulitpart/form-data initial post request

this allows preview/thumbnail uploads alongside the initial request,
and cleans up the upload form

* Add more tests for resumable uploads

* Refactor remove dangling resumable uploads

* Prepare changelog

* Add more resumable upload tests

* Remove user quota check for resumable uploads

* Fix upload error handler

* Update nginx template for upload-resumable

* Cleanup comment

* Remove unused express methods

* Prefer to use got instead of raw http

* Don't retry on error 500

Co-authored-by: Rigel Kent <par@rigelk.eu>
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-05-10 11:13:41 +02:00

228 lines
7.3 KiB
JSON

{
"name": "peertube",
"description": "PeerTube, an ActivityPub-federated video streaming platform using P2P directly in your web browser.",
"version": "3.1.0",
"private": true,
"licence": "AGPL-3.0",
"engines": {
"node": ">=12.x",
"yarn": ">=1.x"
},
"bin": {
"peertube": "dist/server/tools/peertube.js"
},
"author": {
"name": "Chocobozzz",
"email": "chocobozzz@framasoft.org",
"url": "http://github.com/Chocobozzz"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Chocobozzz/PeerTube.git"
},
"typings": "*.d.ts",
"scripts": {
"e2e": "bash ./scripts/e2e/index.sh",
"e2e:local": "bash ./scripts/e2e/local.sh",
"setup:cli": "bash ./scripts/setup/cli.sh",
"build": "bash ./scripts/build/index.sh",
"build:embed": "bash ./scripts/build/embed.sh",
"build:server": "bash ./scripts/build/server.sh",
"build:client": "bash ./scripts/build/client.sh",
"clean:client": "bash ./scripts/clean/client/index.sh",
"clean:server:test": "bash ./scripts/clean/server/test.sh",
"i18n:update": "bash ./scripts/i18n/update.sh",
"plugin:install": "node ./dist/scripts/plugin/install.js",
"plugin:uninstall": "node ./dist/scripts/plugin/uninstall.js",
"i18n:create-custom-files": "node ./dist/scripts/i18n/create-custom-files.js",
"reset-password": "node ./dist/scripts/reset-password.js",
"dev": "bash ./scripts/dev/index.sh",
"dev:server": "bash ./scripts/dev/server.sh",
"dev:embed": "bash ./scripts/dev/embed.sh",
"dev:client": "bash ./scripts/dev/client.sh",
"dev:cli": "bash ./scripts/dev/cli.sh",
"start": "node dist/server",
"start:server": "node dist/server --no-client",
"update-host": "node ./dist/scripts/update-host.js",
"create-transcoding-job": "node ./dist/scripts/create-transcoding-job.js",
"regenerate-thumbnails": "node ./dist/scripts/regenerate-thumbnails.js",
"create-import-video-file-job": "node ./dist/scripts/create-import-video-file-job.js",
"print-transcode-command": "node ./dist/scripts/print-transcode-command.js",
"test": "bash ./scripts/test.sh",
"help": "bash ./scripts/help.sh",
"generate-cli-doc": "bash ./scripts/generate-cli-doc.sh",
"parse-log": "node ./dist/scripts/parse-log.js",
"prune-storage": "node ./dist/scripts/prune-storage.js",
"optimize-old-videos": "node ./dist/scripts/optimize-old-videos.js",
"postinstall": "test -n \"$NOCLIENT\" || (cd client && yarn install --pure-lockfile)",
"tsc": "tsc",
"commander": "commander",
"lint": "npm run ci -- lint",
"ng": "ng",
"nodemon": "nodemon",
"ts-node": "ts-node",
"eslint": "eslint",
"concurrently": "concurrently",
"mocha": "mocha",
"ci": "bash ./scripts/ci.sh",
"release": "bash ./scripts/release.sh",
"release-embed-api": "bash ./scripts/release-embed-api.sh",
"nightly": "bash ./scripts/nightly.sh",
"openapi-clients": "bash ./scripts/openapi-clients.sh",
"client-report": "bash ./scripts/client-report.sh",
"swagger-cli": "swagger-cli"
},
"dependencies": {
"@uploadx/core": "^4.4.0",
"apicache": "1.6.2",
"async": "^3.0.1",
"async-lru": "^1.1.1",
"bcrypt": "5.0.1",
"bittorrent-tracker": "^9.0.0",
"bluebird": "^3.5.0",
"body-parser": "^1.12.4",
"bull": "^3.4.2",
"bytes": "^3.0.0",
"chokidar": "^3.4.2",
"commander": "^7.0.0",
"config": "^3.0.0",
"cookie-parser": "^1.4.3",
"cors": "^2.8.1",
"create-torrent": "^4.0.0",
"decache": "^4.6.0",
"deep-object-diff": "^1.1.0",
"email-templates": "^8.0.3",
"express": "^4.12.4",
"express-rate-limit": "^5.0.0",
"express-validator": "^6.4.0",
"flat": "^5.0.0",
"fluent-ffmpeg": "^2.1.0",
"fs-extra": "^10.0.0",
"got": "^11.8.2",
"helmet": "^4.1.0",
"http-signature": "1.3.5",
"ip-anonymize": "^0.1.0",
"ipaddr.js": "2.0.0",
"is-cidr": "^4.0.0",
"iso-639-3": "2.2.0",
"jimp": "^0.16.0",
"js-yaml": "^4.0.0",
"jsonld": "~5.2.0",
"lodash": "^4.17.10",
"lru-cache": "^6.0.0",
"magnet-uri": "^6.1.0",
"markdown-it": "^12.0.4",
"markdown-it-emoji": "^2.0.0",
"memoizee": "^0.4.14",
"morgan": "^1.5.3",
"multer": "^1.1.0",
"node-media-server": "^2.1.4",
"nodemailer": "^6.0.0",
"oauth2-server": "3.1.1",
"parse-torrent": "^9.1.0",
"password-generator": "^2.0.2",
"pem": "^1.12.3",
"pfeed": "1.1.11",
"pg": "^8.2.1",
"prompt": "^1.0.0",
"pug": "^3.0.0",
"redis": "^3.0.2",
"reflect-metadata": "^0.1.12",
"sanitize-html": "2.x",
"sequelize": "6.6.2",
"sequelize-typescript": "^2.0.0-beta.1",
"sitemap": "^7.0.0",
"socket.io": "^4.0.1",
"sql-formatter": "^4.0.0-beta.0",
"srt-to-vtt": "^1.1.2",
"tsconfig-paths": "^3.9.0",
"tslib": "^2.0.0",
"useragent": "^2.3.0",
"uuid": "^8.1.0",
"validator": "^13.0.0",
"webfinger.js": "^2.6.6",
"webtorrent": "^0.118.0",
"winston": "3.3.3",
"ws": "^7.0.0",
"youtube-dl": "^3.0.2"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.1.4",
"@types/apicache": "^1.2.0",
"@types/async": "^3.0.0",
"@types/async-lock": "^1.1.0",
"@types/bcrypt": "^3.0.0",
"@types/bluebird": "^3.5.33",
"@types/body-parser": "^1.16.3",
"@types/bull": "^3.15.0",
"@types/bytes": "^3.0.0",
"@types/chai": "^4.0.4",
"@types/chai-json-schema": "^1.4.3",
"@types/chai-xml": "^0.3.1",
"@types/config": "^0.0.38",
"@types/express": "4.17.9",
"@types/express-rate-limit": "^5.0.0",
"@types/fluent-ffmpeg": "^2.1.16",
"@types/fs-extra": "^9.0.1",
"@types/lodash": "^4.14.64",
"@types/lru-cache": "^5.1.0",
"@types/magnet-uri": "^5.1.1",
"@types/maildev": "^0.0.2",
"@types/memoizee": "^0.4.2",
"@types/mkdirp": "^1.0.0",
"@types/mocha": "^8.0.3",
"@types/morgan": "^1.7.32",
"@types/multer": "^1.3.3",
"@types/node": "^14.14.31",
"@types/nodemailer": "^6.2.0",
"@types/oauth2-server": "^3.0.8",
"@types/pem": "^1.9.3",
"@types/redis": "^2.8.5",
"@types/request": "^2.0.3",
"@types/supertest": "^2.0.3",
"@types/validator": "^13.0.0",
"@types/webtorrent": "^0.109.0",
"@types/ws": "^7.2.1",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"autocannon": "^7.0.4",
"chai": "^4.1.1",
"chai-json-schema": "^1.5.0",
"chai-xml": "^0.4.0",
"concurrently": "^6.0.0",
"eslint": "^7.2.0",
"eslint-config-standard-with-typescript": "^20.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"fast-xml-parser": "^3.19.0",
"maildev": "^1.0.0-rc3",
"marked": "^2.0.1",
"marked-man": "^0.7.0",
"mocha": "^8.0.1",
"nodemon": "^2.0.1",
"socket.io-client": "^4.0.1",
"source-map-support": "^0.5.0",
"supertest": "^6.0.1",
"swagger-cli": "^4.0.2",
"ts-node": "9.1.1",
"typescript": "^4.0.5"
},
"bundlewatch": {
"files": [
{
"path": "client/dist/en-US/*.js",
"maxSize": "1mb"
},
{
"path": "client/dist/standalone/videos/video-embed.bundle.js",
"maxSize": "1mb"
},
{
"path": "client/dist/standalone/videos/video-embed.css",
"maxSize": "1mb"
}
]
}
}