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

@ctrl/shared-torrent

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ctrl/shared-torrent - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

85

index.d.ts
import { AgentOptions } from 'got';
export interface TorrentClient {
config: TorrentSettings;
getAllData(): Promise<AllClientData>;
getTorrent(id: string): Promise<NormalizedTorrent>;
pauseTorrent(id: string): Promise<any>;
resumeTorrent(id: string): Promise<any>;
removeTorrent(id: string, removeData?: boolean): Promise<any>;
queueUp(id: string): Promise<any>;
queueDown(id: string): Promise<any>;
}
export interface TorrentSettings {

@@ -24,1 +34,76 @@ /**

}
export declare enum TorrentState {
downloading = "downloading",
seeding = "seeding",
paused = "paused",
queued = "queued",
checking = "checking",
error = "error",
unknown = "unknown"
}
export interface Label {
id: string;
name: string;
count: number;
}
export interface NormalizedTorrent {
id: string;
/**
* torrent name
*/
name: string;
/**
* progress percent out of 100
*/
progress: number;
isCompleted: boolean;
/**
* 1:1 is 1, half seeded is 0.5
*/
ratio: number;
/**
* date as iso string
*/
dateAdded: string;
/**
* date completd as iso string;
*/
dateCompleted?: string;
savePath: string;
label?: string;
state: TorrentState;
stateMessage: string;
/**
* bytes per second
*/
uploadSpeed: number;
/**
* bytes per second
*/
downloadSpeed: number;
/**
* seconds until finish
*/
eta: number;
queuePosition: number;
connectedSeeds: number;
connectedPeers: number;
totalSeeds: number;
totalPeers: number;
/**
* size of files to download in bytes
*/
totalSelected: number;
/**
* total upload in bytes
*/
totalUploaded: number;
/**
* total download in bytes
*/
totalDownloaded: number;
}
export interface AllClientData {
labels: Label[];
torrents: NormalizedTorrent[];
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TorrentState;
(function (TorrentState) {
TorrentState["downloading"] = "downloading";
TorrentState["seeding"] = "seeding";
TorrentState["paused"] = "paused";
TorrentState["queued"] = "queued";
TorrentState["checking"] = "checking";
TorrentState["error"] = "error";
TorrentState["unknown"] = "unknown";
})(TorrentState = exports.TorrentState || (exports.TorrentState = {}));
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "@ctrl/shared-torrent",
"version": "1.0.3",
"version": "1.1.0",
"description": "shared types and interfaces between torrent clients",

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

"@typescript-eslint/parser": "1.4.2",
"eslint": "5.15.0",
"eslint": "5.15.1",
"eslint-config-prettier": "4.1.0",

@@ -36,0 +36,0 @@ "eslint-config-xo-space": "0.21.0",

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