From 30862af7f64fbebbd77c0d47133861db2da9700f Mon Sep 17 00:00:00 2001 From: nikolay-borzov Date: Wed, 9 Jan 2019 21:12:20 +0400 Subject: [PATCH] Add magnet URI and info hash support --- README.md | 12 +- index.js | 35 +- package-lock.json | 982 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 7 +- 4 files changed, 1015 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 0950dce..adb8a09 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,23 @@ gets files' paths from `nature-pack.torrent` and compares them with files from ` ## Arguments -`--torrent` (or `-t`) - Path to torrent file +`--torrent` (or `-t`) - Torrent id (as described in [webtorrent api](https://github.com/webtorrent/webtorrent/blob/master/docs/api.md#clientaddtorrentid-opts-function-ontorrent-torrent-)) +- Magnet URI (e.g. `magnet:?xt=urn:btih:d2474e86c95b19b8bcfdb92bc12c9d44667cfa36`) +- Info Hash (e.g. `d2474e86c95b19b8bcfdb92bc12c9d44667cfa36`) +- http/https URL to a torrent file +- Filesystem path to a torrent file `--dir` (or `-d`) - Path to directory with downloaded files `--verbose` - Output all outdated filenames. By default only first 20 filenames are displayed +## Known bugs + +- Torrent files with names containing unicode characters (e.g. 𝗚𝗪𝗔 1.txt) cannot be parsed correctly. + ### Build with -- [parse-torrent](https://github.com/webtorrent/parse-torrent) +- [webtorrent](https://github.com/webtorrent/webtorrent) - [minimist](https://github.com/substack/minimist) - [enquirer](https://github.com/enquirer/enquirer) - [recursive-readdir](https://github.com/jergason/recursive-readdir) diff --git a/index.js b/index.js index e40f9ad..e89a3ba 100644 --- a/index.js +++ b/index.js @@ -5,11 +5,12 @@ const os = require('os') const path = require('path') const util = require('util') const recursive = require('recursive-readdir') -const parseTorrent = util.promisify(require('parse-torrent').remote) const unlink = util.promisify(fs.unlink) const deleteEmpty = require('delete-empty') const { Confirm } = require('enquirer') const chalk = require('chalk') +const WebTorrent = require('webtorrent') +const memoryChunkStore = require('memory-chunk-store') const infoLog = chalk.green const errorLog = chalk.bgRed @@ -18,12 +19,32 @@ const fileLog = chalk.grey const IGNORE_GLOBS = ['~uTorrentPartFile*'] const FILES_LIST_LIMIT = 20 -async function parseTorrentFile(torrentPath) { - return parseTorrent(torrentPath).catch(error => { +async function getTorrentMetadata(torrentId) { + return new Promise(resolve => { + parseTorrent(torrentId, resolve) + }).catch(error => { console.log(errorLog('Unable to parse torrent file'), error) }) } +function parseTorrent(torrentId, onDone) { + const client = new WebTorrent() + + // Use memory-chunk-store to avoid creating directories inside tmp/webtorrent(https://github.com/webtorrent/webtorrent/issues/1562) + const torrent = client.add(torrentId, { + store: memoryChunkStore + }) + + torrent.on('metadata', function() { + onDone({ + name: torrent.name, + files: torrent.files.map(file => file.path) + }) + + client.destroy() + }) +} + async function deleteFiles(filenames) { try { const deletePromises = filenames.map(filename => unlink(filename)) @@ -73,13 +94,13 @@ if (!argv.torrent) { return } -const torrentPath = argv.torrent +const torrentId = argv.torrent const directoryPath = path.resolve(argv.dir) const verbose = argv.verbose console.log(infoLog('Parsing torrent file...')) Promise.all([ - parseTorrentFile(torrentPath), + getTorrentMetadata(torrentId), recursive(directoryPath, IGNORE_GLOBS) ]).then(async ([parseResult, dirFiles]) => { if (!parseResult) { @@ -89,10 +110,10 @@ Promise.all([ const { name, files } = parseResult console.log(`Parsed ${chalk.bold(name)}.`, os.EOL) - const rootDir = `${name}${path.sep}` + const rootDir = `${name}${path.sep}` const torrentFiles = files.map(file => - path.join(directoryPath, file.path.replace(rootDir, '')) + path.join(directoryPath, file.replace(rootDir, '')) ) const outdated = dirFiles.reduce((result, filename) => { diff --git a/package-lock.json b/package-lock.json index 108e407..8ba7299 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "torrent-clean", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -123,6 +123,11 @@ "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", "dev": true }, + "addr-to-ip-port": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/addr-to-ip-port/-/addr-to-ip-port-1.5.1.tgz", + "integrity": "sha512-bA+dyydTNuQtrEDJ0g9eR7XabNhvrM5yZY0hvTbNK3yvoeC73ZqMES6E1cEqH9WPxs4uMtMsOjfwS4FmluhsAA==" + }, "ajv": { "version": "6.6.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz", @@ -183,6 +188,11 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, "babel-eslint": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz", @@ -222,11 +232,167 @@ "safe-buffer": "^5.1.1" } }, + "binary-search": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/binary-search/-/binary-search-1.3.4.tgz", + "integrity": "sha512-dPxU/vZLnH0tEVjVPgi015oSwqu6oLfCeHywuFRhBE0yM0mYocvleTl8qsdM1YFhRzTRhM1+VzS8XLDVrHPopg==" + }, + "bitfield": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bitfield/-/bitfield-2.0.0.tgz", + "integrity": "sha512-4xM4DYejOHQ/qWBfeqBXNA4mJ12PwcOibFYnH1kYh5U9BHciCqEJBqGNVnMJXUhm8mflujNRLSv7IiVQxovgjw==" + }, + "bittorrent-dht": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bittorrent-dht/-/bittorrent-dht-9.0.0.tgz", + "integrity": "sha512-X5ax4G/PLtEPfqOUjqDZ2nmPENndWRMK4sT2jcQ4sXor904zhR40r4KqTyTvWYAljh5/hPPqM9DCUUtqWzRXoQ==", + "requires": { + "bencode": "^2.0.0", + "buffer-equals": "^1.0.3", + "debug": "^3.1.0", + "inherits": "^2.0.1", + "k-bucket": "^5.0.0", + "k-rpc": "^5.0.0", + "last-one-wins": "^1.0.4", + "lru": "^3.1.0", + "randombytes": "^2.0.5", + "record-cache": "^1.0.2", + "safe-buffer": "^5.0.1", + "simple-sha1": "^2.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "bittorrent-peerid": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bittorrent-peerid/-/bittorrent-peerid-1.3.0.tgz", + "integrity": "sha512-SYd5H3RbN1ex+TrWAKXkEkASFWxAR7Tk6iLt9tfAT9ehBvZb/Y3AQDVRVJynlrixcWpnmsLYKI7tkRWgp7ORoQ==" + }, + "bittorrent-protocol": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bittorrent-protocol/-/bittorrent-protocol-3.0.1.tgz", + "integrity": "sha512-hnvOzAu9u+2H0OLLL5byoFdz6oz5f3bx5f7R+ItUohTHMq9TgUhEJfcjo7xWtQHSKOVciYWwYTJ4EjczF5RX2A==", + "requires": { + "bencode": "^2.0.0", + "bitfield": "^2.0.0", + "debug": "^3.1.0", + "randombytes": "^2.0.5", + "readable-stream": "^2.3.2", + "speedometer": "^1.0.0", + "unordered-array-remove": "^1.0.2", + "xtend": "^4.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "bittorrent-tracker": { + "version": "9.10.1", + "resolved": "https://registry.npmjs.org/bittorrent-tracker/-/bittorrent-tracker-9.10.1.tgz", + "integrity": "sha512-n5zTL/g6Wt0rb2EnkiyiaGYhth7I/N0/xMqGUpvGX/7g1scDGBVPhJnXR8lfp3/OMj681fv40o4q/otECMtZSA==", + "requires": { + "bencode": "^2.0.0", + "bittorrent-peerid": "^1.0.2", + "bn.js": "^4.4.0", + "bufferutil": "^4.0.0", + "compact2string": "^1.2.0", + "debug": "^3.1.0", + "inherits": "^2.0.1", + "ip": "^1.0.1", + "lru": "^3.0.0", + "minimist": "^1.1.1", + "once": "^1.3.0", + "random-iterate": "^1.0.1", + "randombytes": "^2.0.3", + "run-parallel": "^1.1.2", + "run-series": "^1.0.2", + "safe-buffer": "^5.0.0", + "simple-get": "^3.0.0", + "simple-peer": "^9.0.0", + "simple-websocket": "^7.0.1", + "string2compact": "^1.1.1", + "uniq": "^1.0.1", + "unordered-array-remove": "^1.0.2", + "utf-8-validate": "^5.0.1", + "ws": "^6.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "blob-to-buffer": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/blob-to-buffer/-/blob-to-buffer-1.2.8.tgz", "integrity": "sha512-re0AIxakF504MgeMtIyJkVcZ8T5aUxtp/QmTMlmjyb3P44E1BEv5x3LATBGApWAJATyXHtkXRD+gWTmeyYLiQA==" }, + "block-stream2": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/block-stream2/-/block-stream2-1.1.0.tgz", + "integrity": "sha1-xzjjqRupd+u14f70MeE8oR2GOeI=", + "requires": { + "defined": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -236,6 +402,49 @@ "concat-map": "0.0.1" } }, + "browserify-package-json": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-package-json/-/browserify-package-json-1.0.1.tgz", + "integrity": "sha1-mN3oqlxWH9bT/km7qhArdLOW/eo=" + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-equals": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/buffer-equals/-/buffer-equals-1.0.4.tgz", + "integrity": "sha1-A1O1T9B/2VZBcGca5vZrnPENJ/U=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "bufferutil": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.1.tgz", + "integrity": "sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA==", + "optional": true, + "requires": { + "node-gyp-build": "~3.7.0" + } + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -264,6 +473,31 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "chunk-store-stream": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/chunk-store-stream/-/chunk-store-stream-3.0.1.tgz", + "integrity": "sha512-GA1NIFDZKElhkjiO6QOyzfK1QbUt6M3gFhUU/aR05JYaDqXbU5d7U92cLvGKdItJEDfojky6NQefy5VL5PpDBA==", + "requires": { + "block-stream2": "^1.0.0", + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", @@ -285,6 +519,11 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, + "closest-to": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/closest-to/-/closest-to-2.0.0.tgz", + "integrity": "sha1-uyqGDtt3abYtBIIXSK5Q2iTb76o=" + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -298,6 +537,14 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "compact2string": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/compact2string/-/compact2string-1.4.0.tgz", + "integrity": "sha1-qZzZbqAAUlaEsmloOuIiLW7qe0k=", + "requires": { + "ipaddr.js": ">= 0.1.5" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -309,6 +556,31 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-torrent": { + "version": "3.33.0", + "resolved": "https://registry.npmjs.org/create-torrent/-/create-torrent-3.33.0.tgz", + "integrity": "sha512-KMd0KuvwVUg1grlRd5skG9ZkSbBYDDkAjDUMLnvxdRn0rL7ph3IwoOk7I8u1yLX4HYjGiLVlWYO55YWNNPjJFA==", + "requires": { + "bencode": "^2.0.0", + "block-stream2": "^1.0.0", + "filestream": "^4.0.0", + "flatten": "^1.0.2", + "is-file": "^1.0.0", + "junk": "^2.1.0", + "minimist": "^1.1.0", + "multistream": "^2.0.2", + "once": "^1.3.0", + "piece-length": "^1.0.0", + "readable-stream": "^3.0.2", + "run-parallel": "^1.0.0", + "simple-sha1": "^2.0.0" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -326,7 +598,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -345,6 +616,11 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, "delete-empty": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/delete-empty/-/delete-empty-2.0.0.tgz", @@ -364,6 +640,14 @@ "esutils": "^2.0.2" } }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "^1.4.0" + } + }, "enquirer": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.0.tgz", @@ -728,6 +1012,33 @@ "object-assign": "^4.0.1" } }, + "filestream": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/filestream/-/filestream-4.1.3.tgz", + "integrity": "sha1-lI/KregiH3FfXsrdxUhi+qrMkyU=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.5", + "typedarray-to-buffer": "^3.0.0", + "xtend": "^4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -750,6 +1061,24 @@ "write": "^0.2.1" } }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" + }, + "fs-chunk-store": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/fs-chunk-store/-/fs-chunk-store-1.7.0.tgz", + "integrity": "sha512-KhjJmZAs2eqfhCb6PdPx4RcZtheGTz86tpTC5JTvqBn/xda+Nb+0C7dCyjOSN7T76H6a56LvH0SVXQMchLXDRw==", + "requires": { + "mkdirp": "^0.5.1", + "random-access-file": "^2.0.1", + "randombytes": "^2.0.3", + "rimraf": "^2.4.2", + "run-parallel": "^1.1.2", + "thunky": "^1.0.1" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -767,6 +1096,11 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "get-browser-rtc": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-browser-rtc/-/get-browser-rtc-1.0.2.tgz", + "integrity": "sha1-u81AyEUaftTvXDc7gWmkCd0dEdk=" + }, "get-stdin": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", @@ -832,6 +1166,11 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "immediate-chunk-store": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/immediate-chunk-store/-/immediate-chunk-store-2.0.0.tgz", + "integrity": "sha512-5s6NiCGbtWc+OQA60jrre54w12U7tynIyUNjO5LJjNA5lWwvCv6640roq8Wk/wIuaqnd4Pgtp453OyJ7hbONkQ==" + }, "import-fresh": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", @@ -900,12 +1239,35 @@ } } }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, + "ip-set": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ip-set/-/ip-set-1.0.1.tgz", + "integrity": "sha1-Yztm0L1sjQ3paNBTJjyRINO2cn4=", + "requires": { + "ip": "^1.1.3" + } + }, + "ipaddr.js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.1.tgz", + "integrity": "sha1-+kt5+kf9Pe9eOxWYJRYcClGclCc=" + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-ascii": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-ascii/-/is-ascii-1.0.0.tgz", + "integrity": "sha1-8CrQJZoJIc0Zn/Ic4bCeD2tOOSk=" + }, "is-builtin-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", @@ -915,6 +1277,11 @@ "builtin-modules": "^1.0.0" } }, + "is-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-file/-/is-file-1.0.0.tgz", + "integrity": "sha1-KKRM+9nT2xkwRfIrZfzo7fliBZY=" + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -927,6 +1294,11 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -980,6 +1352,57 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "junk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/junk/-/junk-2.1.0.tgz", + "integrity": "sha1-9DG0t/By3FAKXxDOf07HGTDnATQ=" + }, + "k-bucket": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/k-bucket/-/k-bucket-5.0.0.tgz", + "integrity": "sha512-r/q+wV/Kde62/tk+rqyttEJn6h0jR7x+incdMVSYTqK73zVxVrzJa70kJL49cIKen8XjIgUZKSvk8ktnrQbK4w==", + "requires": { + "randombytes": "^2.0.3" + } + }, + "k-rpc": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/k-rpc/-/k-rpc-5.0.0.tgz", + "integrity": "sha512-vCH2rQdfMOS+MlUuTSuar1pS2EMrltURf9LmAR9xR6Jik0XPlMX3vEixgqMn17wKmFVCublJqSJ4hJIP7oKZ3Q==", + "requires": { + "buffer-equals": "^1.0.3", + "k-bucket": "^4.0.0", + "k-rpc-socket": "^1.7.2", + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "k-bucket": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/k-bucket/-/k-bucket-4.0.1.tgz", + "integrity": "sha512-YvDpmY3waI999h1zZoW1rJ04fZrgZ+5PAlVmvwDHT6YO/Q1AOhdel07xsKy9eAvJjQ9xZV1wz3rXKqEfaWvlcQ==", + "requires": { + "inherits": "^2.0.1", + "randombytes": "^2.0.3" + } + } + } + }, + "k-rpc-socket": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/k-rpc-socket/-/k-rpc-socket-1.8.0.tgz", + "integrity": "sha512-f/9TynsO8YYjZ6JjNNtSSH7CJcIHcio1buy3zqByGxb/GX8AWLdL6FZEWTrN8V3/J7W4/E0ZTQQ+Jt2rVq7ELg==", + "requires": { + "bencode": "^2.0.0", + "buffer-equals": "^1.0.4", + "safe-buffer": "^5.1.1" + } + }, + "last-one-wins": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/last-one-wins/-/last-one-wins-1.0.4.tgz", + "integrity": "sha1-wb/Qy8tGeQ7JFWuNGu6Py4bNoio=" + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -990,6 +1413,18 @@ "type-check": "~0.3.2" } }, + "load-ip-set": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/load-ip-set/-/load-ip-set-2.1.0.tgz", + "integrity": "sha512-taz7U6B+F7Zq90dfIKwqsB1CrFKelSEmMGC68OUqem8Cgd1QZygQBYb2Fk9i6muBSfH4xwF/Pjt4KKlAdOyWZw==", + "requires": { + "ip-set": "^1.0.0", + "netmask": "^1.0.6", + "once": "^1.3.0", + "simple-get": "^3.0.0", + "split": "^1.0.0" + } + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -1035,6 +1470,14 @@ "success-symbol": "^0.1.0" } }, + "lru": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lru/-/lru-3.1.0.tgz", + "integrity": "sha1-6n+4VG2DczOWoTCR12z+tMBoN9U=", + "requires": { + "inherits": "^2.0.1" + } + }, "magnet-uri": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/magnet-uri/-/magnet-uri-5.2.4.tgz", @@ -1044,6 +1487,26 @@ "uniq": "^1.0.1" } }, + "mediasource": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/mediasource/-/mediasource-2.3.0.tgz", + "integrity": "sha512-fqm86UwHvAnneIv40Uy1sDQaFtAByq/k0SQ3uCtbnEeSQNT1s5TDHCZOD1VmYCHwfY1jL2NjoZVwzZKYqy3L7A==", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^3.0.0", + "to-arraybuffer": "^1.0.1" + } + }, + "memory-chunk-store": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/memory-chunk-store/-/memory-chunk-store-1.3.0.tgz", + "integrity": "sha512-6LsOpHKKhxYrLhHmOJdBCUtSO7op5rUs1pag0fhjHo0QiXRyna0bwYf4EmQuL7InUeF2J7dUMPr6VMogRyf9NA==" + }, + "mime": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", + "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==" + }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -1072,7 +1535,6 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, "requires": { "minimist": "0.0.8" }, @@ -1080,16 +1542,77 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "mp4-box-encoding": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mp4-box-encoding/-/mp4-box-encoding-1.3.0.tgz", + "integrity": "sha512-U4pMLpjT/UzB8d36dxj6Mf1bG9xypEvgbuRIa1fztRXNKKTCAtRxsnFZhNOd7YDFOKtjBgssYGvo4H/Q3ZY1MA==", + "requires": { + "buffer-alloc": "^1.2.0", + "buffer-from": "^1.1.0", + "uint64be": "^2.0.2" + } + }, + "mp4-stream": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/mp4-stream/-/mp4-stream-2.0.3.tgz", + "integrity": "sha512-5NzgI0+bGakoZEwnIYINXqB3mnewkt3Y7jcvkXsTubnCNUSdM8cpP0Vemxf6FLg0qUN8fydTgNMVAc3QU8B92g==", + "requires": { + "buffer-alloc": "^1.1.0", + "inherits": "^2.0.1", + "mp4-box-encoding": "^1.1.0", + "next-event": "^1.0.0", + "readable-stream": "^2.0.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } } } }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "multistream": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/multistream/-/multistream-2.1.1.tgz", + "integrity": "sha512-xasv76hl6nr1dEy3lPvy7Ej7K/Lx3O/FCvwge8PeVJpciPPoNCbaANcNiBug3IpdvTveZUcAV0DJzdnUDMesNQ==", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } }, "mute-stream": { "version": "0.0.7", @@ -1103,12 +1626,28 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" + }, + "next-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-event/-/next-event-1.0.0.tgz", + "integrity": "sha1-53eKzeLlWALgrRh5w5z2917aYdg=" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-gyp-build": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", + "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==", + "optional": true + }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -1188,6 +1727,14 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, + "package-json-versionify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/package-json-versionify/-/package-json-versionify-1.0.4.tgz", + "integrity": "sha1-WGBYepRIc6a35tJujlH/siMVvxc=", + "requires": { + "browserify-package-json": "^1.0.0" + } + }, "parent-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", @@ -1206,6 +1753,11 @@ "error-ex": "^1.2.0" } }, + "parse-numeric-range": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-0.0.2.tgz", + "integrity": "sha1-tPCdQTx6282Yf26SM8e0shDJOOQ=" + }, "parse-torrent": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/parse-torrent/-/parse-torrent-6.1.2.tgz", @@ -1261,6 +1813,14 @@ "pify": "^2.0.0" } }, + "piece-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/piece-length/-/piece-length-1.0.0.tgz", + "integrity": "sha1-TbcWcVf9af7xTK9yYs058YmyRQg=", + "requires": { + "closest-to": "~2.0.0" + } + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -1318,18 +1878,75 @@ "fast-diff": "^1.1.2" } }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "random-access-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/random-access-file/-/random-access-file-2.0.1.tgz", + "integrity": "sha512-nb4fClpzoUY+v1SHrro+9yykN90eMA1rc+xM39tnZ5R3BgFY+J/NxPZ0KuUpishEsvnwou9Fvm2wa3cjeuG7vg==", + "requires": { + "mkdirp": "^0.5.1", + "random-access-storage": "^1.1.1" + } + }, + "random-access-storage": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/random-access-storage/-/random-access-storage-1.3.0.tgz", + "integrity": "sha512-pdS9Mcb9TB7oICypPRALlheaSuszuAKmLVEPKJMuYor7R/zDuHh5ALuQoS+ox31XRwQUL+tDwWH2GPdyspwelA==", + "requires": { + "inherits": "^2.0.3" + } + }, + "random-iterate": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/random-iterate/-/random-iterate-1.0.1.tgz", + "integrity": "sha1-99l9kt7mZl7F9toIx/ljytSyrJk=" + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "range-slice-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/range-slice-stream/-/range-slice-stream-2.0.0.tgz", + "integrity": "sha512-PPYLwZ63lXi6Tv2EZ8w3M4FzC0rVqvxivaOVS8pXSp5FMIHFnvi4MWHL3UdFLhwSy50aNtJsgjY0mBC6oFL26Q==", + "requires": { + "readable-stream": "^3.0.2" + } + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -1362,6 +1979,21 @@ } } }, + "readable-stream": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", + "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "record-cache": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/record-cache/-/record-cache-1.1.0.tgz", + "integrity": "sha512-u8rbtLEJV7HRacl/ZYwSBFD8NFyB3PfTTfGLP37IW3hftQCwu6z4Q2RLyxo1YJUNRTEzJfpLpGwVuEYdaIkG9Q==" + }, "recursive-readdir": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", @@ -1384,6 +2016,28 @@ "isobject": "^2.0.0" } }, + "render-media": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/render-media/-/render-media-3.1.3.tgz", + "integrity": "sha512-K7ziKKlIcgYpAovRsABDiSaNn7TzDDyyuFGpRwM52cloNcajInB6sCxFPUEzOuTJUeyvKCqT/k5INOjpKLCjhQ==", + "requires": { + "debug": "^3.1.0", + "is-ascii": "^1.0.0", + "mediasource": "^2.1.0", + "stream-to-blob-url": "^2.0.0", + "videostream": "^2.5.1" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "resolve": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", @@ -1426,6 +2080,21 @@ "is-promise": "^2.1.0" } }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" + }, + "run-parallel-limit": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.0.5.tgz", + "integrity": "sha512-NsY+oDngvrvMxKB3G8ijBzIema6aYbQMD2bHOamvN52BysbIGTnEY2xsNyfrcr9GhY995/t/0nQN3R3oZvaDlg==" + }, + "run-series": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.8.tgz", + "integrity": "sha512-+GztYEPRpIsQoCSraWHDBs9WVy4eVME16zhOtDB4H9J4xN0XRhknnmLOl+4gRgZtu8dpp9N/utSPjKH/xmDzXg==" + }, "rusha": { "version": "0.8.13", "resolved": "https://registry.npmjs.org/rusha/-/rusha-0.8.13.tgz", @@ -1493,6 +2162,34 @@ "simple-concat": "^1.0.0" } }, + "simple-peer": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/simple-peer/-/simple-peer-9.2.0.tgz", + "integrity": "sha512-BaNhpcMBEI7GjZo+6uKSJgihtpvcopzfhSbzyhSi67d8Ab9Rp5KsXQ8pB2Yx6km46PgjNUga+2fYnHnIPLl5gg==", + "requires": { + "debug": "^4.0.1", + "get-browser-rtc": "^1.0.0", + "inherits": "^2.0.1", + "randombytes": "^2.0.3", + "readable-stream": "^2.3.4" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, "simple-sha1": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/simple-sha1/-/simple-sha1-2.1.1.tgz", @@ -1501,6 +2198,42 @@ "rusha": "^0.8.1" } }, + "simple-websocket": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/simple-websocket/-/simple-websocket-7.2.0.tgz", + "integrity": "sha512-wdxFg1fHw1yqFKWDcw+yNb4VIYqtl+vknZMlpLhvZSlR6l7/iVuwozqo+Qtl73mB1IH5QnXzonD1S+hAaLNTvQ==", + "requires": { + "debug": "^3.1.0", + "inherits": "^2.0.1", + "randombytes": "^2.0.3", + "readable-stream": "^2.0.5", + "ws": "^6.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, "slice-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz", @@ -1550,12 +2283,49 @@ "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, + "speedometer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-1.1.0.tgz", + "integrity": "sha512-z/wAiTESw2XVPssY2XRcme4niTc4S5FkkJ4gknudtVoc33Zil8TdTxHy5torRcgqMqksJV2Yz8HQcvtbsnw0mQ==" + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "requires": { + "through": "2" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "stream-to-blob": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-to-blob/-/stream-to-blob-1.0.1.tgz", + "integrity": "sha512-aRy4neA4rf+qMtLT9fCRLPGWdrsIKtCx4kUdNTIPgPQ2hkHkdxbViVAvABMx9oRM6yCWfngHx6pwXfbYkVuPuw==", + "requires": { + "once": "^1.3.3" + } + }, + "stream-to-blob-url": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/stream-to-blob-url/-/stream-to-blob-url-2.1.1.tgz", + "integrity": "sha512-DKJPEmCmIZoBfGVle9IhSfERiWaN5cuOtmfPxP2dZbLDRZxkBWZ4QbYxEJOSALk1Kf+WjBgedAMO6qkkf7Lmrg==", + "requires": { + "stream-to-blob": "^1.0.0" + } + }, + "stream-with-known-length-to-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-with-known-length-to-buffer/-/stream-with-known-length-to-buffer-1.0.2.tgz", + "integrity": "sha512-UxSISjxmguvfYzZdq6d4XAjc3gAocqTIOS1CjgwkDkkGT/LMTsIYiV8agIw42IHFFHf8k4lPOoroCCf4W9oqzg==", + "requires": { + "once": "^1.3.3" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -1566,6 +2336,23 @@ "strip-ansi": "^4.0.0" } }, + "string2compact": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string2compact/-/string2compact-1.3.0.tgz", + "integrity": "sha512-004ulKKANDuQilQsNxy2lisrpMG0qUJxBU+2YCEF7KziRyNR0Nredm2qk0f1V82nva59H3y9GWeHXE63HzGRFw==", + "requires": { + "addr-to-ip-port": "^1.0.1", + "ipaddr.js": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -1626,8 +2413,12 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "thunky": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", + "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==" }, "tmp": { "version": "0.0.33", @@ -1638,12 +2429,43 @@ "os-tmpdir": "~1.0.2" } }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, + "torrent-discovery": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/torrent-discovery/-/torrent-discovery-9.1.1.tgz", + "integrity": "sha512-3mHf+bxVCVLrlkPJdAoMbPMY1hpTZVeWw5hNc2pPFm+HCc2DS0HgVFTBTSWtB8vQPWA1hSEZpqJ+3QfdXxDE1g==", + "requires": { + "bittorrent-dht": "^9.0.0", + "bittorrent-tracker": "^9.0.0", + "debug": "^3.1.0", + "run-parallel": "^1.1.2" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "torrent-piece": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/torrent-piece/-/torrent-piece-2.0.0.tgz", + "integrity": "sha512-H/Z/yCuvZJj1vl1IQHI8dvF2QrUuXRJoptT5DW5967/dsLpXlCg+uyhFR5lfNj5mNaYePUbKtnL+qKWZGXv4Nw==" + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -1665,11 +2487,32 @@ "prelude-ls": "~1.1.2" } }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "uint64be": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uint64be/-/uint64be-2.0.2.tgz", + "integrity": "sha512-9QqdvpGQTXgxthP+lY4e/gIBy+RuqcBaC6JVwT5I3bDLgT/btL6twZMR0pI3/Fgah9G/pdwzIprE5gL6v9UvyQ==", + "requires": { + "buffer-alloc": "^1.1.0" + } + }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" }, + "unordered-array-remove": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unordered-array-remove/-/unordered-array-remove-1.0.2.tgz", + "integrity": "sha1-xUbo+I4xegzyZEyX7LV9umbSUO8=" + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -1679,6 +2522,52 @@ "punycode": "^2.1.0" } }, + "ut_metadata": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ut_metadata/-/ut_metadata-3.3.0.tgz", + "integrity": "sha512-IK+ke9yL6a4oPLz/3oSW9TW7m9Wr4RG+5kW5aS2YulzEU1QDGAtago/NnOlno91fo3fSO7mnsqzn3NXNXdv8nA==", + "requires": { + "bencode": "^2.0.0", + "bitfield": "^2.0.0", + "debug": "^3.1.0", + "simple-sha1": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "ut_pex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ut_pex/-/ut_pex-1.2.1.tgz", + "integrity": "sha512-ZrxMCbffYtxQDqvREN9kBXK2CB9tPnd5PylHoqQX9ai+3HV9/S39FnA5JnhLOC82dxIQQg0nTN2wmhtAdGNtOA==", + "requires": { + "bencode": "^2.0.0", + "compact2string": "^1.2.0", + "inherits": "^2.0.1", + "string2compact": "^1.2.5" + } + }, + "utf-8-validate": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.2.tgz", + "integrity": "sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw==", + "optional": true, + "requires": { + "node-gyp-build": "~3.7.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -1689,6 +2578,68 @@ "spdx-expression-parse": "^3.0.0" } }, + "videostream": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/videostream/-/videostream-2.6.0.tgz", + "integrity": "sha512-nSsullx1BYClJxVSt4Fa+Ulsv0Cf7UwaHq+4LQdLkAUdmqNhY1DlGxXDWVY2gui5XV4FvDiSbXmSbGryMrrUCQ==", + "requires": { + "binary-search": "^1.3.4", + "inherits": "^2.0.1", + "mediasource": "^2.2.2", + "mp4-box-encoding": "^1.3.0", + "mp4-stream": "^2.0.0", + "multistream": "^2.0.2", + "pump": "^3.0.0", + "range-slice-stream": "^2.0.0" + } + }, + "webtorrent": { + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/webtorrent/-/webtorrent-0.103.0.tgz", + "integrity": "sha512-4N8+KQMtQw7KPz8Zjz8Y9S+olkpRA1kdUpbJynQHnSzIkTNJGPL9c6akBTOvtSfTtXs4kETts6eUIZkml6xRoA==", + "requires": { + "addr-to-ip-port": "^1.4.2", + "bitfield": "^2.0.0", + "bittorrent-dht": "^9.0.0", + "bittorrent-protocol": "^3.0.0", + "chunk-store-stream": "^3.0.1", + "create-torrent": "^3.33.0", + "debug": "^4.1.0", + "end-of-stream": "^1.1.0", + "fs-chunk-store": "^1.6.2", + "immediate-chunk-store": "^2.0.0", + "load-ip-set": "^2.1.0", + "memory-chunk-store": "^1.2.0", + "mime": "^2.4.0", + "multistream": "^2.0.5", + "package-json-versionify": "^1.0.2", + "parse-numeric-range": "^0.0.2", + "parse-torrent": "^6.1.2", + "pump": "^3.0.0", + "random-iterate": "^1.0.1", + "randombytes": "^2.0.3", + "range-parser": "^1.2.0", + "readable-stream": "^3.0.6", + "render-media": "^3.0.0", + "run-parallel": "^1.1.6", + "run-parallel-limit": "^1.0.3", + "safe-buffer": "^5.0.1", + "simple-concat": "^1.0.0", + "simple-get": "^3.0.1", + "simple-peer": "^9.0.0", + "simple-sha1": "^2.0.8", + "speedometer": "^1.0.0", + "stream-to-blob": "^1.0.0", + "stream-to-blob-url": "^2.1.0", + "stream-with-known-length-to-buffer": "^1.0.0", + "torrent-discovery": "^9.1.1", + "torrent-piece": "^2.0.0", + "uniq": "^1.0.1", + "unordered-array-remove": "^1.0.2", + "ut_metadata": "^3.3.0", + "ut_pex": "^1.1.1" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -1717,6 +2668,19 @@ "requires": { "mkdirp": "^0.5.1" } + }, + "ws": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.2.tgz", + "integrity": "sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw==", + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } } diff --git a/package.json b/package.json index c3c205a..4b50f15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "torrent-clean", - "version": "1.1.0", + "version": "1.2.0", "description": "Removes files that are not specified in selected torrent file", "author": "Nikolay Borzov ", "license": "MIT", @@ -20,9 +20,10 @@ "chalk": "^2.4.2", "delete-empty": "^2.0.0", "enquirer": "^2.3.0", + "memory-chunk-store": "^1.3.0", "minimist": "^1.2.0", - "parse-torrent": "^6.1.2", - "recursive-readdir": "^2.2.2" + "recursive-readdir": "^2.2.2", + "webtorrent": "^0.103.0" }, "devDependencies": { "babel-eslint": "^10.0.1",