@ctrl/shared-torrent 6.2.1 → 6.4.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
@@ -3,7 +3,8 @@
3
3
  > shared types and interfaces between torrent clients
4
4
 
5
5
  #### Normalized Torrent Clients
6
+
6
7
  - deluge - [@ctrl/deluge](https://github.com/scttcper/deluge)
7
8
  - transmission - [@ctrl/transmission](https://github.com/scttcper/transmission)
8
9
  - qbittorrent - [@ctrl/qbittorrent](https://github.com/scttcper/qbittorrent)
9
- - utorrent - [@ctrl/utorrent](https://github.com/scttcper/utorrent)
10
+ - utorrent - [@ctrl/utorrent](https://github.com/scttcper/utorrent)
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { FetchOptions } from 'ofetch';
1
2
  export interface TorrentClient {
2
3
  config: TorrentClientConfig;
3
4
  state: TorrentClientState;
@@ -16,7 +17,7 @@ export interface TorrentClient {
16
17
  queueUp(id: any): Promise<unknown>;
17
18
  queueDown(id: any): Promise<unknown>;
18
19
  addTorrent(torrent: string | Uint8Array, options?: any): Promise<unknown>;
19
- normalizedAddTorrent(torrent: string | Uint8Array, options?: Partial<AddTorrentOptions>): Promise<NormalizedTorrent>;
20
+ normalizedAddTorrent(torrent: string | Uint8Array<ArrayBuffer>, options?: Partial<AddTorrentOptions>): Promise<NormalizedTorrent>;
20
21
  }
21
22
  /**
22
23
  * A JSON serializable object that stores the state of the client.
@@ -49,7 +50,7 @@ export interface TorrentClientConfig {
49
50
  * @see https://undici.nodejs.org/#/docs/api/Dispatcher
50
51
  * @link https://github.com/unjs/ofetch#%EF%B8%8F-adding-https-agent
51
52
  */
52
- dispatcher?: InstanceType<typeof import('undici').Dispatcher>;
53
+ dispatcher?: FetchOptions['dispatcher'];
53
54
  /**
54
55
  * global request timeout
55
56
  * @link https://github.com/unjs/ofetch#%EF%B8%8F-timeout
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@ctrl/shared-torrent",
3
- "version": "6.2.1",
3
+ "version": "6.4.0",
4
4
  "description": "shared types and interfaces between torrent clients",
5
5
  "author": "Scott Cooper <scttcper@gmail.com>",
6
6
  "license": "MIT",
7
- "repository": "scttcper/shared-torrent",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/scttcper/shared-torrent.git"
10
+ },
8
11
  "type": "module",
9
12
  "exports": "./dist/index.js",
10
13
  "types": "./dist/index.d.ts",
@@ -14,23 +17,24 @@
14
17
  "sideEffects": false,
15
18
  "keywords": [],
16
19
  "scripts": {
17
- "lint": "pnpm run '/^(lint:biome|lint:eslint)$/'",
18
- "lint:biome": "biome check .",
19
- "lint:eslint": "eslint .",
20
- "lint:fix": "pnpm run '/^(lint:biome|lint:eslint):fix$/'",
21
- "lint:eslint:fix": "eslint . --fix",
22
- "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",
23
22
  "prepare": "npm run build",
24
23
  "build": "tsc"
25
24
  },
26
25
  "dependencies": {},
27
26
  "devDependencies": {
28
- "@biomejs/biome": "1.9.4",
29
- "@ctrl/eslint-config-biome": "4.3.1",
30
- "@sindresorhus/tsconfig": "7.0.0",
31
- "@types/node": "22.10.2",
32
- "typescript": "5.7.2",
33
- "undici": "^7.2.0"
27
+ "@ctrl/oxlint-config": "1.2.3",
28
+ "@sindresorhus/tsconfig": "8.0.1",
29
+ "@types/node": "24.3.0",
30
+ "@trivago/prettier-plugin-sort-imports": "5.2.2",
31
+ "ofetch": "1.4.1",
32
+ "oxlint": "1.14.0",
33
+ "prettier": "3.6.2",
34
+ "typescript": "5.9.2"
35
+ },
36
+ "peerDependencies": {
37
+ "ofetch": "^1.4.1"
34
38
  },
35
39
  "publishConfig": {
36
40
  "access": "public",
@@ -43,5 +47,26 @@
43
47
  },
44
48
  "engines": {
45
49
  "node": ">=18"
50
+ },
51
+ "packageManager": "pnpm@10.15.0",
52
+ "prettier": {
53
+ "singleQuote": true,
54
+ "trailingComma": "all",
55
+ "arrowParens": "avoid",
56
+ "semi": true,
57
+ "printWidth": 100,
58
+ "plugins": [
59
+ "@trivago/prettier-plugin-sort-imports"
60
+ ],
61
+ "importOrder": [
62
+ "^node:.*$",
63
+ "<THIRD_PARTY_MODULES>",
64
+ "^(@ctrl)(/.*|$)",
65
+ "^\\.\\./(?!.*\\.css$)",
66
+ "^\\./(?!.*\\.css$)(?=.*/)",
67
+ "^\\./(?!.*\\.css$)(?!.*/)"
68
+ ],
69
+ "importOrderSeparation": true,
70
+ "importOrderSortSpecifiers": false
46
71
  }
47
72
  }