feat: Rebrand to Revenge (#51)

Co-authored-by: PalmDevs <git@palmdevs.me>
Co-authored-by: Palm <contact@palmdevs.me>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
Gabriel.W.Jackson 2024-10-19 15:54:15 +02:00 • committed by GitHub
parent 6205c54bb8
commit 0a61404132
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 4044 additions and 1850 deletions

View file

@ -1,79 +0,0 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"ignorePatterns": [ "dist", "browser" ],
"plugins": [
"@typescript-eslint",
"simple-import-sort",
"unused-imports",
"import-alias"
],
"rules": {
"no-restricted-syntax": [ "error", {
"selector": "AwaitExpression:not(:function *)",
"message": "Hermes does not support top-level await, and SWC cannot transform it."
} ],
"quotes": [ "error", "double", { "avoidEscape": true } ],
"jsx-quotes": [ "error", "prefer-double" ],
"no-mixed-spaces-and-tabs": "error",
"indent": [ "error", 4, { "SwitchCase": 1 } ],
"arrow-parens": [ "error", "as-needed" ],
"eol-last": [ "error", "always" ],
"func-call-spacing": [ "error", "never" ],
"no-multi-spaces": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
"semi": [ "error", "always" ],
"semi-style": [ "error", "last" ],
"space-in-parens": [ "error", "never" ],
"block-spacing": [ "error", "always" ],
"object-curly-spacing": [ "error", "always" ],
"eqeqeq": [ "error", "always", { "null": "ignore" } ],
"spaced-comment": [ "error", "always", { "markers": [ "!" ] } ],
"yoda": "error",
"prefer-destructuring": [ "error", { "object": true, "array": false } ],
"operator-assignment": [ "error", "always" ],
"no-useless-computed-key": "error",
"no-unneeded-ternary": [ "error", { "defaultAssignment": false } ],
"no-invalid-regexp": "error",
"no-constant-condition": [ "error", { "checkLoops": false } ],
"no-duplicate-imports": "error",
"no-extra-semi": "error",
"dot-notation": "error",
"no-useless-escape": [ "error" ],
"no-fallthrough": "error",
"for-direction": "error",
"no-async-promise-executor": "error",
"no-cond-assign": "error",
"no-dupe-else-if": "error",
"no-duplicate-case": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-prototype-builtins": "error",
"no-regex-spaces": "error",
"no-shadow-restricted-names": "error",
"no-unexpected-multiline": "error",
"no-unsafe-optional-chaining": "error",
"no-useless-backreference": "error",
"use-isnan": "error",
"prefer-const": "error",
"prefer-spread": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"unused-imports/no-unused-imports": "error",
"import-alias/import-alias": [
"error",
{
"relativeDepth": 0,
"aliases": [
{ "alias": "@metro", "matcher": "^src/lib/metro" },
{ "alias": "@core", "matcher": "^src/core" },
{ "alias": "@ui", "matcher": "^src/lib/ui" },
{ "alias": "@types", "matcher": "^src/lib/utils/types.ts" },
{ "alias": "@lib", "matcher": "^src/lib" }
]
}
]
}
}

1
.github/FUNDING.yml vendored
View file

@ -1 +0,0 @@
github: [pylixonly]

View file

@ -1,35 +1,59 @@
---
name: Bug report
about: Create a report to help us improve
name: 🐞 Bug report
description: Report a bug or an issue.
title: 'bug: '
labels: bug
assignees: ''
labels: ['Bug report']
body:
- type: markdown
attributes:
value: |
# Revenge bug report
---
Before creating a new bug report, please keep the following in mind:
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Device Information (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Discord Version [e.g. 222111]
- Bunny Version [e.g e19e89c-main]
**Checklists**
- [ ] I understand that this is a bug report and not a place to request new features or plugins
- [ ] I understand that this is no place to report bugs produced by a plugin
- [ ] I can reproduce this bug in Bunny's safe mode AND unable to reproduce it in vanilla/unmodded Discord
- **Do not submit a duplicate bug report**: Search for existing bug reports [here](https://github.com/revenge-mod/revenge-bundle/issues?q=label%3A%22Bug+report%22).
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/revenge-mod/revenge-bundle/blob/main/CONTRIBUTING.md).
- **Do not use the issue page for support**: If you need help or have questions, join us on [Discord](https://discord.gg/ddcQf3s2Uq).
- type: textarea
attributes:
label: Bug description
description: |
- Describe your bug in detail
- Add steps to reproduce the bug if possible (Step 1. ... Step 2. ...)
- Add images and videos if possible
validations:
required: true
- type: textarea
attributes:
label: Stack trace
description: If this bug causes a JS crash, please paste the stack trace here.
render: shell
- type: textarea
attributes:
label: Component stack trace
description: If this bug causes a JS crash, please paste the component stack trace here.
render: shell
- type: textarea
attributes:
label: Native crash trace
description: If this bug causes a native crash, please paste the crash trace here. On Android, this can be accessed by doing `logcat | grep AndroidRuntime`.
render: shell
- type: textarea
attributes:
label: Solution
description: If applicable, add a possible solution to the bug.
- type: textarea
attributes:
label: Additional context
description: Add additional context here.
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Your bug report will be closed if you don't follow the checklist below.
options:
- label: I have checked all open and closed bug reports and this is not a duplicate.
required: true
- label: I have chosen an appropriate title.
required: true
- label: All requested information has been provided properly.
required: true

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 🗨 Discussions
url: https://discord.gg/ddcQf3s2Uq
about: Have something unspecific to Revenge in mind? Join us on Discord!

View file

@ -0,0 +1,45 @@
name: ⭐ Feature request
description: Create a detailed request for a new feature.
title: 'feat: '
labels: ['Feature request']
body:
- type: markdown
attributes:
value: |
# Revenge feature request
Before creating a new feature request, please keep the following in mind:
- **Do not submit a duplicate feature request**: Search for existing feature requests [here](https://github.com/revenge-mod/revenge-bundle/issues?q=label%3A%22Feature+request%22).
- **Review the contribution guidelines**: Make sure your feature request adheres to it. You can find the guidelines [here](https://github.com/revenge-mod/revenge-bundle/blob/main/CONTRIBUTING.md).
- **Do not use the issue page for support**: If you need help or have questions, join us on [Discord](https://discord.gg/ddcQf3s2Uq).
- type: textarea
attributes:
label: Feature description
description: |
- Describe your feature in detail
- Add images, videos, links, examples, references, etc. if possible
- type: textarea
attributes:
label: Motivation
description: |
A strong motivation is necessary for a feature request to be considered.
- Why should this feature be implemented?
- What is the explicit use case?
- What are the benefits?
- What makes this feature important?
validations:
required: true
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Your feature request will be closed if you don't follow the checklist below.
options:
- label: I have checked all open and closed feature requests and this is not a duplicate
required: true
- label: I have chosen an appropriate title.
required: true
- label: All requested information has been provided properly.
required: true

2
.github/config.yml vendored Normal file
View file

@ -0,0 +1,2 @@
firstPRMergeComment: >
Thank you for contributing to Revenge. Join us on [Discord](https://discord.gg/ddcQf3s2Uq) to receive a role for your contribution.

View file

@ -1,84 +0,0 @@
name: Build
on:
push:
tags:
- "v*"
jobs:
build:
name: Build and release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout builds
uses: actions/checkout@v4
with:
repository: "revenge-mod/ci-builds"
path: "builds"
token: ${{ secrets.BUILDS_PUSH_TOKEN }}
# TODO: fix this
ref: main
- name: Set env
id: env
run: |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "hash=$GITHUB_SHA" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm and dependencies
run: |
npm i -g pnpm
pnpm i
- name: Build
run: pnpm build --release-branch=${{ github.ref_name }} --build-minify
- name: Create draft release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.env.outputs.tag }}
release_name: Revenge ${{ steps.env.outputs.tag }}
draft: true
prerelease: false
- name: Upload dist
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/revenge.js
asset_name: revenge.js
asset_content_type: text/javascript
- name: Publish release
uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
- name: Push build
run: |
rm $GITHUB_WORKSPACE/builds/* || true
cp -r dist/* $GITHUB_WORKSPACE/builds || true
cd $GITHUB_WORKSPACE/builds
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Build $GITHUB_SHA" || exit 0
git push
env:
GITHUB_TOKEN: ${{ secrets.BUILDS_PUSH_TOKEN }}

View file

@ -1,32 +0,0 @@
name: Sync with I18n repository
on:
push:
branches:
- 'main'
paths:
- 'src/core/i18n/default.json'
workflow_dispatch:
jobs:
sync:
name: Synchronize strings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: "pyoncord/i18n"
path: "main"
token: ${{ secrets.PYLIX_TOKEN }}
- name: Push
run: |
cp src/core/i18n/default.json $GITHUB_WORKSPACE/main/base/bunny.json
cd $GITHUB_WORKSPACE/main
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Strings update from Bunny" || exit 0
git push

32
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Release
on:
push:
branches: [main, dev]
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Release
run: pnpx semantic-release

54
.releaserc Normal file
View file

@ -0,0 +1,54 @@
{
"branches": [
"main",
{
"name": "dev",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer", {
"releaseRules": [
{ "type": "build", "scope": "Needs bump", "release": "patch" }
]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/git",
{
"assets": [
"README.md",
"CHANGELOG.md"
],
"message": "chore: Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "pnpm build"
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "dist/*.js"
}
],
"successComment": false
}
],
[
"@saithodev/semantic-release-backmerge",
{
"backmergeBranches": [{"from": "main", "to": "dev"}],
"clearWorkspace": true
}
]
]
}

35
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,35 @@
# 👋 Contribution guidelines
This document describes how to contribute to Revenge bundle.
## 📖 Resources to help you get started
* [Issues](https://github.com/revenge-mod/revenge-bundle/issues) are where we keep track of bugs and feature requests
## 🙏 Submitting a feature request
Features can be requested by opening an issue using the
[Feature request issue template](https://github.com/revenge-mod/revenge-bundle/issues/new?assignees=&labels=Feature+request&projects=&template=feature_request.yml&title=feat%3A+).
> **Note**
> Requests can be accepted or rejected at the discretion of maintainers of Revenge bundle.
> Good motivation has to be provided for a request to be accepted.
## 🐞 Submitting a bug report
If you encounter a bug while using Revenge bundle, open an issue using the
[Bug report issue template](https://github.com/revenge-mod/revenge-bundle/issues/new?assignees=&labels=Bug+report&projects=&template=bug_report.yml&title=bug%3A+).
## 📝 How to contribute
1. Before contributing, it is recommended to open an issue to discuss your change
with the maintainers of Revenge bundle. This will help you determine whether your change is acceptable
and whether it is worth your time to implement it
2. Development happens on the `dev` branch. Fork the repository and create your branch from `dev`
3. Commit your changes
4. Submit a pull request to the `dev` branch of the repository and reference issues
that your pull request closes in the description of your pull request
5. Our team will review your pull request and provide feedback. Once your pull request is approved,
it will be merged into the `dev` branch and will be included in the next release of Revenge bundle
❤️ Thank you for considering contributing to Revenge bundle

View file

@ -1,42 +1,79 @@
# Revenge [![Discord](https://img.shields.io/discord/1205207689832038522?style=social&logo=discord&label=Revenge)]([https://discord.gg/24Ue3pzaum])
A modification for Discord's mobile apps, a fork of [Bunny](https://github.com/pyoncord/Bunny).
<p align="center">
<picture>
<source
width="512px"
media="(prefers-color-scheme: dark)"
srcset="assets/wordmark/wordmark+slogan-dark.svg"
>
<img
width="512px"
src="assets/wordmark/wordmark+slogan-light.svg"
>
</picture>
<br>
<a href="https://revenge-mod.github.io/">
<picture>
<source height="32px" media="(prefers-color-scheme: dark)" srcset="assets/logo/logo-dark.svg" />
<img height="32px" src="assets/logo/logo-light.svg" />
</picture>
</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://discord.com/invite/ddcQf3s2Uq">
<picture>
<source height="32px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
<img height="32px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
</picture>
</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/revenge-mod">
<picture>
<source height="32px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
<img height="32px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
</picture>
</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
## Installing
</a>
</p>
# 👊 Revenge
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/revenge-mod/revenge-bundle/release.yml)
[![3-Clause BSD License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
A client modification for Discord mobile, a continuation of [Bunny](https://github.com/pyoncord/Bunny).
## 💪 Features
- **🔌 Plugins**: Extend Discord with custom features
- **🎨 Themes & Fonts**: Customize Discord's appearance to your liking
- **🧪 Experiments**: Try out Discord's new features before they're rolled out
## ⬇️ Download
This repository releases JavaScript bundles for loaders to execute. These are the official Revenge loaders:
### Android
- **Root** with Xposed - [RevengeXposed](https://github.com/revenge-mod/RevengeXposed/releases/latest)
- **Non-root** - [Revenge Manager](https://github.com/revenge-mod/RevengeManager/releases/latest)
- **🩹 Root with Xposed**: [RevengeXposed](https://github.com/revenge-mod/revenge-xposed/releases/latest)
- **📵 Non-root**: [Revenge Manager](https://github.com/revenge-mod/revenge-manager/releases/latest)
### iOS
- [**RevengeTweak**](https://github.com/revenge-mod/RevengeTweak) - Get prebuilt rootful and rootless `.deb` files or the prepatched `.ipa `
## Building
1. Install a Revenge loader with config support (any mentioned in the [Installing](#installing) section).
2. Go to **Settings** > **General** and enable **Developer Settings**.
3. Clone the repository
- [**RevengeTweak**](https://github.com/revenge-mod/revenge-tweak): Prebuilt rootful and rootless `.deb` files or the prepatched `.ipa`
```sh
git clone https://github.com/revenge-mod/Revenge.git
```
## 📚 Everything else
4. Install dependencies
### 📙 Contributing
```
pnpm i
```
Thank you for considering contributing to Revenge.
You can find the contribution guidelines [here](CONTRIBUTING.md).
5. Build Revenge's code
### 🛠️ Building
```
pnpm build
```
To build Revenge bundle, you can follow the [documentation](/docs).
6. In the newly created `dist` directory, run a HTTP server. I recommend [http-server](https://www.npmjs.com/package/http-server).
7. Go to **Settings** > **Developer** enabled earlier. Enable `Load from custom URL` and input the IP address and port of the server (e.g. `http://192.168.1.236:4040/revenge.js`) in the new input box labeled `Revenge URL`.
8. Restart Discord. Upon reload, you should notice that your device will download Revenge's bundled code from your server, rather than GitHub.
9. Make your changes, rebuild, reload, go wild!
### 📃 Documentation
Alternatively, you can directly *serve* the bundled code by running `pnpm serve`. `revenge.js` will be served on your local address under the port 4040. You will then insert `http://<local ip address>:4040/revenge.js` as a custom URL and reload. Whenever you restart your mobile client, the script will rebuild the bundle as your client fetches it.
You can find the documentation of Revenge bundle [here](/docs).
If the bundle keeps being cached and not updated, you can instead tap the **Settings** > **Developer** > **Clear JS bundle** option which will prompt you to reload.
## 📜 Licence
Revenge bundle is licensed under the 3-Clause BSD license. Please see the [license file](LICENSE) for more information.

View file

@ -0,0 +1,4 @@
<svg width="320" height="320" viewBox="0 0 320 320" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.26979 99H294.723L312.234 215.273C312.723 222.597 310.021 229.993 304.839 235.184L265.514 274.935C260.741 279.717 254.27 283.273 247.514 283.273H182.785C168.723 283.273 152.981 270.126 152.981 256.073V255.61C152.981 250.056 156.895 244.851 160.088 240.605L160.088 240.605L160.288 240.339L75.9944 236.224C73.9944 236.135 69.0077 236.055 62.9899 235.984C43.5233 235.762 27.1144 221.37 24.4033 202.09L8.74994 103.006C8.84706 101.648 9.02178 100.311 9.26979 99ZM84.5458 137.592L139.983 152.446C139.994 152.788 140 153.132 140 153.477C140 170.045 126.568 183.477 110 183.477C93.4314 183.477 79.9999 170.045 79.9999 153.477C79.9999 147.643 81.665 142.198 84.5458 137.592ZM180.019 152.4L235.429 137.553C238.325 142.168 240 147.627 240 153.477C240 170.045 226.568 183.477 210 183.477C193.431 183.477 180 170.045 180 153.477C180 153.116 180.006 152.757 180.019 152.4Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M288.328 82.0258C288.569 83.4188 289.198 84.7073 290.018 85.8593C292.71 89.6425 294.372 94.0776 294.688 98.766L295.899 106.809C296.628 111.647 292.881 116 287.988 116H17.6382C13.7018 116 10.3504 113.136 9.73617 109.248L8.89299 103.911C8.79798 103.31 8.76815 102.697 8.82742 102.091C10.4271 85.7347 23.3039 72.6711 39.7278 70.9082L87.1856 63.328C89.9772 62.8821 92.7967 63.9426 94.6025 66.1175L105.915 79.7431C107.719 81.9152 110.533 82.9759 113.322 82.5343L203.656 68.2267C205.851 67.8792 207.802 66.6347 209.042 64.7913L222.878 44.2296C224.116 42.3892 226.063 41.1457 228.253 40.7958L247.639 37.6994C265.683 35.7705 282.181 48.0371 285.523 65.8683L288.328 82.0258Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -0,0 +1,4 @@
<svg width="320" height="320" viewBox="0 0 320 320" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.26979 99H294.723L312.234 215.273C312.723 222.597 310.021 229.993 304.839 235.184L265.514 274.935C260.741 279.717 254.27 283.273 247.514 283.273H182.785C168.723 283.273 152.981 270.126 152.981 256.073V255.61C152.981 250.056 156.895 244.851 160.088 240.605L160.088 240.605L160.288 240.339L75.9944 236.224C73.9944 236.135 69.0077 236.055 62.9899 235.984C43.5233 235.762 27.1144 221.37 24.4033 202.09L8.74994 103.006C8.84706 101.648 9.02178 100.311 9.26979 99ZM84.5458 137.592L139.983 152.446C139.994 152.788 140 153.132 140 153.477C140 170.045 126.568 183.477 110 183.477C93.4314 183.477 79.9999 170.045 79.9999 153.477C79.9999 147.643 81.665 142.198 84.5458 137.592ZM180.019 152.4L235.429 137.553C238.325 142.168 240 147.627 240 153.477C240 170.045 226.568 183.477 210 183.477C193.431 183.477 180 170.045 180 153.477C180 153.116 180.006 152.757 180.019 152.4Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M288.328 82.0258C288.569 83.4188 289.198 84.7073 290.018 85.8593C292.71 89.6425 294.372 94.0776 294.688 98.766L295.899 106.809C296.628 111.647 292.881 116 287.988 116H17.6382C13.7018 116 10.3504 113.136 9.73617 109.248L8.89299 103.911C8.79798 103.31 8.76815 102.697 8.82742 102.091C10.4271 85.7347 23.3039 72.6711 39.7278 70.9082L87.1856 63.328C89.9772 62.8821 92.7967 63.9426 94.6025 66.1175L105.915 79.7431C107.719 81.9152 110.533 82.9759 113.322 82.5343L203.656 68.2267C205.851 67.8792 207.802 66.6347 209.042 64.7913L222.878 44.2296C224.116 42.3892 226.063 41.1457 228.253 40.7958L247.639 37.6994C265.683 35.7705 282.181 48.0371 285.523 65.8683L288.328 82.0258Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

29
docs/2_building.md Normal file
View file

@ -0,0 +1,29 @@
## Building
1. Install a Revenge loader with config support (any mentioned in the [Installing](#installing) section).
2. Go to **Settings** > **General** and enable **Developer Settings**.
3. Clone the repository
```sh
git clone https://github.com/revenge-mod/revenge-bundle.git
```
4. Install dependencies
```
pnpm i
```
5. Build Revenge's code
```
pnpm build
```
6. In the newly created `dist` directory, run a HTTP server. I recommend [http-server](https://www.npmjs.com/package/http-server).
7. Go to **Settings** > **Developer** enabled earlier. Enable `Load from custom URL` and input the IP address and port of the server (e.g. `http://192.168.1.236:4040/revenge.js`) in the new input box labeled `Revenge URL`.
8. Restart Discord. Upon reload, you should notice that your device will download Revenge's bundled code from your server, rather than GitHub.
9. Make your changes, rebuild, reload, go wild!
Alternatively, you can directly *serve* the bundled code by running `pnpm serve`. `revenge.js` will be served on your local address under the port 4040. You will then insert `http://<local ip address>:4040/revenge.js` as a custom URL and reload. Whenever you restart your mobile client, the script will rebuild the bundle as your client fetches it.
If the bundle keeps being cached and not updated, you can instead tap the **Settings** > **Developer** > **Clear JS bundle** option which will prompt you to reload.

13
docs/README.md Normal file
View file

@ -0,0 +1,13 @@
# 👊 Revenge
This documentation explains how to use [Revenge](https://github.com/revenge-mod/revenge-bundle).
## 📖 Table of contents
TODO.
## ⏭️ Start here
The next page will tell you about the prerequisites for using Revenge.
Continue: [💼 Prerequisites](0_prerequisites.md)

125
eslint.config.mjs Normal file
View file

@ -0,0 +1,125 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import unusedImports from "eslint-plugin-unused-imports";
import importAlias from "eslint-plugin-import-alias";
import tsParser from "@typescript-eslint/parser";
export default [{
ignores: ["**/dist", "**/browser"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint,
"simple-import-sort": simpleImportSort,
"unused-imports": unusedImports,
"import-alias": importAlias,
},
languageOptions: {
parser: tsParser,
},
rules: {
"no-restricted-syntax": ["error", {
selector: "AwaitExpression:not(:function *)",
message: "Hermes does not support top-level await, and SWC cannot transform it.",
}],
quotes: ["error", "double", {
avoidEscape: true,
}],
"jsx-quotes": ["error", "prefer-double"],
"no-mixed-spaces-and-tabs": "error",
indent: ["error", 4, {
SwitchCase: 1,
}],
"arrow-parens": ["error", "as-needed"],
"eol-last": ["error", "always"],
"func-call-spacing": ["error", "never"],
"no-multi-spaces": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
semi: ["error", "always"],
"semi-style": ["error", "last"],
"space-in-parens": ["error", "never"],
"block-spacing": ["error", "always"],
"object-curly-spacing": ["error", "always"],
eqeqeq: ["error", "always", {
null: "ignore",
}],
"spaced-comment": ["error", "always", {
markers: ["!"],
}],
yoda: "error",
"prefer-destructuring": ["error", {
object: true,
array: false,
}],
"operator-assignment": ["error", "always"],
"no-useless-computed-key": "error",
"no-unneeded-ternary": ["error", {
defaultAssignment: false,
}],
"no-invalid-regexp": "error",
"no-constant-condition": ["error", {
checkLoops: false,
}],
"no-duplicate-imports": "error",
"no-extra-semi": "error",
"dot-notation": "error",
"no-useless-escape": ["error"],
"no-fallthrough": "error",
"for-direction": "error",
"no-async-promise-executor": "error",
"no-cond-assign": "error",
"no-dupe-else-if": "error",
"no-duplicate-case": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-prototype-builtins": "error",
"no-regex-spaces": "error",
"no-shadow-restricted-names": "error",
"no-unexpected-multiline": "error",
"no-unsafe-optional-chaining": "error",
"no-useless-backreference": "error",
"use-isnan": "error",
"prefer-const": "error",
"prefer-spread": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"unused-imports/no-unused-imports": "error",
"import-alias/import-alias": ["error", {
relativeDepth: 0,
aliases: [{
alias: "@metro",
matcher: "^src/lib/metro",
}, {
alias: "@core",
matcher: "^src/core",
}, {
alias: "@ui",
matcher: "^src/lib/ui",
}, {
alias: "@types",
matcher: "^src/lib/utils/types.ts",
}, {
alias: "@lib",
matcher: "^src/lib",
}],
}],
},
}];

View file

@ -1,6 +1,8 @@
{
"name": "revenge",
"private": true,
"name": "@revenge-mod/revenge",
"exports": {
"types": "./dist/types/index.d.ts"
},
"author": {
"name": "Revenge Team",
"url": "https://github.com/revenge-mod"
@ -13,39 +15,44 @@
},
"license": "BSD-3-Clause",
"devDependencies": {
"@swc/core": "^1.7.0",
"@swc/helpers": "^0.5.12",
"@types/node": "^20.14.11",
"@saithodev/semantic-release-backmerge": "^4.0.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@swc/core": "^1.7.36",
"@swc/helpers": "^0.5.13",
"@types/node": "^22.7.6",
"@types/yargs-parser": "^21.0.3",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/typescript-estree": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.9.0",
"@typescript-eslint/parser": "^8.9.0",
"@typescript-eslint/typescript-estree": "^8.9.0",
"chalk": "^5.3.0",
"esbuild": "^0.20.2",
"esbuild": "^0.24.0",
"esbuild-plugin-globals": "^0.2.0",
"eslint": "^8.57.0",
"eslint": "^9.12.0",
"eslint-plugin-import-alias": "^1.2.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^3.2.0",
"typescript": "^5.5.3",
"eslint-plugin-unused-imports": "^4.1.4",
"semantic-release": "^24.1.2",
"typescript": "^5.6.3",
"yargs-parser": "^21.1.1"
},
"dependencies": {
"@gullerya/object-observer": "^6.1.3",
"@shopify/react-native-skia": "^1.3.8",
"@tanstack/react-query": "^5.51.16",
"@shopify/react-native-skia": "^1.4.2",
"@tanstack/react-query": "^5.59.15",
"@types/chroma-js": "~2.4.4",
"@types/lodash": "~4.17.7",
"@types/lodash": "~4.17.10",
"@types/react": "18.2.60",
"@types/react-native": "0.72.3",
"es-toolkit": "^1.13.1",
"fuzzysort": "^3.0.2",
"intl-messageformat": "^10.5.14",
"es-toolkit": "^1.25.2",
"fuzzysort": "^3.1.0",
"intl-messageformat": "^10.7.0",
"moment": "2.22.2",
"react-native-reanimated": "^3.6.2",
"react-native-reanimated": "^3.15.5",
"spitroast": "^1.4.4",
"type-fest": "^4.22.1"
"type-fest": "^4.26.1"
},
"pnpm": {
"peerDependencyRules": {

5088
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -41,7 +41,7 @@ export function serve(options) {
server.listen(args.port ?? 4040);
console.info(chalk.bold.yellowBright("Serving Bunny bundle, available on:"));
console.info(chalk.bold.yellowBright("Serving Revenge bundle, available on:"));
const netInterfaces = os.networkInterfaces();
for (const netinterfaces of Object.values(netInterfaces)) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -16,8 +16,8 @@ export default () => <ApplicationCommand>{
execute([ephemeral], ctx) {
const info = getDebugInfo();
const content = [
"**Bunny Debug Info**",
`> Bunny: ${info.bunny.version} (${info.bunny.loader.name} ${info.bunny.loader.version})`,
"**Revenge Debug Info**",
`> Revenge: ${info.bunny.version} (${info.bunny.loader.name} ${info.bunny.loader.version})`,
`> Discord: ${info.discord.version} (${info.discord.build})`,
`> React: ${info.react.version} (RN ${info.react.nativeVersion})`,
`> Hermes: ${info.hermes.version} (bcv${info.hermes.bytecodeVersion})`,

View file

@ -21,7 +21,7 @@ const { showSimpleActionSheet } = lazyDestructure(() => findByProps("showSimpleA
const { openAlert } = lazyDestructure(() => findByProps("openAlert", "dismissAlert"));
const { AlertModal, AlertActionButton } = lazyDestructure(() => findByProps("AlertModal", "AlertActions"));
const RDT_EMBED_LINK = "https://raw.githubusercontent.com/amsyarasyiq/rdt-embedder/main/dist.js";
const RDT_EMBED_LINK = "https://github.com/revenge-mod/react-devtools-core/releases/latest/download/rdtc.js";
const useStyles = createStyles({
leadingText: {

View file

@ -72,7 +72,7 @@ export default function About() {
{
label: Platform.select({ android: Strings.CODENAME, ios: Strings.MACHINE_ID })!,
version: debugInfo.device.codename,
icon: "ic_compose_24px"
icon: "ic_copy_id"
}
];

View file

@ -34,7 +34,7 @@ export async function createVdPluginObject(plugin: VendettaPlugin) {
// Wrapping this with wrapSync is NOT an option.
storage: await createStorage<Record<string, any>>(storage.createMMKVBackend(plugin.id)),
},
logger: new LoggerClass(`Bunny » ${plugin.manifest.name}`),
logger: new DiscordLogger(`Revenge » ${plugin.manifest.name}`),
};
}

View file

@ -98,7 +98,7 @@ export const VdPluginManager = {
// Wrapping this with wrapSync is NOT an option.
storage: await createStorage<Record<string, any>>(createMMKVBackend(plugin.id)),
},
logger: new LoggerClass(`Bunny » ${plugin.manifest.name}`),
logger: new DiscordLogger(`Revenge » ${plugin.manifest.name}`),
};
const pluginString = `vendetta=>{return ${plugin.js}}\n//# sourceURL=${plugin.id}`;

View file

@ -17,9 +17,9 @@ async function initializeBunny() {
console.log(stack ?? e?.toString?.() ?? e);
alert([
"Failed to load Bunny!\n",
"Failed to load Revenge!\n",
`Build Number: ${ClientInfoManager.Build}`,
`Bunny: ${version}`,
`Revenge: ${version}`,
stack || e?.toString?.(),
].join("\n"));
}

View file

@ -68,5 +68,5 @@ export default async () => {
updateFonts();
// We good :)
logger.log("Bunny is ready!");
logger.log("Revenge is ready!");
};

View file

@ -1,4 +1,4 @@
import { Theme } from "@lib/themes";
import { Theme } from "@lib/addons/themes";
import { removeCacheFile } from "./fs";
// @ts-ignore