@ctrl/transmission 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.
- package/dist/src/transmission.d.ts +2 -2
- package/dist/src/transmission.js +1 -1
- package/package.json +14 -14
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
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, DefaultResponse, FreeSpaceResponse, GetTorrentRepsonse, NormalizedTorrentIds, RenamePathOptions, SessionArguments, SessionResponse, SetTorrentOptions } from './types.js';
|
4
4
|
export declare class Transmission implements TorrentClient {
|
@@ -52,6 +52,6 @@ export declare class Transmission implements TorrentClient {
|
|
52
52
|
getTorrent(id: NormalizedTorrentIds): Promise<NormalizedTorrent>;
|
53
53
|
getAllData(): Promise<AllClientData>;
|
54
54
|
listTorrents(id?: NormalizedTorrentIds, additionalFields?: string[]): Promise<GetTorrentRepsonse>;
|
55
|
-
request<T>(method: string, args?: any): Promise<
|
55
|
+
request<T>(method: string, args?: any): Promise<ReturnType<typeof ofetch.raw<T>>>;
|
56
56
|
private _handleNormalizedIds;
|
57
57
|
}
|
package/dist/src/transmission.js
CHANGED
@@ -315,7 +315,7 @@ export class Transmission {
|
|
315
315
|
catch (error) {
|
316
316
|
if (error instanceof FetchError && error.response.status === 409) {
|
317
317
|
this.sessionId = error.response.headers.get('x-transmission-session-id');
|
318
|
-
// eslint-disable-next-line no-return-await
|
318
|
+
// eslint-disable-next-line no-return-await, @typescript-eslint/return-await
|
319
319
|
return await this.request(method, args);
|
320
320
|
}
|
321
321
|
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ctrl/transmission",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.1.0",
|
4
4
|
"description": "TypeScript api wrapper for transmission using got",
|
5
5
|
"author": "Scott Cooper <scttcper@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -19,9 +19,9 @@
|
|
19
19
|
"scripts": {
|
20
20
|
"lint": "pnpm run '/^(lint:biome|lint:eslint)$/'",
|
21
21
|
"lint:biome": "biome check .",
|
22
|
-
"lint:eslint": "eslint
|
22
|
+
"lint:eslint": "eslint .",
|
23
23
|
"lint:fix": "pnpm run '/^(lint:biome|lint:eslint):fix$/'",
|
24
|
-
"lint:eslint:fix": "eslint
|
24
|
+
"lint:eslint:fix": "eslint . --fix",
|
25
25
|
"lint:biome:fix": "biome check . --apply",
|
26
26
|
"prepare": "npm run build",
|
27
27
|
"build": "tsc",
|
@@ -33,22 +33,22 @@
|
|
33
33
|
"dependencies": {
|
34
34
|
"@ctrl/magnet-link": "^4.0.2",
|
35
35
|
"@ctrl/shared-torrent": "^6.0.0",
|
36
|
-
"ofetch": "^1.3.
|
37
|
-
"ufo": "^1.
|
38
|
-
"uint8array-extras": "^1.
|
36
|
+
"ofetch": "^1.3.4",
|
37
|
+
"ufo": "^1.5.3",
|
38
|
+
"uint8array-extras": "^1.2.0"
|
39
39
|
},
|
40
40
|
"devDependencies": {
|
41
|
-
"@biomejs/biome": "1.
|
42
|
-
"@ctrl/eslint-config-biome": "
|
41
|
+
"@biomejs/biome": "1.8.3",
|
42
|
+
"@ctrl/eslint-config-biome": "3.1.3",
|
43
43
|
"@ctrl/magnet-link": "^4.0.2",
|
44
44
|
"@ctrl/shared-torrent": "^6.0.0",
|
45
|
-
"@sindresorhus/tsconfig": "
|
46
|
-
"@types/node": "20.
|
47
|
-
"@vitest/coverage-v8": "1.
|
45
|
+
"@sindresorhus/tsconfig": "6.0.0",
|
46
|
+
"@types/node": "20.14.9",
|
47
|
+
"@vitest/coverage-v8": "1.6.0",
|
48
48
|
"p-wait-for": "5.0.2",
|
49
|
-
"typedoc": "0.
|
50
|
-
"typescript": "5.
|
51
|
-
"vitest": "1.
|
49
|
+
"typedoc": "0.26.3",
|
50
|
+
"typescript": "5.5.3",
|
51
|
+
"vitest": "1.6.0"
|
52
52
|
},
|
53
53
|
"publishConfig": {
|
54
54
|
"access": "public",
|