Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ctrl/deluge

Package Overview
Dependencies
Maintainers
0
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ctrl/deluge - npm Package Compare versions

Comparing version 6.1.0 to 7.0.0

2

dist/src/deluge.d.ts

@@ -72,3 +72,3 @@ import { ofetch } from 'ofetch';

* @param torrentId torrent id from list torrents
* @param removeData true will delete all data from disk
* @param removeData (default: false) If true, remove the data from disk
*/

@@ -75,0 +75,0 @@ removeTorrent(torrentId: string, removeData?: boolean): Promise<BooleanStatus>;

@@ -170,4 +170,3 @@ import { FormData } from 'node-fetch-native';

parseResponse: JSON.parse,
// @ts-expect-error for some reason agent is not in the type
agent: this.config.agent,
dispatcher: this.config.dispatcher,
});

@@ -192,3 +191,4 @@ return res;

let path;
if (isUint8Array(torrent) || !torrent.startsWith('/tmp/')) {
const isUploaded = typeof torrent === 'string' && torrent.includes('delugeweb-');
if (isUint8Array(torrent) || !isUploaded) {
const upload = await this.upload(torrent);

@@ -201,3 +201,6 @@ if (!upload.success || !upload.files.length) {

else {
/** Assume paths starting with /tmp/ are from {@link Deluge.addTorrent} */
/**
* Assume paths starting with /tmp/ are from {@link Deluge.upload}
* Example temp path: /run/deluged-temp/delugeweb-s0jy917j/ubuntu-20.10-desktop-amd64.iso.torrent
*/
path = torrent;

@@ -284,5 +287,5 @@ }

* @param torrentId torrent id from list torrents
* @param removeData true will delete all data from disk
* @param removeData (default: false) If true, remove the data from disk
*/
async removeTorrent(torrentId, removeData = true) {
async removeTorrent(torrentId, removeData = false) {
const req = await this.request('core.remove_torrent', [torrentId, removeData]);

@@ -515,3 +518,2 @@ return req._data;

}
// eslint-disable-next-line @typescript-eslint/ban-types
async request(method, params = [], needsAuth = true, autoConnect = true) {

@@ -546,4 +548,3 @@ if (this._msgId === 4096) {

parseResponse: JSON.parse,
// @ts-expect-error for some reason agent is not in the type
agent: this.config.agent,
dispatcher: this.config.dispatcher,
});

@@ -550,0 +551,0 @@ const err = res.body?.error ?? (typeof res.body === 'string' && res.body);

@@ -1,3 +0,3 @@

import { NormalizedTorrent } from '@ctrl/shared-torrent';
import { Torrent } from './types.js';
import { type NormalizedTorrent } from '@ctrl/shared-torrent';
import type { Torrent } from './types.js';
export declare function normalizeTorrentData(id: string, torrent: Torrent): NormalizedTorrent;
{
"name": "@ctrl/deluge",
"version": "6.1.0",
"version": "7.0.0",
"description": "TypeScript api wrapper for deluge using got",

@@ -26,3 +26,3 @@ "author": "Scott Cooper <scttcper@gmail.com>",

"lint:eslint:fix": "eslint . --fix",
"lint:biome:fix": "biome check . --apply",
"lint:biome:fix": "biome check . --write",
"prepare": "npm run build",

@@ -37,20 +37,19 @@ "build": "tsc",

"@ctrl/magnet-link": "^4.0.2",
"@ctrl/shared-torrent": "^6.0.0",
"@ctrl/shared-torrent": "^6.1.0",
"node-fetch-native": "^1.6.4",
"ofetch": "^1.3.4",
"tough-cookie": "^4.1.4",
"ufo": "^1.5.3",
"uint8array-extras": "^1.2.0"
"ofetch": "^1.4.1",
"tough-cookie": "^5.0.0",
"ufo": "^1.5.4",
"uint8array-extras": "^1.4.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@ctrl/eslint-config-biome": "3.1.3",
"@biomejs/biome": "1.9.4",
"@ctrl/eslint-config-biome": "4.2.11",
"@sindresorhus/tsconfig": "6.0.0",
"@types/node": "20.14.9",
"@types/tough-cookie": "4.0.5",
"@vitest/coverage-v8": "1.6.0",
"@types/node": "22.9.0",
"@vitest/coverage-v8": "2.1.4",
"p-wait-for": "5.0.2",
"typedoc": "0.26.3",
"typescript": "5.5.3",
"vitest": "1.6.0"
"typedoc": "0.26.11",
"typescript": "5.6.3",
"vitest": "2.1.4"
},

@@ -57,0 +56,0 @@ "publishConfig": {

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