Skip to content

Commit 46246ed

Browse files
authored
feat: Add import/export state (#114)
1 parent 2325e2b commit 46246ed

File tree

5 files changed

+1530
-641
lines changed

5 files changed

+1530
-641
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ const res = await client.removeTorrent('torrent_id', true);
7070
console.log(res);
7171
```
7272

73+
##### export and create from state
74+
75+
If you're shutting down the server often (serverless?) you can export the state
76+
77+
```ts
78+
const state = client.exportState()
79+
const client = Deluge.createFromState(config, state);
80+
```
81+
7382
### See Also
7483
transmission - https://github.com/scttcper/transmission
7584
qbittorrent - https://github.com/scttcper/qbittorrent

biome.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"files": {
44
"ignoreUnknown": true,
5-
"ignore": ["dist/*", "public/*"]
5+
"ignore": ["dist/*", "public/*", "package.json"]
66
},
77
"extends": ["@ctrl/eslint-config-biome/biome"]
88
}

package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,24 @@
2828
},
2929
"dependencies": {
3030
"@ctrl/magnet-link": "^4.0.2",
31-
"@ctrl/shared-torrent": "^6.1.0",
31+
"@ctrl/shared-torrent": "^6.2.1",
3232
"node-fetch-native": "^1.6.4",
3333
"ofetch": "^1.4.1",
3434
"tough-cookie": "^5.0.0",
35+
"type-fest": "^4.30.2",
3536
"ufo": "^1.5.4",
3637
"uint8array-extras": "^1.4.0"
3738
},
3839
"devDependencies": {
3940
"@biomejs/biome": "1.9.4",
40-
"@ctrl/eslint-config-biome": "4.2.11",
41-
"@sindresorhus/tsconfig": "6.0.0",
42-
"@types/node": "22.9.0",
43-
"@vitest/coverage-v8": "2.1.4",
41+
"@ctrl/eslint-config-biome": "4.3.1",
42+
"@sindresorhus/tsconfig": "7.0.0",
43+
"@types/node": "22.10.2",
44+
"@vitest/coverage-v8": "2.1.8",
4445
"p-wait-for": "5.0.2",
45-
"typedoc": "0.26.11",
46-
"typescript": "5.6.3",
47-
"vitest": "2.1.4"
46+
"typedoc": "0.27.5",
47+
"typescript": "5.7.2",
48+
"vitest": "2.1.8"
4849
},
4950
"publishConfig": {
5051
"access": "public",

0 commit comments

Comments
 (0)