create-torrent
Advanced tools
Comparing version 3.8.0 to 3.9.0
10
index.js
@@ -0,1 +1,3 @@ | ||
/*global FileList */ | ||
module.exports = createTorrent | ||
@@ -236,2 +238,9 @@ | ||
// "ssl-cert" key is for SSL torrents, see: | ||
// - http://blog.libtorrent.org/2012/01/bittorrent-over-ssl/ | ||
// - http://www.libtorrent.org/manual-ref.html#ssl-torrents | ||
// - http://www.libtorrent.org/reference-Create_Torrents.html | ||
if (opts.sslCert !== undefined) | ||
torrent.info['ssl-cert'] = opts.sslCert | ||
if (opts.urlList !== undefined) | ||
@@ -291,3 +300,2 @@ torrent['url-list'] = opts.urlList | ||
/** | ||
@@ -294,0 +302,0 @@ * Check if `obj` is a node Readable stream |
{ | ||
"name": "create-torrent", | ||
"description": "Create .torrent files", | ||
"version": "3.8.0", | ||
"version": "3.9.0", | ||
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)", | ||
@@ -9,5 +9,2 @@ "bin": { | ||
}, | ||
"browser": { | ||
"minimist": false | ||
}, | ||
"bugs": { | ||
@@ -31,2 +28,3 @@ "url": "https://github.com/feross/create-torrent/issues" | ||
"parse-torrent": "^3.0.0", | ||
"standard": "^2.6.5", | ||
"tape": "^3.0.3", | ||
@@ -56,3 +54,3 @@ "zuul": "^1.11.2" | ||
"scripts": { | ||
"test": "npm run test-node && npm run test-browser", | ||
"test": "standard && npm run test-node && npm run test-browser", | ||
"test-browser": "zuul -- test/browser/*.js", | ||
@@ -59,0 +57,0 @@ "test-browser-local": "zuul --local -- test/browser/*.js", |
@@ -78,3 +78,5 @@ # create-torrent [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] | ||
- udp://tracker.openbittorrent.com:80 | ||
- udp://open.demonii.com:1337 | ||
- udp://tracker.webtorrent.io:80 | ||
- wss://tracker.webtorrent.io (For WebRTC peers, see: [WebTorrent](http://webtorrent.io)) | ||
@@ -81,0 +83,0 @@ `callback` is called with an error and a Buffer of the torrent data. It is up to you to |
@@ -190,3 +190,2 @@ var path = require('path') | ||
t.equal(parsedTorrent.length, 12) | ||
@@ -481,3 +480,2 @@ t.equal(parsedTorrent.pieceLength, 32768) | ||
var parsedTorrent = parseTorrent(torrent) | ||
console.log(parsedTorrent) | ||
@@ -516,1 +514,16 @@ t.equals(parsedTorrent.name, 'multi') | ||
}) | ||
test('create ssl cert torrent', function (t) { | ||
t.plan(2) | ||
var sslCert = new Buffer('content cert X.509') | ||
createTorrent(new Buffer('abc'), { | ||
name: 'abc.txt', | ||
sslCert: sslCert | ||
}, function (err, torrent) { | ||
t.error(err) | ||
var parsedTorrent = parseTorrent(torrent) | ||
t.deepEqual(parsedTorrent.info['ssl-cert'], sslCert) | ||
}) | ||
}) |
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
439984
853
99
5