Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e142a51

Browse files
authoredSep 24, 2023
feat: switch from got to ofetch (#111)
BREAKING CHANGE: `addTorrent` functions can no longer be passed a file path. You must handle reading the file. BREAKING CHANGE: no longer uses got - uses [ofetch](https://github.com/unjs/ofetch) which can work in environments like cloudflare workers and bun due to using fetch BREAKING CHANGE: requires node 18
1 parent 7067e66 commit e142a51

File tree

11 files changed

+1327
-1440
lines changed

11 files changed

+1327
-1440
lines changed
 

‎.circleci/config.yml

-45
This file was deleted.

‎.github/workflows/ci.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
services:
13+
deluge:
14+
image: lscr.io/linuxserver/deluge:latest
15+
env:
16+
PUID: 1000
17+
PGID: 1000
18+
TZ: Etc/UTC
19+
ports:
20+
- "8112:8112"
21+
- "6881:6881"
22+
- "6881:6881/udp"
23+
steps:
24+
- name: checkout
25+
uses: actions/checkout@v3
26+
- name: setup node
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 20
30+
cache: 'npm'
31+
- name: install dependencies
32+
run: npm ci
33+
- name: lint
34+
run: npm run lint
35+
- name: test
36+
run: npm run test:ci
37+
- name: coverage
38+
uses: codecov/codecov-action@v3
39+
with:
40+
token: ${{ secrets.CODECOV_TOKEN }}
41+
publish:
42+
needs: build
43+
runs-on: ubuntu-latest
44+
if: github.ref_name == 'master'
45+
permissions:
46+
contents: write # to be able to publish a GitHub release
47+
issues: write # to be able to comment on released issues
48+
pull-requests: write # to be able to comment on released pull requests
49+
id-token: write # to enable use of OIDC for npm provenance
50+
steps:
51+
- uses: actions/checkout@v3
52+
- uses: actions/setup-node@v3
53+
with:
54+
node-version: 20
55+
cache: 'npm'
56+
- run: npm ci
57+
- name: release
58+
run: npx semantic-release
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

‎.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
20

‎README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# deluge [![npm](https://img.shields.io/npm/v/@ctrl/deluge.svg?maxAge=3600)](https://www.npmjs.com/package/@ctrl/deluge) [![CircleCI](https://circleci.com/gh/scttcper/deluge.svg?style=svg)](https://circleci.com/gh/scttcper/deluge) [![coverage status](https://codecov.io/gh/scttcper/deluge/branch/master/graph/badge.svg)](https://codecov.io/gh/scttcper/deluge)
1+
# deluge [![npm](https://img.shields.io/npm/v/@ctrl/deluge.svg?maxAge=3600)](https://www.npmjs.com/package/@ctrl/deluge) [![coverage status](https://codecov.io/gh/scttcper/deluge/branch/master/graph/badge.svg)](https://codecov.io/gh/scttcper/deluge)
22

33
> TypeScript api wrapper for [deluge](https://deluge-torrent.org/) using [got](https://github.com/sindresorhus/got)
44
@@ -75,3 +75,19 @@ transmission - https://github.com/scttcper/transmission
7575
qbittorrent - https://github.com/scttcper/qbittorrent
7676
utorrent - https://github.com/scttcper/utorrent
7777
rtorrent - https://github.com/scttcper/rtorrent
78+
79+
### Start a test docker container
80+
81+
```
82+
docker run -d \
83+
--name=deluge \
84+
-e PUID=1000 \
85+
-e PGID=1000 \
86+
-e TZ=Etc/UTC \
87+
-e DELUGE_LOGLEVEL=error `#optional` \
88+
-p 8112:8112 \
89+
-p 6881:6881 \
90+
-p 6881:6881/udp \
91+
--restart unless-stopped \
92+
lscr.io/linuxserver/deluge:latest
93+
```
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Please sign in to comment.