webtorrent-fixtures
Advanced tools
Comparing version 1.6.0 to 1.7.0
96
index.js
// Torrent and content test files. Content is Public Domain or Creative Commons. | ||
var fs = require('fs') | ||
var path = require('path') | ||
var parseTorrent = require('parse-torrent') | ||
const { readFileSync } = require('fs') | ||
const { join } = require('path') | ||
const parseTorrent = require('parse-torrent') | ||
@@ -10,8 +10,8 @@ module.exports = { | ||
leaves: { | ||
contentPath: path.join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub'), | ||
torrentPath: path.join(__dirname, 'fixtures', 'leaves.torrent'), | ||
content: fs.readFileSync(path.join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub')), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'leaves.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'leaves.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'leaves.torrent')))) | ||
contentPath: join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub'), | ||
torrentPath: join(__dirname, 'fixtures', 'leaves.torrent'), | ||
content: readFileSync(join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub')), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'leaves.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'leaves.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'leaves.torrent')))) | ||
}, | ||
@@ -21,8 +21,8 @@ | ||
alice: { | ||
contentPath: path.join(__dirname, 'fixtures', 'alice.txt'), | ||
torrentPath: path.join(__dirname, 'fixtures', 'alice.torrent'), | ||
content: fs.readFileSync(path.join(__dirname, 'fixtures', 'alice.txt')), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'alice.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'alice.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'alice.torrent')))) | ||
contentPath: join(__dirname, 'fixtures', 'alice.txt'), | ||
torrentPath: join(__dirname, 'fixtures', 'alice.torrent'), | ||
content: readFileSync(join(__dirname, 'fixtures', 'alice.txt')), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'alice.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'alice.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'alice.torrent')))) | ||
}, | ||
@@ -32,7 +32,7 @@ | ||
folder: { | ||
contentPath: path.join(__dirname, 'fixtures', 'folder'), | ||
torrentPath: path.join(__dirname, 'fixtures', 'folder.torrent'), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'folder.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'folder.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'folder.torrent')))) | ||
contentPath: join(__dirname, 'fixtures', 'folder'), | ||
torrentPath: join(__dirname, 'fixtures', 'folder.torrent'), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'folder.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'folder.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'folder.torrent')))) | ||
}, | ||
@@ -42,7 +42,7 @@ | ||
numbers: { | ||
contentPath: path.join(__dirname, 'fixtures', 'numbers'), | ||
torrentPath: path.join(__dirname, 'fixtures', 'numbers.torrent'), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'numbers.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'numbers.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'numbers.torrent')))) | ||
contentPath: join(__dirname, 'fixtures', 'numbers'), | ||
torrentPath: join(__dirname, 'fixtures', 'numbers.torrent'), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'numbers.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'numbers.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'numbers.torrent')))) | ||
}, | ||
@@ -52,7 +52,7 @@ | ||
lotsOfNumbers: { | ||
contentPath: path.join(__dirname, 'fixtures', 'lots-of-numbers'), | ||
torrentPath: path.join(__dirname, 'fixtures', 'lots-of-numbers.torrent'), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'lots-of-numbers.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'lots-of-numbers.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'lots-of-numbers.torrent')))) | ||
contentPath: join(__dirname, 'fixtures', 'lots-of-numbers'), | ||
torrentPath: join(__dirname, 'fixtures', 'lots-of-numbers.torrent'), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'lots-of-numbers.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'lots-of-numbers.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'lots-of-numbers.torrent')))) | ||
}, | ||
@@ -62,6 +62,6 @@ | ||
bunny: { | ||
torrentPath: path.join(__dirname, 'fixtures', 'bunny.torrent'), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'bunny.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'bunny.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'bunny.torrent')))) | ||
torrentPath: join(__dirname, 'fixtures', 'bunny.torrent'), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'bunny.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'bunny.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'bunny.torrent')))) | ||
}, | ||
@@ -71,6 +71,6 @@ | ||
sintel: { | ||
torrentPath: path.join(__dirname, 'fixtures', 'sintel.torrent'), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'sintel.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'sintel.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'sintel.torrent')))) | ||
torrentPath: join(__dirname, 'fixtures', 'sintel.torrent'), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'sintel.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'sintel.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'sintel.torrent')))) | ||
}, | ||
@@ -80,8 +80,8 @@ | ||
leavesMetadata: { | ||
contentPath: path.join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub'), | ||
torrentPath: path.join(__dirname, 'fixtures', 'leaves-metadata.torrent'), | ||
content: fs.readFileSync(path.join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub')), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'leaves-metadata.torrent')), | ||
parsedTorrent: parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'leaves-metadata.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(fs.readFileSync(path.join(__dirname, 'fixtures', 'leaves-metadata.torrent')))) | ||
contentPath: join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub'), | ||
torrentPath: join(__dirname, 'fixtures', 'leaves-metadata.torrent'), | ||
content: readFileSync(join(__dirname, 'fixtures', 'Leaves of Grass by Walt Whitman.epub')), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'leaves-metadata.torrent')), | ||
parsedTorrent: parseTorrent(readFileSync(join(__dirname, 'fixtures', 'leaves-metadata.torrent'))), | ||
magnetURI: parseTorrent.toMagnetURI(parseTorrent(readFileSync(join(__dirname, 'fixtures', 'leaves-metadata.torrent')))) | ||
}, | ||
@@ -91,4 +91,4 @@ | ||
corrupt: { | ||
torrentPath: path.join(__dirname, 'fixtures', 'corrupt.torrent'), | ||
torrent: fs.readFileSync(path.join(__dirname, 'fixtures', 'corrupt.torrent')) | ||
torrentPath: join(__dirname, 'fixtures', 'corrupt.torrent'), | ||
torrent: readFileSync(join(__dirname, 'fixtures', 'corrupt.torrent')) | ||
}, | ||
@@ -98,5 +98,5 @@ | ||
blocklist: { | ||
path: path.join(__dirname, 'fixtures', 'blocklist.txt'), | ||
gzipPath: path.join(__dirname, 'fixtures', 'blocklist.txt.gz') | ||
path: join(__dirname, 'fixtures', 'blocklist.txt'), | ||
gzipPath: join(__dirname, 'fixtures', 'blocklist.txt.gz') | ||
} | ||
} |
{ | ||
"name": "webtorrent-fixtures", | ||
"description": "Sample torrent files for the WebTorrent test suite", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "WebTorrent, LLC", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
580355
27