@ctrl/deluge 6.0.0 → 6.1.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.
@@ -1,4 +1,4 @@
1
- import { FetchResponse } from 'ofetch';
1
+ import { ofetch } from 'ofetch';
2
2
  import type { AddTorrentOptions as NormalizedAddTorrentOptions, AllClientData, NormalizedTorrent, TorrentClient, TorrentSettings } from '@ctrl/shared-torrent';
3
3
  import type { AddTorrentOptions, AddTorrentResponse, BooleanStatus, ConfigResponse, DefaultResponse, DelugeSettings, GetHostsResponse, GetHostStatusResponse, ListMethods, PluginInfo, PluginsListResponse, StringStatus, TorrentFiles, TorrentInfo, TorrentListResponse, TorrentOptions, TorrentStatus, Tracker, UploadResponse } from './types.js';
4
4
  export declare class Deluge implements TorrentClient {
@@ -105,6 +105,6 @@ export declare class Deluge implements TorrentClient {
105
105
  getPluginInfo(plugins: string[]): Promise<PluginInfo>;
106
106
  enablePlugin(plugins: string[]): Promise<DefaultResponse>;
107
107
  disablePlugin(plugins: string[]): Promise<DefaultResponse>;
108
- request<T extends object>(method: string, params?: any[], needsAuth?: boolean, autoConnect?: boolean): Promise<FetchResponse<T>>;
108
+ request<T extends object>(method: string, params?: any[], needsAuth?: boolean, autoConnect?: boolean): Promise<ReturnType<typeof ofetch.raw<T>>>;
109
109
  private _validateAuth;
110
110
  }
@@ -16,7 +16,7 @@ export interface ListMethods extends DefaultResponse {
16
16
  result: string[];
17
17
  }
18
18
  export interface AddTorrentResponse extends DefaultResponse {
19
- result: Array<[boolean, string]>;
19
+ result: [boolean, string][];
20
20
  }
21
21
  /**
22
22
  * ex -
@@ -35,7 +35,7 @@ export interface GetHostsResponse extends DefaultResponse {
35
35
  * port - 58846
36
36
  * status - "Online"
37
37
  */
38
- result: Array<[string, string, number, string]>;
38
+ result: [string, string, number, string][];
39
39
  }
40
40
  export type HostStatus = 'Online' | 'Offline' | 'Connected';
41
41
  export interface GetHostStatusResponse extends DefaultResponse {
@@ -101,9 +101,9 @@ export interface TorrentList {
101
101
  * ['label', 'id']
102
102
  */
103
103
  export interface TorrentFilters {
104
- state: Array<[string, number]>;
105
- tracker_host: Array<[string, number]>;
106
- label?: Array<[string, number]>;
104
+ state: [string, number][];
105
+ tracker_host: [string, number][];
106
+ label?: [string, number][];
107
107
  }
108
108
  export interface Stats {
109
109
  upload_protocol_rate: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl/deluge",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "TypeScript api wrapper for deluge using got",
5
5
  "author": "Scott Cooper <scttcper@gmail.com>",
6
6
  "license": "MIT",
@@ -20,9 +20,9 @@
20
20
  "scripts": {
21
21
  "lint": "pnpm run '/^(lint:biome|lint:eslint)$/'",
22
22
  "lint:biome": "biome check .",
23
- "lint:eslint": "eslint --ext .ts,.tsx .",
23
+ "lint:eslint": "eslint .",
24
24
  "lint:fix": "pnpm run '/^(lint:biome|lint:eslint):fix$/'",
25
- "lint:eslint:fix": "eslint --ext .ts,.tsx . --fix",
25
+ "lint:eslint:fix": "eslint . --fix",
26
26
  "lint:biome:fix": "biome check . --apply",
27
27
  "prepare": "npm run build",
28
28
  "build": "tsc",
@@ -32,25 +32,25 @@
32
32
  "test:ci": "vitest run --coverage --reporter=default --reporter=junit --outputFile=./junit.xml"
33
33
  },
34
34
  "dependencies": {
35
- "@ctrl/magnet-link": "^4.0.1",
35
+ "@ctrl/magnet-link": "^4.0.2",
36
36
  "@ctrl/shared-torrent": "^6.0.0",
37
- "node-fetch-native": "^1.6.2",
38
- "ofetch": "^1.3.3",
39
- "tough-cookie": "^4.1.3",
40
- "ufo": "^1.4.0",
41
- "uint8array-extras": "^1.1.0"
37
+ "node-fetch-native": "^1.6.4",
38
+ "ofetch": "^1.3.4",
39
+ "tough-cookie": "^4.1.4",
40
+ "ufo": "^1.5.3",
41
+ "uint8array-extras": "^1.2.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@biomejs/biome": "1.5.3",
45
- "@ctrl/eslint-config-biome": "2.0.9",
46
- "@sindresorhus/tsconfig": "5.0.0",
47
- "@types/node": "20.11.24",
44
+ "@biomejs/biome": "1.8.3",
45
+ "@ctrl/eslint-config-biome": "3.1.3",
46
+ "@sindresorhus/tsconfig": "6.0.0",
47
+ "@types/node": "20.14.9",
48
48
  "@types/tough-cookie": "4.0.5",
49
- "@vitest/coverage-v8": "1.3.1",
49
+ "@vitest/coverage-v8": "1.6.0",
50
50
  "p-wait-for": "5.0.2",
51
- "typedoc": "0.25.10",
52
- "typescript": "5.3.3",
53
- "vitest": "1.3.1"
51
+ "typedoc": "0.26.3",
52
+ "typescript": "5.5.3",
53
+ "vitest": "1.6.0"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public",