Comparing version 0.0.8 to 0.0.9-beta.0
@@ -1,3 +0,22 @@ | ||
import { Conn, Socket, OpenOptions } from 'maria2'; | ||
import { PartialDeep } from 'type-fest'; | ||
import { Conn, Socket } from 'maria2'; | ||
import { Aria2Options } from '@naria2/options'; | ||
export * from '@naria2/options'; | ||
interface ClientOptions { | ||
secret?: string; | ||
/** | ||
* Timeout for each request (ms). | ||
* @default 5000 | ||
* @public | ||
*/ | ||
timeout?: number; | ||
/** | ||
* Timeout for waiting socket (ms). | ||
* @default 5000 | ||
* @public | ||
*/ | ||
openTimeout?: number; | ||
} | ||
declare class Aria2Client { | ||
@@ -9,6 +28,11 @@ private _conn; | ||
close(): Promise<void>; | ||
download(): Promise<void>; | ||
downloadMagnet(magnet: string, options?: PartialDeep<Aria2Options>): Promise<void>; | ||
downloadTorrent(torrent: string, options?: PartialDeep<Aria2Options>): Promise<void>; | ||
downloadUri(uris: string | string[], options?: PartialDeep<Aria2Options>): Promise<void>; | ||
} | ||
declare function createClient(_socket: Socket | Promise<Socket>, options?: OpenOptions): Promise<Aria2Client>; | ||
declare function createClient(_socket: Socket | Promise<Socket>, options?: ClientOptions): Promise<Aria2Client>; | ||
export { Aria2Client, createClient }; | ||
declare class Torrent { | ||
} | ||
export { Aria2Client, Torrent, createClient }; |
{ | ||
"name": "naria2", | ||
"version": "0.0.8", | ||
"version": "0.0.9-beta.0", | ||
"description": "High-level and Convenient BitTorrent Client based on aria2 JSON-RPC", | ||
@@ -31,2 +31,7 @@ "keywords": [ | ||
}, | ||
"./options": { | ||
"default": "./dist/options.mjs", | ||
"import": "./dist/options.mjs", | ||
"types": "./dist/options.d.ts" | ||
}, | ||
"./transport": { | ||
@@ -53,3 +58,5 @@ "default": "./dist/transport.mjs", | ||
"dependencies": { | ||
"maria2": "^0.3.0-beta.20" | ||
"maria2": "^0.3.0-beta.20", | ||
"type-fest": "^3.13.0", | ||
"@naria2/options": "0.0.9-beta.0" | ||
}, | ||
@@ -60,6 +67,6 @@ "devDependencies": { | ||
"ws": "^8.13.0", | ||
"@naria2/node": "0.0.8" | ||
"@naria2/node": "0.0.9-beta.0" | ||
}, | ||
"peerDependencies": { | ||
"@naria2/node": "0.0.8" | ||
"@naria2/node": "0.0.9-beta.0" | ||
}, | ||
@@ -66,0 +73,0 @@ "peerDependenciesMeta": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8914
12
130
4
+ Added@naria2/options@0.0.9-beta.0
+ Addedtype-fest@^3.13.0
+ Added@naria2/node@0.0.9-beta.0(transitive)
+ Added@naria2/options@0.0.9-beta.0(transitive)
+ Addedtype-fest@3.13.1(transitive)
- Removed@naria2/node@0.0.8(transitive)