@ctrl/transmission 7.2.0 → 7.3.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/README.md CHANGED
@@ -26,13 +26,15 @@ async function main() {
26
26
 
27
27
  ### Api
28
28
 
29
- Docs: https://transmission.vercel.app
30
- API Docs: https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt
29
+ Docs: https://transmission.vercel.app
30
+ API Docs: https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt
31
31
 
32
32
  ### Normalized API
33
+
33
34
  These functions have been normalized between torrent clients. Can easily support multiple torrent clients. See below for alternative supported torrent clients
34
35
 
35
36
  ##### getAllData
37
+
36
38
  Returns all torrent data and an array of label objects. Data has been normalized and does not match the output of native `listTorrents()`.
37
39
 
38
40
  ```ts
@@ -41,6 +43,7 @@ console.log(data.torrents);
41
43
  ```
42
44
 
43
45
  ##### getTorrent
46
+
44
47
  Returns one torrent data
45
48
 
46
49
  ```ts
@@ -49,6 +52,7 @@ console.log(data);
49
52
  ```
50
53
 
51
54
  ##### pauseTorrent and resumeTorrent
55
+
52
56
  Pause or resume a torrent
53
57
 
54
58
  ```ts
@@ -59,6 +63,7 @@ console.log(resumed);
59
63
  ```
60
64
 
61
65
  ##### removeTorrent
66
+
62
67
  Remove a torrent. Does not remove data on disk by default.
63
68
 
64
69
  ```ts
@@ -76,16 +81,17 @@ console.log(res);
76
81
  If you're shutting down the server often (serverless?) you can export the state
77
82
 
78
83
  ```ts
79
- const state = client.exportState()
84
+ const state = client.exportState();
80
85
  const client = Transmission.createFromState(config, state);
81
86
  ```
82
87
 
83
88
  ### See Also
84
- All of the following npm modules provide the same normalized functions along with supporting the unique apis for each client.
89
+
90
+ All of the following npm modules provide the same normalized functions along with supporting the unique apis for each client.
85
91
 
86
92
  deluge - https://github.com/scttcper/deluge
87
93
  qbittorrent - https://github.com/scttcper/qbittorrent
88
- utorrent - https://github.com/scttcper/utorrent
94
+ utorrent - https://github.com/scttcper/utorrent
89
95
 
90
96
  ### Start a test docker container
91
97
 
@@ -56,8 +56,8 @@ export declare class Transmission implements TorrentClient {
56
56
  * Adding a torrent
57
57
  * @param torrent a stream of file content or contents of the file as base64 string
58
58
  */
59
- addTorrent(torrent: string | Uint8Array, options?: Partial<AddTorrentOptions>): Promise<AddTorrentResponse>;
60
- normalizedAddTorrent(torrent: string | Uint8Array, options?: Partial<NormalizedAddTorrentOptions>): Promise<NormalizedTorrent>;
59
+ addTorrent(torrent: string | Uint8Array<ArrayBuffer>, options?: Partial<AddTorrentOptions>): Promise<AddTorrentResponse>;
60
+ normalizedAddTorrent(torrent: string | Uint8Array<ArrayBuffer>, options?: Partial<NormalizedAddTorrentOptions>): Promise<NormalizedTorrent>;
61
61
  getTorrent(id: NormalizedTorrentIds): Promise<NormalizedTorrent>;
62
62
  getAllData(): Promise<AllClientData>;
63
63
  listTorrents(id?: NormalizedTorrentIds, additionalFields?: string[]): Promise<GetTorrentRepsonse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl/transmission",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "description": "TypeScript api wrapper for transmission using got",
5
5
  "author": "Scott Cooper <scttcper@gmail.com>",
6
6
  "license": "MIT",
@@ -17,12 +17,8 @@
17
17
  ],
18
18
  "sideEffects": false,
19
19
  "scripts": {
20
- "lint": "pnpm run '/^(lint:biome|lint:eslint)$/'",
21
- "lint:biome": "biome check .",
22
- "lint:eslint": "eslint .",
23
- "lint:fix": "pnpm run '/^(lint:biome|lint:eslint):fix$/'",
24
- "lint:eslint:fix": "eslint . --fix",
25
- "lint:biome:fix": "biome check . --write",
20
+ "lint": "oxlint . && prettier --check . --experimental-cli",
21
+ "lint:fix": "oxlint . --fix && prettier --write . --log-level=error --experimental-cli",
26
22
  "prepare": "npm run build",
27
23
  "build": "tsc",
28
24
  "build:docs": "typedoc",
@@ -32,24 +28,26 @@
32
28
  },
33
29
  "dependencies": {
34
30
  "@ctrl/magnet-link": "^4.0.2",
35
- "@ctrl/shared-torrent": "^6.2.1",
31
+ "@ctrl/shared-torrent": "^6.3.0",
36
32
  "ofetch": "^1.4.1",
37
- "type-fest": "^4.30.2",
38
- "ufo": "^1.5.4",
39
- "uint8array-extras": "^1.4.0"
33
+ "type-fest": "^4.41.0",
34
+ "ufo": "^1.6.1",
35
+ "uint8array-extras": "^1.5.0"
40
36
  },
41
37
  "devDependencies": {
42
- "@biomejs/biome": "1.9.4",
43
- "@ctrl/eslint-config-biome": "4.3.1",
44
- "@ctrl/magnet-link": "^4.0.2",
45
- "@ctrl/shared-torrent": "^6.2.1",
46
- "@sindresorhus/tsconfig": "7.0.0",
47
- "@types/node": "22.10.2",
48
- "@vitest/coverage-v8": "2.1.8",
38
+ "@ctrl/oxlint-config": "1.2.3",
39
+ "@ctrl/magnet-link": "4.0.2",
40
+ "@ctrl/shared-torrent": "6.3.0",
41
+ "@sindresorhus/tsconfig": "8.0.1",
42
+ "@trivago/prettier-plugin-sort-imports": "5.2.2",
43
+ "@types/node": "24.3.0",
44
+ "@vitest/coverage-v8": "3.2.4",
45
+ "oxlint": "1.14.0",
49
46
  "p-wait-for": "5.0.2",
50
- "typedoc": "0.27.5",
51
- "typescript": "5.7.2",
52
- "vitest": "2.1.8"
47
+ "prettier": "3.6.2",
48
+ "typedoc": "0.28.11",
49
+ "typescript": "5.9.2",
50
+ "vitest": "3.2.4"
53
51
  },
54
52
  "publishConfig": {
55
53
  "access": "public",
@@ -62,5 +60,26 @@
62
60
  },
63
61
  "engines": {
64
62
  "node": ">=18"
63
+ },
64
+ "packageManager": "pnpm@10.15.0",
65
+ "prettier": {
66
+ "singleQuote": true,
67
+ "trailingComma": "all",
68
+ "arrowParens": "avoid",
69
+ "semi": true,
70
+ "printWidth": 100,
71
+ "plugins": [
72
+ "@trivago/prettier-plugin-sort-imports"
73
+ ],
74
+ "importOrder": [
75
+ "^node:.*$",
76
+ "<THIRD_PARTY_MODULES>",
77
+ "^(@ctrl)(/.*|$)",
78
+ "^\\.\\./(?!.*\\.css$)",
79
+ "^\\./(?!.*\\.css$)(?=.*/)",
80
+ "^\\./(?!.*\\.css$)(?!.*/)"
81
+ ],
82
+ "importOrderSeparation": true,
83
+ "importOrderSortSpecifiers": false
65
84
  }
66
85
  }