Socket
Socket
Sign inDemoInstall

list-fetch

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

list-fetch - npm Package Compare versions

Comparing version 23.0.7 to 23.0.8

10

index.js

@@ -347,6 +347,6 @@ const makeFetch = require('make-fetch')

const torrentData = await app.publishTorrent({address: null, secret: null}, mid.mainPath, reqHeaders['content-type'] && reqHeaders['content-type'].includes('multipart/form-data') ? reqHeaders : null, body, useOpts)
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Title': torrentData.title, 'X-Secret': torrentData.secret, 'X-Address': torrentData.address, 'X-Infohash': torrentData.infohash}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>name: ${torrentData.name}</p><p>address: ${torrentData.address}</p><p>title: ${torrentData.title}</p><p>infohash: ${torrentData.infohash}</p><p>sequence: ${torrentData.sequence}</p><p>secret: ${torrentData.secret}</p>${handleFile(torrentData.address, torrentData.saved, mid.mainPath)}</div></body></html>`] : [JSON.stringify(torrentData.saved.map((data) => {return {file: data, link: `bt://${torrentData.address}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}}))]})
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Title': torrentData.title, 'X-Secret': torrentData.secret, 'X-Address': torrentData.address, 'X-Infohash': torrentData.infohash}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>tid: ${torrentData.id}</p><p>name: ${torrentData.name}</p><p>address: ${torrentData.address}</p><p>title: ${torrentData.title}</p><p>infohash: ${torrentData.infohash}</p><p>sequence: ${torrentData.sequence}</p><p>secret: ${torrentData.secret}</p>${handleFile(torrentData.address, torrentData.saved, mid.mainPath)}</div></body></html>`] : [JSON.stringify({tid: torrentData.id, address: torrentData.address, secret: torrentData.secret, title: torrentData.title, files: torrentData.saved.map((data) => {return {file: data, link: `bt://${torrentData.address}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}})})]})
} else {
const torrentData = await app.publishTorrent({infohash: null}, mid.mainPath, reqHeaders['content-type'] && reqHeaders['content-type'].includes('multipart/form-data') ? reqHeaders : null, body, useOpts)
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Infohash': torrentData.infohash}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>name: ${torrentData.name}</p><p>infohash: ${torrentData.infohash}</p></div>${handleFile(torrentData.infohash, torrentData.saved, mid.mainPath)}</body></html>`] : [JSON.stringify(torrentData.saved.map(data => {return {file: data, link: `bt://${torrentData.infohash}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}}))]})
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Infohash': torrentData.infohash}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>tid: ${torrentData.id}</p><p>name: ${torrentData.name}</p><p>infohash: ${torrentData.infohash}</p></div>${handleFile(torrentData.infohash, torrentData.saved, mid.mainPath)}</body></html>`] : [JSON.stringify({tid: torrentData.id, infohash: torrentData.infohash, files: torrentData.saved.map(data => {return {file: data, link: `bt://${torrentData.infohash}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}})})]})
}

@@ -356,6 +356,6 @@ } else {

const torrentData = await app.publishTorrent(mid.mainId, mid.mainPath, reqHeaders['content-type'] && reqHeaders['content-type'].includes('multipart/form-data') ? reqHeaders : null, body, useOpts)
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Authentication': torrentData.secret, 'X-Address': torrentData.address, 'X-Infohash': torrentData.infohash}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>name: ${torrentData.name}</p><p>address: ${torrentData.address}</p><p>infohash: ${torrentData.infohash}</p><p>sequence: ${torrentData.sequence}</p><p>secret: ${torrentData.secret}</p></div><div>${torrentData.files.map(file => { return `<p><a href='${file.urlPath}'>${file.name}</a></p>` })}</div></body></html>`] : [JSON.stringify(torrentData.saved.map(data => {return {file: data, link: `bt://${torrentData.address}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}}))]})
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Authentication': torrentData.secret, 'X-Address': torrentData.address, 'X-Title': torrentData.title, 'X-Infohash': torrentData.infohash}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>tid: ${torrentData.id}</p><p>name: ${torrentData.name}</p><p>address: ${torrentData.address}</p><p>title: ${torrentData.title}</p><p>infohash: ${torrentData.infohash}</p><p>sequence: ${torrentData.sequence}</p><p>secret: ${torrentData.secret}</p></div><div>${torrentData.files.map(file => { return `<p><a href='${file.urlPath}'>${file.name}</a></p>` })}</div></body></html>`] : [JSON.stringify({tid: torrentData.id, address: torrentData.address, secret: torrentData.secret, title: torrentData.title, files: torrentData.saved.map(data => {return {file: data, link: `bt://${torrentData.address}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}})})]})
} else {
const torrentData = await app.publishTorrent(mid.mainId, mid.mainPath, reqHeaders['content-type'] && reqHeaders['content-type'].includes('multipart/form-data') ? reqHeaders : null, body, useOpts)
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Infohash': torrentData.infohash, 'X-Title': torrentData.title}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>name: ${torrentData.name}</p><p>infohash: ${torrentData.infohash}</p><p>title: ${torrentData.title}</p></div><div>${torrentData.files.map(file => { return `<p><a href='${file.urlPath}'>${file.name}</a></p>` })}</div></body></html>`] : [JSON.stringify(torrentData.saved.map(data => {return {file: data, link: `bt://${torrentData.infohash}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}}))]})
return sendTheData(signal, {statusCode: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, 'X-Infohash': torrentData.infohash, 'X-Title': torrentData.title}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>tid: ${torrentData.id}</p><p>name: ${torrentData.name}</p><p>infohash: ${torrentData.infohash}</p><p>title: ${torrentData.title}</p></div><div>${torrentData.files.map(file => { return `<p><a href='${file.urlPath}'>${file.name}</a></p>` })}</div></body></html>`] : [JSON.stringify({tid: torrentData.id, infohash: torrentData.infohash, files: torrentData.saved.map(data => {return {file: data, link: `bt://${torrentData.infohash}${path.join(mid.mainPath, data).replace(/\\/g, "/")}`}})})]})
}

@@ -369,3 +369,3 @@ }

const torrentData = await app.shredTorrent(mid.mainId, mid.mainPath, {timeout: (reqHeaders['x-timer'] && reqHeaders['x-timer'] !== '0') || (searchParams.has('x-timer') && searchParams.get('x-timer') !== '0') ? Number(reqHeaders['x-timer'] || Number(searchParams.get('x-timer'))) : 0})
return sendTheData(signal, {statusCode: 200, headers: {'Content-Type': mainRes}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>${torrentData.type}: ${torrentData.id}</p><p>path: ${torrentData.path}</p><p>link: bt://${torrentData.id}/</p></div>${handleTorrent(torrentData.torrent)}</body></html>`] : [JSON.stringify({id: torrentData.id, torrent: torrentData.torrent, tid: torrentData.id, type: torrentData.type, path: torrentData.path, link: `bt://${torrentData.id}/`})]})
return sendTheData(signal, {statusCode: 200, headers: {'Content-Type': mainRes}, data: mainReq ? [`<html><head><title>${mid.mainLink}</title></head><body><div><p>tid: ${torrentData.id}</p><p>${torrentData.type}: ${torrentData.id}</p><p>path: ${torrentData.path}</p><p>link: bt://${torrentData.id}/</p></div>${handleTorrent(torrentData.torrent)}</body></html>`] : [JSON.stringify({tid: torrentData.id, torrent: torrentData.torrent, type: torrentData.type, path: torrentData.path, link: `bt://${torrentData.id}/`})]})
}

@@ -372,0 +372,0 @@ } else {

{
"name": "list-fetch",
"version": "23.0.7",
"version": "23.0.8",
"description": "coming soon",

@@ -25,3 +25,3 @@ "main": "index.js",

"stream-async-iterator": "^2.0.0",
"torrentz": "^7.0.3"
"torrentz": "^7.0.4"
},

@@ -28,0 +28,0 @@ "devDependencies": {

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