@ctrl/deluge 4.0.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/deluge.d.ts +3 -3
- package/dist/src/deluge.js +2 -2
- package/dist/src/types.d.ts +2 -4
- package/package.json +16 -15
package/dist/src/deluge.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
2
|
-
import { Response } from 'got';
|
3
|
-
import { AddTorrentOptions as NormalizedAddTorrentOptions, AllClientData, NormalizedTorrent, TorrentClient, TorrentSettings } from '@ctrl/shared-torrent';
|
4
|
-
import { AddTorrentOptions, AddTorrentResponse, BooleanStatus, ConfigResponse, DefaultResponse, DelugeSettings, GetHostsResponse, GetHostStatusResponse, ListMethods, PluginInfo, PluginsListResponse, StringStatus, TorrentFiles, TorrentInfo, TorrentListResponse, TorrentOptions, TorrentStatus, Tracker, UploadResponse } from './types.js';
|
2
|
+
import type { Response } from 'got';
|
3
|
+
import type { AddTorrentOptions as NormalizedAddTorrentOptions, AllClientData, NormalizedTorrent, TorrentClient, TorrentSettings } from '@ctrl/shared-torrent';
|
4
|
+
import type { AddTorrentOptions, AddTorrentResponse, BooleanStatus, ConfigResponse, DefaultResponse, DelugeSettings, GetHostsResponse, GetHostStatusResponse, ListMethods, PluginInfo, PluginsListResponse, StringStatus, TorrentFiles, TorrentInfo, TorrentListResponse, TorrentOptions, TorrentStatus, Tracker, UploadResponse } from './types.js';
|
5
5
|
export declare class Deluge implements TorrentClient {
|
6
6
|
config: TorrentSettings;
|
7
7
|
private _msgId;
|
package/dist/src/deluge.js
CHANGED
@@ -4,7 +4,7 @@ import { fileFromPath } from 'formdata-node/file-from-path';
|
|
4
4
|
import got from 'got';
|
5
5
|
import { Cookie } from 'tough-cookie';
|
6
6
|
import { magnetDecode } from '@ctrl/magnet-link';
|
7
|
-
import { TorrentState
|
7
|
+
import { TorrentState } from '@ctrl/shared-torrent';
|
8
8
|
import { urlJoin } from '@ctrl/url-join';
|
9
9
|
const defaults = {
|
10
10
|
baseUrl: 'http://localhost:8112/',
|
@@ -572,7 +572,7 @@ export class Deluge {
|
|
572
572
|
state,
|
573
573
|
isCompleted,
|
574
574
|
stateMessage: torrent.state,
|
575
|
-
progress: torrent.progress,
|
575
|
+
progress: torrent.progress / 100,
|
576
576
|
ratio: torrent.ratio,
|
577
577
|
dateAdded,
|
578
578
|
dateCompleted: undefined,
|
package/dist/src/types.d.ts
CHANGED
@@ -32,7 +32,7 @@ export interface GetHostsResponse extends DefaultResponse {
|
|
32
32
|
/**
|
33
33
|
* host id - ddf084f5f3d7945597991008949ea7b51e6b3d93
|
34
34
|
* ip address - 127.0.0.1
|
35
|
-
*
|
35
|
+
* port - 58846
|
36
36
|
* status - "Online"
|
37
37
|
*/
|
38
38
|
result: Array<[string, string, number, string]>;
|
@@ -41,12 +41,10 @@ export declare type HostStatus = 'Online' | 'Offline' | 'Connected';
|
|
41
41
|
export interface GetHostStatusResponse extends DefaultResponse {
|
42
42
|
/**
|
43
43
|
* host id - ddf084f5f3d7945597991008949ea7b51e6b3d93
|
44
|
-
* ip address - 127.0.0.1
|
45
|
-
* not sure? - 58846
|
46
44
|
* status - "Online"
|
47
45
|
* version - "1.3.15"
|
48
46
|
*/
|
49
|
-
result: [string,
|
47
|
+
result: [string, HostStatus, string];
|
50
48
|
}
|
51
49
|
export interface TorrentContentFile {
|
52
50
|
download: boolean;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ctrl/deluge",
|
3
|
-
"version": "4.0
|
3
|
+
"version": "4.2.0",
|
4
4
|
"description": "TypeScript api wrapper for deluge using got",
|
5
5
|
"author": "Scott Cooper <scttcper@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -25,26 +25,27 @@
|
|
25
25
|
"build:docs": "typedoc",
|
26
26
|
"test": "vitest run",
|
27
27
|
"test:watch": "vitest",
|
28
|
-
"test:ci": "vitest run --coverage"
|
28
|
+
"test:ci": "vitest run --coverage --reporter=default --reporter=junit --outputFile=./junit.xml"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@ctrl/magnet-link": "^3.1.
|
32
|
-
"@ctrl/shared-torrent": "^4.
|
33
|
-
"@ctrl/url-join": "^2.0.
|
34
|
-
"formdata-node": "^
|
35
|
-
"got": "^12.1
|
36
|
-
"tough-cookie": "^4.
|
31
|
+
"@ctrl/magnet-link": "^3.1.1",
|
32
|
+
"@ctrl/shared-torrent": "^4.2.0",
|
33
|
+
"@ctrl/url-join": "^2.0.2",
|
34
|
+
"formdata-node": "^5.0.0",
|
35
|
+
"got": "^12.3.1",
|
36
|
+
"tough-cookie": "^4.1.2"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@ctrl/eslint-config": "3.4.
|
39
|
+
"@ctrl/eslint-config": "3.4.10",
|
40
40
|
"@sindresorhus/tsconfig": "3.0.1",
|
41
|
-
"@types/node": "
|
41
|
+
"@types/node": "18.7.14",
|
42
42
|
"@types/tough-cookie": "4.0.2",
|
43
|
-
"c8": "
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
43
|
+
"@vitest/coverage-c8": "0.22.1",
|
44
|
+
"c8": "7.12.0",
|
45
|
+
"p-wait-for": "5.0.0",
|
46
|
+
"typedoc": "0.23.12",
|
47
|
+
"typescript": "4.8.2",
|
48
|
+
"vitest": "0.22.1"
|
48
49
|
},
|
49
50
|
"publishConfig": {
|
50
51
|
"access": "public"
|