@ctrl/transmission 4.1.1 → 4.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.
@@ -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, DefaultResponse, FreeSpaceResponse, GetTorrentRepsonse, NormalizedTorrentIds, RenamePathOptions, SessionArguments, SessionResponse, SetTorrentOptions } 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, DefaultResponse, FreeSpaceResponse, GetTorrentRepsonse, NormalizedTorrentIds, RenamePathOptions, SessionArguments, SessionResponse, SetTorrentOptions } from './types.js';
5
5
  export declare class Transmission implements TorrentClient {
6
6
  config: TorrentSettings;
7
7
  sessionId?: string;
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from 'fs';
2
2
  import got from 'got';
3
3
  import { magnetDecode } from '@ctrl/magnet-link';
4
- import { TorrentState, } from '@ctrl/shared-torrent';
4
+ import { TorrentState } from '@ctrl/shared-torrent';
5
5
  import { urlJoin } from '@ctrl/url-join';
6
6
  const defaults = {
7
7
  baseUrl: 'http://localhost:9091/',
@@ -212,6 +212,7 @@ export class Transmission {
212
212
  const results = {
213
213
  torrents,
214
214
  labels,
215
+ raw: listTorrents,
215
216
  };
216
217
  return results;
217
218
  }
@@ -373,6 +374,7 @@ export class Transmission {
373
374
  totalSize: torrent.totalSize,
374
375
  totalUploaded: torrent.uploadedEver,
375
376
  totalDownloaded: torrent.downloadedEver,
377
+ raw: torrent,
376
378
  };
377
379
  }
378
380
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl/transmission",
3
- "version": "4.1.1",
3
+ "version": "4.3.0",
4
4
  "description": "TypeScript api wrapper for transmission using got",
5
5
  "author": "Scott Cooper <scttcper@gmail.com>",
6
6
  "license": "MIT",
@@ -27,20 +27,21 @@
27
27
  "test:ci": "vitest run --coverage"
28
28
  },
29
29
  "dependencies": {
30
- "@ctrl/magnet-link": "^3.1.0",
31
- "@ctrl/shared-torrent": "^4.1.1",
32
- "@ctrl/url-join": "^2.0.0",
33
- "got": "^12.1.0"
30
+ "@ctrl/magnet-link": "^3.1.1",
31
+ "@ctrl/shared-torrent": "^4.3.1",
32
+ "@ctrl/url-join": "^2.0.2",
33
+ "got": "^12.5.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@ctrl/eslint-config": "3.4.4",
36
+ "@ctrl/eslint-config": "3.5.0",
37
37
  "@sindresorhus/tsconfig": "3.0.1",
38
- "@types/node": "17.0.38",
39
- "c8": "7.11.3",
40
- "p-wait-for": "4.1.0",
41
- "typedoc": "0.22.17",
42
- "typescript": "4.7.2",
43
- "vitest": "0.13.1"
38
+ "@types/node": "18.7.18",
39
+ "@vitest/coverage-c8": "0.23.4",
40
+ "c8": "7.12.0",
41
+ "p-wait-for": "5.0.0",
42
+ "typedoc": "0.23.15",
43
+ "typescript": "4.8.3",
44
+ "vitest": "0.23.4"
44
45
  },
45
46
  "jest": {
46
47
  "testEnvironment": "node",