Socket
Socket
Sign inDemoInstall

webtorrent-fixtures

Package Overview
Dependencies
Maintainers
8
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webtorrent-fixtures - npm Package Compare versions

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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc