Skip to content

Commit 440fbbc

Browse files
authored
chore: Merge branch dev to main (#194)
2 parents 50b81fd + f740129 commit 440fbbc

29 files changed

+768
-739
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ AUTH_SHA256_DIGEST=
1313
JWT_SECRET=
1414
JWT_ISSUER=
1515
JWT_VALIDITY_IN_MIN=
16+
17+
# Logging level for the application
18+
LOG_LEVEL=INFO

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ persistence/
4141
configuration.toml
4242
docker-compose.yml
4343
patches-public-key.asc
44-
integrations-public-key.asc
4544
node_modules/
4645
static/
4746
about.json

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
# [1.4.0-dev.6](https://github.com/ReVanced/revanced-api/compare/v1.4.0-dev.5...v1.4.0-dev.6) (2024-11-06)
2+
3+
4+
### Features
5+
6+
* Allow versioning by arbitrary path string ([814d3c9](https://github.com/ReVanced/revanced-api/commit/814d3c946e31068e12e3886aa8beb3238ef126ae))
7+
* Remove deprecated routes and old API ([eca40a6](https://github.com/ReVanced/revanced-api/commit/eca40a69799240f7803aa8851eb3ee961937e4d6))
8+
9+
# [1.4.0-dev.5](https://github.com/ReVanced/revanced-api/compare/v1.4.0-dev.4...v1.4.0-dev.5) (2024-11-05)
10+
11+
# [1.4.0-dev.4](https://github.com/ReVanced/revanced-api/compare/v1.4.0-dev.3...v1.4.0-dev.4) (2024-11-01)
12+
13+
14+
### Features
15+
16+
* Remove "archived" query parameter ([8ad614e](https://github.com/ReVanced/revanced-api/commit/8ad614ef4fdaf45af87a3316ef4db7e7236fd64a))
17+
* Use tag name directly instead of ID ([fc40427](https://github.com/ReVanced/revanced-api/commit/fc40427fbaafb523045eb6f5285d90949b206b8b))
18+
19+
# [1.4.0-dev.3](https://github.com/ReVanced/revanced-api/compare/v1.4.0-dev.2...v1.4.0-dev.3) (2024-11-01)
20+
21+
22+
### Bug Fixes
23+
24+
* Use new patches file extension ([d42a3a3](https://github.com/ReVanced/revanced-api/commit/d42a3a393396a0f4e9085cda46e0af2c12b63cb1))
25+
26+
# [1.4.0-dev.2](https://github.com/ReVanced/revanced-api/compare/v1.4.0-dev.1...v1.4.0-dev.2) (2024-11-01)
27+
28+
29+
### Bug Fixes
30+
31+
* Add missing logging level environment variable to .env.example ([3b62120](https://github.com/ReVanced/revanced-api/commit/3b6212065a5cfb95c303b6d0551747ba1eb317f6))
32+
33+
34+
### Features
35+
36+
* Add URL and use friendly name for `APIContributable` ([a5498ab](https://github.com/ReVanced/revanced-api/commit/a5498aba2b99db89c28a65738cc58cc4c852c327))
37+
* Make backend configurable ([f91f3a6](https://github.com/ReVanced/revanced-api/commit/f91f3a65c5e07b5b58ccbff1d4b0a5ba9b15fc50))
38+
* Remove ReVanced Integrations ([f1c1092](https://github.com/ReVanced/revanced-api/commit/f1c10928ae3be1c6b1d675819755b3046fad70d8))
39+
40+
# [1.4.0-dev.1](https://github.com/ReVanced/revanced-api/compare/v1.3.0...v1.4.0-dev.1) (2024-11-01)
41+
42+
43+
### Features
44+
45+
* Improve announcements API ([#192](https://github.com/ReVanced/revanced-api/issues/192)) ([56a00dd](https://github.com/ReVanced/revanced-api/commit/56a00ddb85f302d441f0b222a9902ea2c1c18897))
46+
147
# [1.3.0](https://github.com/ReVanced/revanced-api/compare/v1.2.0...v1.3.0) (2024-10-07)
248

349

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ API server for ReVanced.
6868
## ❓ About
6969

7070
ReVanced API is a server that is used as the backend for ReVanced.
71-
ReVanced API acts as the data source for [ReVanced Website](https://github.com/ReVanced/revanced-website) and powers [ReVanced Manager](https://github.com/ReVanced/revanced-manager)
71+
ReVanced API acts as the data source for [ReVanced Website](https://github.com/ReVanced/revanced-website) and
72+
powers [ReVanced Manager](https://github.com/ReVanced/revanced-manager)
7273
with updates and ReVanced Patches.
7374

7475
## 💪 Features
7576

7677
Some of the features ReVanced API include:
7778

78-
- 📢 **Announcements**: Post and get announcements grouped by channels
79-
- ℹ️ **About**: Get more information such as a description, ways to donate to,
80-
and links of the hoster of ReVanced API
79+
- 📢 **Announcements**: Post and get announcements
80+
- ℹ️ **About**: Get more information such as a description, ways to donate to,
81+
and links of the hoster of ReVanced API
8182
- 🧩 **Patches**: Get the latest updates of ReVanced Patches, directly from ReVanced API
8283
- 👥 **Contributors**: List all contributors involved in the project
83-
- 🔄 **Backwards compatibility**: Proxy an old API for migration purposes and backwards compatibility
8484

8585
## 🚀 How to get started
8686

@@ -90,7 +90,8 @@ ReVanced API can be deployed as a Docker container or used standalone.
9090

9191
To deploy ReVanced API as a Docker container, you can use Docker Compose or Docker CLI.
9292
The Docker image is published on GitHub Container registry,
93-
so before you can pull the image, you need to [authenticate to the Container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry).
93+
so before you can pull the image, you need
94+
to [authenticate to the Container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry).
9495

9596
### 🗄️ Docker Compose
9697

@@ -114,8 +115,6 @@ so before you can pull the image, you need to [authenticate to the Container reg
114115
-v $(pwd)/configuration.toml:/app/configuration.toml \
115116
# Mount the patches public key
116117
-v $(pwd)/patches-public-key.asc:/app/patches-public-key.asc \
117-
# Mount the integrations public key
118-
-v $(pwd)/integrations-public-key.asc:/app/integrations-public-key.asc \
119118
# Mount the static folder
120119
-v $(pwd)/static:/app/static \
121120
# Mount the about.json file
@@ -141,7 +140,7 @@ A Java Runtime Environment (JRE) must be installed.
141140
1. [Download](https://github.com/ReVanced/revanced-api/releases/latest) ReVanced API to a folder
142141
2. In the same folder, create an `.env` file using [.env.example](.env.example) as a template
143142
3. In the same folder, create a `configuration.toml` file
144-
using [configuration.example.toml](configuration.example.toml) as a template
143+
using [configuration.example.toml](configuration.example.toml) as a template
145144
4. In the same folder, create an `about.json` file using [about.example.json](about.example.json) as a template
146145
5. Run `java -jar revanced-api.jar start` to start the server
147146

@@ -159,7 +158,8 @@ A Java Development Kit (JDK) and Git must be installed.
159158

160159
### 📙 Contributing
161160

162-
Thank you for considering contributing to ReVanced API. You can find the contribution guidelines [here](CONTRIBUTING.md).
161+
Thank you for considering contributing to ReVanced API. You can find the contribution
162+
guidelines [here](CONTRIBUTING.md).
163163

164164
### 🛠️ Building
165165

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ kotlin {
4848
}
4949
}
5050

51+
tasks {
52+
test {
53+
useJUnitPlatform()
54+
}
55+
}
56+
5157
repositories {
5258
mavenCentral()
5359
google()
@@ -98,6 +104,8 @@ dependencies {
98104
implementation(libs.caffeine)
99105
implementation(libs.bouncy.castle.provider)
100106
implementation(libs.bouncy.castle.pgp)
107+
108+
testImplementation(kotlin("test"))
101109
}
102110

103111
// The maven-publish plugin is necessary to make signing work.

configuration.example.toml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
organization = "revanced"
2-
patches = { repository = "revanced-patches", asset-regex = "jar$", signature-asset-regex = "asc$", public-key-file = "patches-public-key.asc", public-key-id = 0 }
3-
integrations = { repository = "revanced-integrations", asset-regex = "apk$", signature-asset-regex = "asc$", public-key-file = "integrations-public-key.asc", public-key-id = 0 }
4-
manager = { repository = "revanced-manager", asset-regex = "apk$" }
5-
contributors-repositories = [
6-
"revanced-patcher",
7-
"revanced-patches",
8-
"revanced-integrations",
9-
"revanced-website",
10-
"revanced-cli",
11-
"revanced-manager",
12-
]
13-
api-version = 1
1+
api-version = "v1"
142
cors-allowed-hosts = [
153
"revanced.app",
164
"*.revanced.app"
175
]
186
endpoint = "https://api.revanced.app"
19-
old-api-endpoint = "https://old-api.revanced.app"
207
static-files-path = "static/root"
218
versioned-static-files-path = "static/versioned"
9+
backend-service-name = "GitHub"
2210
about-json-file-path = "about.json"
11+
organization = "revanced"
12+
13+
[patches]
14+
repository = "revanced-patches"
15+
asset-regex = "rvp$"
16+
signature-asset-regex = "asc$"
17+
public-key-file = "static/root/keys.asc"
18+
public-key-id = 3897925568445097277
19+
20+
[manager]
21+
repository = "revanced-manager"
22+
asset-regex = "apk$"
23+
24+
[contributors-repositories]
25+
revanced-patcher = "ReVanced Patcher"
26+
revanced-patches = "ReVanced Patches"
27+
revanced-website = "ReVanced Website"
28+
revanced-cli = "ReVanced CLI"
29+
revanced-manager = "ReVanced Manager"

docker-compose.example.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ services:
77
- /data/revanced-api/.env:/app/.env
88
- /data/revanced-api/configuration.toml:/app/configuration.toml
99
- /data/revanced-api/patches-public-key.asc:/app/patches-public-key.asc
10-
- /data/revanced-api/integrations-public-key.asc:/app/integrations-public-key.asc
1110
- /data/revanced-api/static:/app/static
1211
- /data/revanced-api/about.json:/app/about.json
1312
environment:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
org.gradle.parallel = true
22
org.gradle.caching = true
33
kotlin.code.style = official
4-
version = 1.3.0
4+
version = 1.4.0-dev.6

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22
kompendium-core = "3.14.4"
3-
kotlin = "2.0.0"
3+
kotlin = "2.0.20"
44
logback = "1.5.6"
55
exposed = "0.52.0"
66
h2 = "2.2.224"
@@ -10,8 +10,8 @@ ktor = "2.3.7"
1010
ktoml = "0.5.2"
1111
picocli = "4.7.6"
1212
datetime = "0.6.0"
13-
revanced-patcher = "20.0.0"
14-
revanced-library = "3.0.1-dev.1"
13+
revanced-patcher = "21.0.0"
14+
revanced-library = "3.0.2"
1515
caffeine = "3.1.8"
1616
bouncy-castle = "1.78.1"
1717

src/main/kotlin/app/revanced/api/configuration/schema/APISchema.kt renamed to src/main/kotlin/app/revanced/api/configuration/APISchema.kt

Lines changed: 31 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,112 @@
1-
package app.revanced.api.configuration.schema
1+
package app.revanced.api.configuration
22

33
import kotlinx.datetime.LocalDateTime
44
import kotlinx.serialization.Serializable
55

6-
interface APIUser {
6+
interface ApiUser {
77
val name: String
88
val avatarUrl: String
99
val url: String
1010
}
1111

1212
@Serializable
13-
class APIMember(
13+
class ApiMember(
1414
override val name: String,
1515
override val avatarUrl: String,
1616
override val url: String,
1717
val bio: String?,
18-
val gpgKey: APIGpgKey?,
19-
) : APIUser
18+
val gpgKey: ApiGpgKey?,
19+
) : ApiUser
2020

2121
@Serializable
22-
class APIGpgKey(
22+
class ApiGpgKey(
2323
val id: String,
2424
val url: String,
2525
)
2626

2727
@Serializable
28-
class APIContributor(
28+
class ApiContributor(
2929
override val name: String,
3030
override val avatarUrl: String,
3131
override val url: String,
3232
val contributions: Int,
33-
) : APIUser
33+
) : ApiUser
3434

3535
@Serializable
3636
class APIContributable(
3737
val name: String,
38+
val url: String,
3839
// Using a list instead of a set because set semantics are unnecessary here.
39-
val contributors: List<APIContributor>,
40+
val contributors: List<ApiContributor>,
4041
)
4142

4243
@Serializable
43-
class APIRelease<T>(
44+
class ApiRelease(
4445
val version: String,
4546
val createdAt: LocalDateTime,
4647
val description: String,
47-
// Using a list instead of a set because set semantics are unnecessary here.
48-
val assets: List<T>,
49-
)
50-
51-
@Serializable
52-
class APIManagerAsset(
53-
val downloadUrl: String,
54-
)
55-
56-
@Serializable
57-
class APIPatchesAsset(
5848
val downloadUrl: String,
59-
val signatureDownloadUrl: String,
60-
// TODO: Remove this eventually when integrations are merged into patches.
61-
val name: APIAssetName,
49+
val signatureDownloadUrl: String? = null,
6250
)
6351

6452
@Serializable
65-
enum class APIAssetName {
66-
PATCHES,
67-
INTEGRATION,
68-
}
69-
70-
@Serializable
71-
class APIReleaseVersion(
53+
class ApiReleaseVersion(
7254
val version: String,
7355
)
7456

7557
@Serializable
76-
class APIAnnouncement(
58+
class ApiAnnouncement(
7759
val author: String? = null,
7860
val title: String,
7961
val content: String? = null,
8062
// Using a list instead of a set because set semantics are unnecessary here.
81-
val attachmentUrls: List<String> = emptyList(),
82-
val channel: String? = null,
63+
val attachments: List<String> = emptyList(),
64+
// Using a list instead of a set because set semantics are unnecessary here.
65+
val tags: List<String> = emptyList(),
8366
val archivedAt: LocalDateTime? = null,
8467
val level: Int = 0,
8568
)
8669

8770
@Serializable
88-
class APIResponseAnnouncement(
71+
class ApiResponseAnnouncement(
8972
val id: Int,
9073
val author: String? = null,
9174
val title: String,
9275
val content: String? = null,
9376
// Using a list instead of a set because set semantics are unnecessary here.
94-
val attachmentUrls: List<String> = emptyList(),
95-
val channel: String? = null,
77+
val attachments: List<String> = emptyList(),
78+
// Using a list instead of a set because set semantics are unnecessary here.
79+
val tags: List<String> = emptyList(),
9680
val createdAt: LocalDateTime,
9781
val archivedAt: LocalDateTime? = null,
9882
val level: Int = 0,
9983
)
10084

10185
@Serializable
102-
class APIResponseAnnouncementId(
86+
class ApiResponseAnnouncementId(
10387
val id: Int,
10488
)
10589

10690
@Serializable
107-
class APIAnnouncementArchivedAt(
91+
class ApiAnnouncementArchivedAt(
10892
val archivedAt: LocalDateTime,
10993
)
11094

11195
@Serializable
112-
class APIRateLimit(
96+
class ApiAnnouncementTag(
97+
val name: String,
98+
)
99+
100+
@Serializable
101+
class ApiRateLimit(
113102
val limit: Int,
114103
val remaining: Int,
115104
val reset: LocalDateTime,
116105
)
117106

118107
@Serializable
119-
class APIAssetPublicKeys(
108+
class ApiAssetPublicKey(
120109
val patchesPublicKey: String,
121-
val integrationsPublicKey: String,
122110
)
123111

124112
@Serializable
@@ -174,4 +162,4 @@ class APIAbout(
174162
}
175163

176164
@Serializable
177-
class APIToken(val token: String)
165+
class ApiToken(val token: String)

0 commit comments

Comments
 (0)