@ctrl/shared-torrent 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +8 -7
  2. package/package.json +10 -9
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import type { Agent } from 'http';
3
1
  export interface TorrentClient {
4
2
  config: TorrentSettings;
5
3
  getAllData: () => Promise<AllClientData>;
@@ -24,13 +22,16 @@ export interface TorrentSettings {
24
22
  username?: string;
25
23
  password?: string;
26
24
  /**
27
- * pass http agent for proxy
28
- * @link https://github.com/sindresorhus/got/blob/main/documentation/tips.md#proxying
25
+ * Pass proxy agent to ofetch
26
+ * Only supported in Node.js >= 18 using undici
27
+ *
28
+ * @see https://undici.nodejs.org/#/docs/api/Dispatcher
29
+ * @link https://github.com/unjs/ofetch#%EF%B8%8F-adding-https-agent
29
30
  */
30
- agent?: Agent;
31
+ dispatcher?: InstanceType<typeof import('undici').Dispatcher>;
31
32
  /**
32
- * request timeout
33
- * @link https://github.com/sindresorhus/got/blob/main/documentation/6-timeout.md
33
+ * global request timeout
34
+ * @link https://github.com/unjs/ofetch#%EF%B8%8F-timeout
34
35
  */
35
36
  timeout?: number;
36
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl/shared-torrent",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "shared types and interfaces between torrent clients",
5
5
  "author": "Scott Cooper <scttcper@gmail.com>",
6
6
  "license": "MIT",
@@ -16,20 +16,21 @@
16
16
  "scripts": {
17
17
  "lint": "pnpm run '/^(lint:biome|lint:eslint)$/'",
18
18
  "lint:biome": "biome check .",
19
- "lint:eslint": "eslint --ext .ts,.tsx .",
19
+ "lint:eslint": "eslint .",
20
20
  "lint:fix": "pnpm run '/^(lint:biome|lint:eslint):fix$/'",
21
- "lint:eslint:fix": "eslint --ext .ts,.tsx . --fix",
22
- "lint:biome:fix": "biome check . --apply",
21
+ "lint:eslint:fix": "eslint . --fix",
22
+ "lint:biome:fix": "biome check . --write",
23
23
  "prepare": "npm run build",
24
24
  "build": "tsc"
25
25
  },
26
26
  "dependencies": {},
27
27
  "devDependencies": {
28
- "@biomejs/biome": "1.5.3",
29
- "@ctrl/eslint-config-biome": "2.0.9",
30
- "@sindresorhus/tsconfig": "5.0.0",
31
- "@types/node": "20.11.24",
32
- "typescript": "5.3.3"
28
+ "@biomejs/biome": "1.9.4",
29
+ "@ctrl/eslint-config-biome": "4.2.11",
30
+ "@sindresorhus/tsconfig": "6.0.0",
31
+ "@types/node": "22.9.0",
32
+ "typescript": "5.6.3",
33
+ "undici": "^6.20.1"
33
34
  },
34
35
  "publishConfig": {
35
36
  "access": "public",