New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ctrl/deluge

Package Overview
Dependencies
Maintainers
1
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 3.0.2 to 3.1.0

4

dist/index.d.ts
/// <reference types="node" />
import { Response } from 'got';
import { AddTorrentOptions as NormalizedAddTorrentOptions, AllClientData, NormalizedTorrent, TorrentClient, TorrentSettings } from '@ctrl/shared-torrent';
import { AddTorrentOptions, BooleanStatus, ConfigResponse, DefaultResponse, DelugeSettings, GetHostsResponse, GetHostStatusResponse, ListMethods, PluginInfo, PluginsListResponse, StringStatus, TorrentFiles, TorrentInfo, TorrentListResponse, TorrentOptions, TorrentStatus, Tracker, UploadResponse } from './types';
import { AddTorrentOptions, BooleanStatus, ConfigResponse, DefaultResponse, DelugeSettings, GetHostsResponse, GetHostStatusResponse, ListMethods, PluginInfo, PluginsListResponse, StringStatus, TorrentFiles, TorrentInfo, TorrentListResponse, TorrentOptions, TorrentStatus, Tracker, UploadResponse, AddTorrentResponse } from './types';
export declare class Deluge implements TorrentClient {

@@ -60,3 +60,3 @@ config: TorrentSettings;

upload(torrent: string | Buffer): Promise<UploadResponse>;
addTorrent(torrent: string | Buffer, config?: Partial<AddTorrentOptions>): Promise<BooleanStatus>;
addTorrent(torrent: string | Buffer, config?: Partial<AddTorrentOptions>): Promise<AddTorrentResponse>;
normalizedAddTorrent(torrent: string | Buffer, options?: Partial<NormalizedAddTorrentOptions>): Promise<NormalizedTorrent>;

@@ -63,0 +63,0 @@ addTorrentMagnet(magnet: string, config?: Partial<AddTorrentOptions>): Promise<BooleanStatus>;

@@ -7,7 +7,7 @@ "use strict";

exports.Deluge = void 0;
const fs_1 = require("fs");
const form_data_1 = __importDefault(require("form-data"));
const fs_1 = __importDefault(require("fs"));
const got_1 = __importDefault(require("got"));
const tough_cookie_1 = require("tough-cookie");
const url_join_1 = __importDefault(require("url-join"));
const url_join_1 = require("@ctrl/url-join");
const shared_torrent_1 = require("@ctrl/shared-torrent");

@@ -158,4 +158,4 @@ const defaults = {

if (typeof torrent === 'string') {
if (fs_1.default.existsSync(torrent)) {
form.append('file', Buffer.from(fs_1.default.readFileSync(torrent)));
if (fs_1.existsSync(torrent)) {
form.append('file', Buffer.from(fs_1.readFileSync(torrent)));
}

@@ -169,3 +169,3 @@ else {

}
const url = url_join_1.default(this.config.baseUrl, '/upload');
const url = url_join_1.urlJoin(this.config.baseUrl, '/upload');
const res = await got_1.default.post(url, {

@@ -497,3 +497,3 @@ headers: form.getHeaders(),

};
const url = url_join_1.default(this.config.baseUrl, this.config.path);
const url = url_join_1.urlJoin(this.config.baseUrl, this.config.path);
return got_1.default.post(url, {

@@ -500,0 +500,0 @@ json: {

@@ -18,2 +18,5 @@ export interface DefaultResponse {

}
export interface AddTorrentResponse extends DefaultResponse {
result: Array<[boolean, string]>;
}
/**

@@ -20,0 +23,0 @@ * ex -

{
"name": "@ctrl/deluge",
"version": "3.0.2",
"version": "3.1.0",
"description": "TypeScript api wrapper for deluge using got",

@@ -30,24 +30,31 @@ "author": "Scott Cooper <scttcper@gmail.com>",

"dependencies": {
"@ctrl/shared-torrent": "^3.0.1",
"@ctrl/shared-torrent": "^3.0.3",
"@ctrl/url-join": "^1.0.2",
"form-data": "^3.0.0",
"got": "^11.5.0",
"tough-cookie": "^4.0.0",
"url-join": "^4.0.1"
"got": "^11.6.1",
"tough-cookie": "^4.0.0"
},
"devDependencies": {
"@ctrl/eslint-config": "1.0.3",
"@jest/globals": "26.1.0",
"@types/node": "14.0.22",
"@babel/plugin-transform-modules-commonjs": "7.10.4",
"@babel/preset-typescript": "7.10.4",
"@ctrl/eslint-config": "1.1.1",
"@jest/globals": "26.4.2",
"@types/node": "14.6.4",
"@types/tough-cookie": "4.0.0",
"@types/url-join": "4.0.0",
"jest": "26.1.0",
"jest": "26.4.2",
"p-wait-for": "3.1.0",
"ts-jest": "26.1.1",
"typedoc": "0.17.8",
"typescript": "3.9.6"
"typedoc": "0.19.1",
"typescript": "4.0.2"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node"
},
"babel": {
"presets": [
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-transform-modules-commonjs"
]
},
"publishConfig": {

@@ -54,0 +61,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

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