Compare commits

..

No commits in common. "main" and "vendetta" have entirely different histories.

26 changed files with 589 additions and 139 deletions

View file

@ -1,7 +1,7 @@
name: Build name: Build
on: on:
push: push:
branches: [main] branches: [rewrite]
jobs: jobs:
build: build:
@ -9,23 +9,23 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: https://github.com/actions/checkout@v4 - uses: actions/checkout@v3
with: with:
repository: "revenge-mod/builds" repository: "vendetta-mod/builds"
path: "builds" path: "builds"
token: ${{ secrets.ACTIONS_TOKEN }} token: ${{ secrets.BEEF_TOKEN }}
# TODO: replace with gh equivelants before opening a PR - uses: actions/setup-node@v3
# ssh-key: ${{ secrets.BUILDS_SSH_PRIVKEY }} with:
# ssh-known-hosts: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILzaDn52MW7i6krceJeGIv20XkzVz+VRYS8FWyh+pXhf' node-version: 16
- uses: oven-sh/setup-bun@v1
- name: Install dependencies - name: Install dependencies
run: | run: |
bun i npm i -g pnpm
pnpm i
- name: Build - name: Build
run: bun run build run: pnpm build
- name: Push builds - name: Push builds
run: | run: |
@ -38,8 +38,7 @@ jobs:
git commit -m "Build $GITHUB_SHA" || exit 0 git commit -m "Build $GITHUB_SHA" || exit 0
git push git push
### NOTE: temporarily commented out since we're not on github - name: Purge CDN cache
# - name: Purge CDN cache run: |
# run: | curl https://purge.jsdelivr.net/gh/vendetta-mod/builds
# curl https://purge.jsdelivr.net/gh/vendetta-mod/builds

8
.prettierrc Normal file
View file

@ -0,0 +1,8 @@
{
"printWidth": 240,
"tabWidth": 4,
"singleQuote": false,
"jsxSingleQuote": false,
"bracketSpacing": true,
"useTabs": false
}

1
FUNDING.yml Normal file
View file

@ -0,0 +1 @@
github: [maisymoe, wingio]

View file

@ -1,7 +1,6 @@
BSD 3-Clause License BSD 3-Clause License
Copyright (c) 2023, Team Vendetta Copyright (c) 2023, Team Vendetta
Copyright (c) 2024, Team Revenge
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:

View file

@ -1,51 +1,50 @@
# Revenge
A modification for the Discord Android app. Continuation of [Vendetta](https://github.com/vendetta-mod). Get it? Vendetta is like, revenging..., yeah.
## ⬇️ Installing
> [!NOTE]
> While Revenge is platform-agnostic, there is no guarantee it will always work on iOS. I do not have a device to test the changes I've made, so feel free to report iOS-specific issues in the Issues tab if you encounter one.
<!--1. Install [Vendetta](https://github.com/vendetta-mod/Vendetta)
2. Go to Settings > General and enable Developer Settings
3. Go to Settings > Developer, then enable `Load from custom url` and input `[PLACEHOLDER]`
- If that settings section does not appear, restart the app.
4. Restart the app and check if it says Revenge in the settings--->
Installing is currently not possible yet. Please check back later.
## 💖 Contributing
> [!IMPORTANT] > [!IMPORTANT]
> This project now uses [Bun](https://bun.sh) instead of Node.js. > As of 06/02/24, Vendetta has been discontinued.
> It is **recommended** to use Bun over Node.js because Bun is faster and far better for development.
>
> If you're on Windows, we recommend checking out WSL.
1. Install [Vendetta](https://github.com/vendetta-mod/Vendetta) # Vendetta
A mod for Discord's mobile apps.
1. Go to Settings > General and enable Developer Settings. ## Installing
Vendetta's codebase is platform-agnostic, but you need a platform-specific loader.
2. Clone the repo: ### Android
* Root - [VendettaXposed](https://github.com/vendetta-mod/VendettaXposed/releases/latest)
* Non-root - [VendettaManager](https://github.com/vendetta-mod/VendettaManager/releases/latest)
- Manager not working? No problem! Pre-built APKs are provided [here](https://discord.k6.tf/).
- The minimum Android version required is 9. It will not work any lower.
### iOS
* Jailbroken - [VendettaTweak](https://github.com/vendetta-mod/VendettaTweak)
- You can get prebuilt `.deb` files from GitHub Actions - we support rootful and rootless jailbreaks!
* Jailed - You can get IPAs from [the thread](https://discord.com/channels/1015931589865246730/1087295482667208766) in our [Discord server](https://discord.gg/n9QQ4XhhJP) or from our [host](https://discord.k6.tf/ios/).
- These IPAs do *not* work with AltStore! You should use [Sideloadly](https://sideloadly.io).
## Contributing
1. Install a Vendetta loader with loader config support (any mentioned in the [Installing](#installing) section).
2. Go to Settings > General and enable Developer Settings.
3. Clone the repo:
``` ```
git clone https://github.com/revenge-mod/Revenge git clone https://github.com/vendetta-mod/Vendetta
``` ```
3. Install dependencies: 4. Install dependencies:
``` ```
bun i pnpm i
``` ```
<sup>`npm` or `yarn` should also work.</sup>
4. Build Revenge's code: 5. Build Vendetta's code:
``` ```
bun run build pnpm build
``` ```
<sup>`npm` or `yarn` should also work.</sup>
5. In the newly created `dist` directory, run a HTTP server. We recommend [http-server](https://www.npmjs.com/package/http-server). 6. In the newly created `dist` directory, run a HTTP server. I recommend [http-server](https://www.npmjs.com/package/http-server).
6. Go to Settings > Developer enabled earlier). Enable `Load from custom url` and input the IP address and port of the server (e.g. e.g. `http://192.168.1.236:4040`) in the new input box labelled `VENDETTA URL`. 7. Go to Settings > Developer enabled earlier). Enable `Load from custom url` and input the IP address and port of the server (e.g. e.g. `http://192.168.1.236:4040`) in the new input box labelled `VENDETTA URL`.
7. Restart Discord. Upon reload, you should notice that your device will download Revenge's bundled code from your server, rather than GitHub. 8. Restart Discord. Upon reload, you should notice that your device will download Vendetta's bundled code from your server, rather than GitHub.
8. Make your changes, rebuild, reload, go wild! 9. Make your changes, rebuild, reload, go wild!

View file

@ -1,14 +0,0 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"javascript": {
"formatter": {
"enabled": true,
"bracketSpacing": true,
"indentSize": 4,
"indentStyle": "space",
"jsxQuoteStyle": "double",
"lineWidth": 240,
"quoteStyle": "double"
}
}
}

View file

@ -14,7 +14,7 @@ const commit = (await exec("git rev-parse HEAD")).stdout.trim().substring(0, 7)
try { try {
await build({ await build({
entryPoints: ["./src/entry.ts"], entryPoints: ["./src/entry.ts"],
outfile: "./dist/revenge.js", outfile: "./dist/vendetta.js",
minify: true, minify: true,
bundle: true, bundle: true,
format: "iife", format: "iife",
@ -44,10 +44,10 @@ try {
alias(aliases), alias(aliases),
], ],
define: { define: {
__revengeVersion: `"${commit}"`, __vendettaVersion: `"${commit}"`,
}, },
footer: { footer: {
js: "//# sourceURL=Revenge", js: "//# sourceURL=Vendetta",
}, },
legalComments: "none", legalComments: "none",
}); });

BIN
bun.lockb

Binary file not shown.

View file

@ -1,41 +1,40 @@
{ {
"name": "revenge", "name": "vendetta",
"version": "1.0.0", "version": "1.0.0",
"description": "A modification for the Discord Android app.", "description": "A mod for Discord's mobile apps.",
"scripts": { "scripts": {
"build": "bun run build.mjs" "build": "node build.mjs"
}, },
"keywords": [ "keywords": [
"discord", "discord",
"android", "android",
"ios", "ios",
"react native" "react native"
], ],
"author": "maisymoe", "author": "Beef",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"devDependencies": { "devDependencies": {
"@biomejs/biome": "^1.5.3", "@react-native-clipboard/clipboard": "1.10.0",
"@react-native-clipboard/clipboard": "1.10.0", "@swc/core": "1.3.50",
"@swc/core": "1.3.50", "@types/chroma-js": "^2.4.0",
"@types/chroma-js": "^2.4.0", "@types/lodash": "^4.14.194",
"@types/lodash": "^4.14.194", "@types/react": "18.0.35",
"@types/react": "18.0.35", "@types/react-native": "0.70.6",
"@types/react-native": "0.70.6", "esbuild": "^0.17.16",
"esbuild": "^0.17.16", "esbuild-plugin-alias": "^0.2.1",
"esbuild-plugin-alias": "^0.2.1", "moment": "2.22.2",
"moment": "2.22.2", "typescript": "^5.0.4"
"typescript": "^5.0.4" },
}, "dependencies": {
"dependencies": { "@swc/helpers": "0.5.0",
"@swc/helpers": "0.5.0", "spitroast": "^1.4.3"
"spitroast": "^1.4.3" },
}, "pnpm": {
"pnpm": { "peerDependencyRules": {
"peerDependencyRules": { "ignoreMissing": [
"ignoreMissing": [ "react",
"react", "react-native"
"react-native" ]
] }
} }
}
} }

461
pnpm-lock.yaml Normal file
View file

@ -0,0 +1,461 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@swc/helpers':
specifier: 0.5.0
version: 0.5.0
spitroast:
specifier: ^1.4.3
version: 1.4.3
devDependencies:
'@react-native-clipboard/clipboard':
specifier: 1.10.0
version: 1.10.0
'@swc/core':
specifier: 1.3.50
version: 1.3.50(@swc/helpers@0.5.0)
'@types/chroma-js':
specifier: ^2.4.0
version: 2.4.0
'@types/lodash':
specifier: ^4.14.194
version: 4.14.194
'@types/react':
specifier: 18.0.35
version: 18.0.35
'@types/react-native':
specifier: 0.70.6
version: 0.70.6
esbuild:
specifier: ^0.17.16
version: 0.17.16
esbuild-plugin-alias:
specifier: ^0.2.1
version: 0.2.1
moment:
specifier: 2.22.2
version: 2.22.2
typescript:
specifier: ^5.0.4
version: 5.2.2
packages:
/@esbuild/android-arm64@0.17.16:
resolution: {integrity: sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==}
engines: {node: '>=12'}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: true
optional: true
/@esbuild/android-arm@0.17.16:
resolution: {integrity: sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==}
engines: {node: '>=12'}
cpu: [arm]
os: [android]
requiresBuild: true
dev: true
optional: true
/@esbuild/android-x64@0.17.16:
resolution: {integrity: sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==}
engines: {node: '>=12'}
cpu: [x64]
os: [android]
requiresBuild: true
dev: true
optional: true
/@esbuild/darwin-arm64@0.17.16:
resolution: {integrity: sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@esbuild/darwin-x64@0.17.16:
resolution: {integrity: sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@esbuild/freebsd-arm64@0.17.16:
resolution: {integrity: sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==}
engines: {node: '>=12'}
cpu: [arm64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/@esbuild/freebsd-x64@0.17.16:
resolution: {integrity: sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==}
engines: {node: '>=12'}
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-arm64@0.17.16:
resolution: {integrity: sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-arm@0.17.16:
resolution: {integrity: sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==}
engines: {node: '>=12'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-ia32@0.17.16:
resolution: {integrity: sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==}
engines: {node: '>=12'}
cpu: [ia32]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-loong64@0.17.16:
resolution: {integrity: sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==}
engines: {node: '>=12'}
cpu: [loong64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-mips64el@0.17.16:
resolution: {integrity: sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==}
engines: {node: '>=12'}
cpu: [mips64el]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-ppc64@0.17.16:
resolution: {integrity: sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==}
engines: {node: '>=12'}
cpu: [ppc64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-riscv64@0.17.16:
resolution: {integrity: sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==}
engines: {node: '>=12'}
cpu: [riscv64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-s390x@0.17.16:
resolution: {integrity: sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==}
engines: {node: '>=12'}
cpu: [s390x]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-x64@0.17.16:
resolution: {integrity: sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@esbuild/netbsd-x64@0.17.16:
resolution: {integrity: sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==}
engines: {node: '>=12'}
cpu: [x64]
os: [netbsd]
requiresBuild: true
dev: true
optional: true
/@esbuild/openbsd-x64@0.17.16:
resolution: {integrity: sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==}
engines: {node: '>=12'}
cpu: [x64]
os: [openbsd]
requiresBuild: true
dev: true
optional: true
/@esbuild/sunos-x64@0.17.16:
resolution: {integrity: sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==}
engines: {node: '>=12'}
cpu: [x64]
os: [sunos]
requiresBuild: true
dev: true
optional: true
/@esbuild/win32-arm64@0.17.16:
resolution: {integrity: sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@esbuild/win32-ia32@0.17.16:
resolution: {integrity: sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==}
engines: {node: '>=12'}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@esbuild/win32-x64@0.17.16:
resolution: {integrity: sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@react-native-clipboard/clipboard@1.10.0:
resolution: {integrity: sha512-1L+I0vmeUJgMi8MnNsqI00391/RFLkmmxj9qAuOS2madpvce/oNqJb8Pwk2Fc/uxIJSxOckTpq+dQwyPU6s+7w==}
peerDependencies:
react: '>=16.0'
react-native: '>=0.57.0'
peerDependenciesMeta:
react:
optional: true
react-native:
optional: true
dev: true
/@swc/core-darwin-arm64@1.3.50:
resolution: {integrity: sha512-riJGLORCFOMeUccEV0hzua0iyJFks7kef+5GfcmC93SLno+LHFDnaJ4mKVXcCAmQ7GYhVTPJs9gSHIW2fO5anQ==}
engines: {node: '>=10'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@swc/core-darwin-x64@1.3.50:
resolution: {integrity: sha512-XaAhpeUoAK8tOUYSXH/v35yEjIoSP6ClGV/EaqBmDuCzAPue6uJMlIAW+nTmdtqVm5ZNZy2cKtP4ZHhVlfl7xw==}
engines: {node: '>=10'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm-gnueabihf@1.3.50:
resolution: {integrity: sha512-8hDtXs0T5biMtA3I21JQG1uxL+Hb/D2t0NZENuajVK5Vky3GXmf+ICVeQzwGzSXiyftaDgyNAvBidbKPBlNEtw==}
engines: {node: '>=10'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm64-gnu@1.3.50:
resolution: {integrity: sha512-iS908P5cNTHWus4QefSg2jn4lDYcl15sN1Fvx8fQgqYQra2O9CsR8lXBJYkvllykkzoKvWfcOLRCTquz3vsnVQ==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm64-musl@1.3.50:
resolution: {integrity: sha512-ysh8MeaWjGqVwIPCDUhUOr4oczIx5qb8vFBoegI+SOUfcpWik22/+hG25LWzZY6PwAtqUGkhsJt/+5dY4IMhEA==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-x64-gnu@1.3.50:
resolution: {integrity: sha512-Ci4LQaGIPweWNVWgR2f47nrYEfq7002Pj6WWKGrnO6g+k5cwR3izxHMOnZhcKyAD3cWOS904i/GbfgXs2wBCDQ==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-x64-musl@1.3.50:
resolution: {integrity: sha512-SEXOhGjmC4rdBeucCvNmtO2vflUEhkmWLfqvkalHYDbPMA/gwLSoYu3D85u5XqB8DatDi4TOCUx80IR1b/vDBQ==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-arm64-msvc@1.3.50:
resolution: {integrity: sha512-DPsJ2r9mYU8VzF9vhK323psyE8modj5be9M9diOsqF58Fu9ARtOfuulY+eiS5e41ya2XM/H2N/qOfsA+h2KRcg==}
engines: {node: '>=10'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-ia32-msvc@1.3.50:
resolution: {integrity: sha512-2iyzHLat0C93S3XLp7QJ6RTA9Md+EcPl2fq1S/m2EZqofcq7wu5SuywaXoF89xOibOJBnWe6KwOnOFWFaXrPjQ==}
engines: {node: '>=10'}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-x64-msvc@1.3.50:
resolution: {integrity: sha512-iFRU2Y5DVIEdjaWnlLij8QQBM5Q91UJotNNgzuevPSIOhOyhF6V2AQS1QC4mfkPCy3Bw0GrZDChu3GcuBj9Rzw==}
engines: {node: '>=10'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core@1.3.50(@swc/helpers@0.5.0):
resolution: {integrity: sha512-soTAHlwkI8zukR9KftWZ0gZ7HKU99B/C3CtBxzSI3N23QG+EfSSOgrYARfuZk5g4yLWpsU0rEkojd78vixqkwg==}
engines: {node: '>=10'}
requiresBuild: true
peerDependencies:
'@swc/helpers': ^0.5.0
peerDependenciesMeta:
'@swc/helpers':
optional: true
dependencies:
'@swc/helpers': 0.5.0
optionalDependencies:
'@swc/core-darwin-arm64': 1.3.50
'@swc/core-darwin-x64': 1.3.50
'@swc/core-linux-arm-gnueabihf': 1.3.50
'@swc/core-linux-arm64-gnu': 1.3.50
'@swc/core-linux-arm64-musl': 1.3.50
'@swc/core-linux-x64-gnu': 1.3.50
'@swc/core-linux-x64-musl': 1.3.50
'@swc/core-win32-arm64-msvc': 1.3.50
'@swc/core-win32-ia32-msvc': 1.3.50
'@swc/core-win32-x64-msvc': 1.3.50
dev: true
/@swc/helpers@0.5.0:
resolution: {integrity: sha512-SjY/p4MmECVVEWspzSRpQEM3sjR17sP8PbGxELWrT+YZMBfiUyt1MRUNjMV23zohwlG2HYtCQOsCwsTHguXkyg==}
dependencies:
tslib: 2.6.2
/@types/chroma-js@2.4.0:
resolution: {integrity: sha512-JklMxityrwjBTjGY2anH8JaTx3yjRU3/sEHSblLH1ba5lqcSh1LnImXJZO5peJfXyqKYWjHTGy4s5Wz++hARrw==}
dev: true
/@types/lodash@4.14.194:
resolution: {integrity: sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==}
dev: true
/@types/prop-types@15.7.5:
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
dev: true
/@types/react-native@0.70.6:
resolution: {integrity: sha512-ynQ2jj0km9d7dbnyKqVdQ6Nti7VQ8SLTA/KKkkS5+FnvGyvij2AOo1/xnkBR/jnSNXuzrvGVzw2n0VWfppmfKw==}
dependencies:
'@types/react': 18.0.35
dev: true
/@types/react@18.0.35:
resolution: {integrity: sha512-6Laome31HpetaIUGFWl1VQ3mdSImwxtFZ39rh059a1MNnKGqBpC88J6NJ8n/Is3Qx7CefDGLgf/KhN/sYCf7ag==}
dependencies:
'@types/prop-types': 15.7.5
'@types/scheduler': 0.16.3
csstype: 3.1.2
dev: true
/@types/scheduler@0.16.3:
resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==}
dev: true
/csstype@3.1.2:
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
dev: true
/esbuild-plugin-alias@0.2.1:
resolution: {integrity: sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==}
dev: true
/esbuild@0.17.16:
resolution: {integrity: sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
optionalDependencies:
'@esbuild/android-arm': 0.17.16
'@esbuild/android-arm64': 0.17.16
'@esbuild/android-x64': 0.17.16
'@esbuild/darwin-arm64': 0.17.16
'@esbuild/darwin-x64': 0.17.16
'@esbuild/freebsd-arm64': 0.17.16
'@esbuild/freebsd-x64': 0.17.16
'@esbuild/linux-arm': 0.17.16
'@esbuild/linux-arm64': 0.17.16
'@esbuild/linux-ia32': 0.17.16
'@esbuild/linux-loong64': 0.17.16
'@esbuild/linux-mips64el': 0.17.16
'@esbuild/linux-ppc64': 0.17.16
'@esbuild/linux-riscv64': 0.17.16
'@esbuild/linux-s390x': 0.17.16
'@esbuild/linux-x64': 0.17.16
'@esbuild/netbsd-x64': 0.17.16
'@esbuild/openbsd-x64': 0.17.16
'@esbuild/sunos-x64': 0.17.16
'@esbuild/win32-arm64': 0.17.16
'@esbuild/win32-ia32': 0.17.16
'@esbuild/win32-x64': 0.17.16
dev: true
/moment@2.22.2:
resolution: {integrity: sha512-LRvkBHaJGnrcWvqsElsOhHCzj8mU39wLx5pQ0pc6s153GynCTsPdGdqsVNKAQD9sKnWj11iF7TZx9fpLwdD3fw==}
dev: true
/spitroast@1.4.3:
resolution: {integrity: sha512-JdkzAy2tT82ahx+eEtM5ohBeHICqFln/Yzo+vPGnE5sX1LYgPHCU2qcaSIJfR/xNrhI0q+ftwFz0H2aJysv3EA==}
dev: false
/tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
/typescript@5.2.2:
resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==}
engines: {node: '>=14.17'}
hasBin: true
dev: true

6
src/def.d.ts vendored
View file

@ -486,7 +486,7 @@ interface VendettaObject {
}; };
storage: { storage: {
createProxy: <T>(target: T) => { proxy: T, emitter: Emitter }; createProxy: <T>(target: T) => { proxy: T, emitter: Emitter };
useProxy: <T>(storage: T & { [key: symbol]: any }) => T; useProxy: <T>(storage: T) => T;
createStorage: <T>(backend: StorageBackend) => Promise<Awaited<T>>; createStorage: <T>(backend: StorageBackend) => Promise<Awaited<T>>;
wrapSync: <T extends Promise<any>>(store: T) => Awaited<T>; wrapSync: <T extends Promise<any>>(store: T) => Awaited<T>;
awaitSyncWrapper: (store: any) => Promise<void>; awaitSyncWrapper: (store: any) => Promise<void>;
@ -511,10 +511,10 @@ interface VendettaPluginObject {
declare global { declare global {
type React = typeof _React; type React = typeof _React;
const __revengeVersion: string; const __vendettaVersion: string;
interface Window { interface Window {
[key: Exclude<PropertyKey, number>]: any; [key: PropertyKey]: any;
modules: MetroModules; modules: MetroModules;
vendetta: VendettaObject; vendetta: VendettaObject;
React: typeof _React; React: typeof _React;

View file

@ -1,7 +1,7 @@
import { ClientInfoManager } from "@lib/native"; import { ClientInfoManager } from "@lib/native";
// This logs in the native logging implementation, e.g. logcat // This logs in the native logging implementation, e.g. logcat
console.log("Hello from Revenge!"); console.log("Hello from Vendetta!");
// Make 'freeze' and 'seal' do nothing // Make 'freeze' and 'seal' do nothing
Object.freeze = Object; Object.freeze = Object;
@ -10,10 +10,9 @@ Object.seal = Object;
import(".").then((m) => m.default()).catch((e) => { import(".").then((m) => m.default()).catch((e) => {
console.log(e?.stack ?? e.toString()); console.log(e?.stack ?? e.toString());
alert([ alert([
"Failed to load Revenge!\n", "Failed to load Vendetta!\n",
`Build Number: ${ClientInfoManager.Build}`, `Build Number: ${ClientInfoManager.Build}`,
// TODO: Rename this `Vendetta: ${__vendettaVersion}`,
`Revenge: ${__revengeVersion}`,
e?.stack || e.toString(), e?.stack || e.toString(),
].join("\n")); ].join("\n"));
}); });

View file

@ -30,5 +30,5 @@ export default async () => {
unloads.push(await initPlugins()); unloads.push(await initPlugins());
// We good :) // We good :)
logger.log("Revenge is ready!"); logger.log("Vendetta is ready!");
} }

View file

@ -1,9 +1,8 @@
// TODO: Replace links and constants with actual values
export const DISCORD_SERVER = "https://discord.gg/n9QQ4XhhJP"; export const DISCORD_SERVER = "https://discord.gg/n9QQ4XhhJP";
export const DISCORD_SERVER_ID = "1015931589865246730"; export const DISCORD_SERVER_ID = "1015931589865246730";
export const PLUGINS_CHANNEL_ID = "1091880384561684561"; export const PLUGINS_CHANNEL_ID = "1091880384561684561";
export const THEMES_CHANNEL_ID = "1091880434939482202"; export const THEMES_CHANNEL_ID = "1091880434939482202";
export const GITHUB = "https://github.com/revenge-mod"; export const GITHUB = "https://github.com/vendetta-mod";
export const PROXY_PREFIX = "https://vd-plugins.github.io/proxy"; export const PROXY_PREFIX = "https://vd-plugins.github.io/proxy";
export const HTTP_REGEX = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/; export const HTTP_REGEX = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/;
export const HTTP_REGEX_MULTI = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g; export const HTTP_REGEX_MULTI = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g;

View file

@ -59,7 +59,7 @@ export function patchLogHook() {
} }
} }
export const versionHash: string = __revengeVersion; export const versionHash: string = __vendettaVersion;
export function getDebugInfo() { export function getDebugInfo() {
// Hermes // Hermes

View file

@ -2,6 +2,6 @@ import { Logger } from "@types";
import { findByProps } from "@metro/filters"; import { findByProps } from "@metro/filters";
export const logModule = findByProps("setLogFn").default; export const logModule = findByProps("setLogFn").default;
const logger: Logger = new logModule("Revenge"); const logger: Logger = new logModule("Vendetta");
export default logger; export default logger;

View file

@ -40,6 +40,6 @@ if (window.__vendetta_loader?.features.themes) {
try { try {
initThemes(); initThemes();
} catch (e) { } catch (e) {
console.error("[Revenge] Failed to initialize themes...", e); console.error("[Vendetta] Failed to initialize themes...", e);
} }
} }

View file

@ -81,7 +81,7 @@ export function useProxy<T>(storage: T & { [key: symbol]: any }): T {
return storage; return storage;
} }
export async function createStorage<T>(backend: StorageBackend): Promise<Awaited<T & { [key: symbol]: any }>> { export async function createStorage<T>(backend: StorageBackend): Promise<Awaited<T>> {
const data = await backend.get(); const data = await backend.get();
const { proxy, emitter } = createProxy(data); const { proxy, emitter } = createProxy(data);

View file

@ -43,7 +43,7 @@ export default async (unloads: any[]): Promise<VendettaObject> => ({
version: debug.versionHash, version: debug.versionHash,
unload: () => { unload: () => {
unloads.filter(i => typeof i === "function").forEach(p => p()); unloads.filter(i => typeof i === "function").forEach(p => p());
// @ts-expect-error On unload, nothing would be using this // @ts-expect-error explode
delete window.vendetta; delete window.vendetta;
}, },
}); });

View file

@ -9,6 +9,7 @@ const styles = stylesheet.createThemedStyleSheet({
margin: 0, margin: 0,
padding: 0, padding: 0,
borderBottomWidth: 0, borderBottomWidth: 0,
background: "none",
backgroundColor: "none", backgroundColor: "none",
} }
}); });

View file

@ -15,7 +15,7 @@ export default function SettingsSection() {
return ( return (
<ErrorBoundary> <ErrorBoundary>
<FormSection key="Revenge" title={`Revenge${settings.safeMode?.enabled ? " (Safe Mode)" : ""}`}> <FormSection key="Vendetta" title={`Vendetta${settings.safeMode?.enabled ? " (Safe Mode)" : ""}`}>
{screens.map((s, i) => ( {screens.map((s, i) => (
<> <>
<FormRow <FormRow

View file

@ -34,13 +34,13 @@ const keyMap = (screens: Screen[], data: string | ((s: Screen) => any) | null) =
export const getScreens = (youKeys = false): Screen[] => [ export const getScreens = (youKeys = false): Screen[] => [
{ {
key: formatKey("RevengeSettings", youKeys), key: formatKey("VendettaSettings", youKeys),
title: "General", title: "General",
icon: "settings", icon: "settings",
render: General, render: General,
}, },
{ {
key: formatKey("RevengePlugins", youKeys), key: formatKey("VendettaPlugins", youKeys),
title: "Plugins", title: "Plugins",
icon: "debug", icon: "debug",
options: { options: {
@ -51,7 +51,7 @@ export const getScreens = (youKeys = false): Screen[] => [
if (!input.startsWith(PROXY_PREFIX) && !settings.developerSettings) if (!input.startsWith(PROXY_PREFIX) && !settings.developerSettings)
setImmediate(() => showConfirmationAlert({ setImmediate(() => showConfirmationAlert({
title: "Unproxied Plugin", title: "Unproxied Plugin",
content: "The plugin you are trying to install has not been verified by Revenge staff. Are you sure you want to continue?", content: "The plugin you are trying to install has not been proxied/verified by Vendetta staff. Are you sure you want to continue?",
confirmText: "Install", confirmText: "Install",
onConfirm: () => onConfirm: () =>
installPlugin(input) installPlugin(input)
@ -67,7 +67,7 @@ export const getScreens = (youKeys = false): Screen[] => [
render: Plugins, render: Plugins,
}, },
{ {
key: formatKey("RevengeThemes", youKeys), key: formatKey("VendettaThemes", youKeys),
title: "Themes", title: "Themes",
icon: "ic_theme_24px", icon: "ic_theme_24px",
// TODO: bad // TODO: bad
@ -78,7 +78,7 @@ export const getScreens = (youKeys = false): Screen[] => [
render: Themes, render: Themes,
}, },
{ {
key: formatKey("RevengeDeveloper", youKeys), key: formatKey("VendettaDeveloper", youKeys),
title: "Developer", title: "Developer",
icon: "ic_progress_wrench_24px", icon: "ic_progress_wrench_24px",
shouldRender: () => settings.developerSettings ?? false, shouldRender: () => settings.developerSettings ?? false,
@ -86,7 +86,7 @@ export const getScreens = (youKeys = false): Screen[] => [
}, },
{ {
key: formatKey("VendettaCustomPage", youKeys), key: formatKey("VendettaCustomPage", youKeys),
title: "Revenge Page", title: "Vendetta Page",
shouldRender: () => false, shouldRender: () => false,
render: ({ render: PageView, noErrorBoundary, ...options }: { render: React.ComponentType; noErrorBoundary: boolean } & Record<string, object>) => { render: ({ render: PageView, noErrorBoundary, ...options }: { render: React.ComponentType; noErrorBoundary: boolean } & Record<string, object>) => {
const navigation = NavigationNative.useNavigation(); const navigation = NavigationNative.useNavigation();
@ -110,8 +110,8 @@ export const getYouData = () => {
return { return {
getLayout: () => ({ getLayout: () => ({
title: "Revenge", title: "Vendetta",
label: "Revenge", label: "Vendetta",
// We can't use our keyMap function here since `settings` is an array not an object // We can't use our keyMap function here since `settings` is an array not an object
settings: getRenderableScreens(true).map(s => s.key) settings: getRenderableScreens(true).map(s => s.key)
}), }),

View file

@ -48,7 +48,7 @@ export default function Developer() {
{window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config"> {window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config">
<FormSwitchRow <FormSwitchRow
label="Load from custom url" label="Load from custom url"
subLabel={"Load Revenge from a custom endpoint."} subLabel={"Load Vendetta from a custom endpoint."}
leading={<FormRow.Icon source={getAssetIDByName("copy")} />} leading={<FormRow.Icon source={getAssetIDByName("copy")} />}
value={loaderConfig.customLoadUrl.enabled} value={loaderConfig.customLoadUrl.enabled}
onValueChange={(v: boolean) => { onValueChange={(v: boolean) => {
@ -60,8 +60,8 @@ export default function Developer() {
<FormInput <FormInput
value={loaderConfig.customLoadUrl.url} value={loaderConfig.customLoadUrl.url}
onChange={(v: string) => loaderConfig.customLoadUrl.url = v} onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
placeholder="http://localhost:4040/revenge.js" placeholder="http://localhost:4040/vendetta.js"
title="REVENGE URL" title="VENDETTA URL"
/> />
<FormDivider /> <FormDivider />
</>} </>}
@ -100,7 +100,7 @@ export default function Developer() {
options: [ options: [
// @ts-expect-error // @ts-expect-error
// Of course, to trigger an error, we need to do something incorrectly. The below will do! // Of course, to trigger an error, we need to do something incorrectly. The below will do!
{ label: "Revenge", onPress: () => navigation.push("VendettaCustomPage", { render: () => <undefined /> }) }, { label: "Vendetta", onPress: () => navigation.push("VendettaCustomPage", { render: () => <undefined /> }) },
{ label: "Discord", isDestructive: true, onPress: () => navigation.push("VendettaCustomPage", { noErrorBoundary: true }) }, { label: "Discord", isDestructive: true, onPress: () => navigation.push("VendettaCustomPage", { noErrorBoundary: true }) },
], ],
})} })}

View file

@ -16,7 +16,7 @@ export default function General() {
const versions = [ const versions = [
{ {
label: "Revenge", label: "Vendetta",
version: debugInfo.vendetta.version, version: debugInfo.vendetta.version,
icon: "ic_progress_wrench_24px", icon: "ic_progress_wrench_24px",
}, },

View file

@ -44,7 +44,7 @@ function oldYouPatch(patches: Function[]) {
ancestorRendererData: data.rendererConfigs[s.key], ancestorRendererData: data.rendererConfigs[s.key],
setting: s.key, setting: s.key,
title: data.titleConfig[s.key], title: data.titleConfig[s.key],
breadcrumbs: ["Revenge"], breadcrumbs: ["Vendetta"],
icon: data.rendererConfigs[s.key].icon, icon: data.rendererConfigs[s.key].icon,
})), })),
// .filter can be removed when dropping support for 189.3 and below (unless Discord changes things again) // .filter can be removed when dropping support for 189.3 and below (unless Discord changes things again)
@ -78,7 +78,7 @@ function newYouPatch(patches: Function[]) {
patches.push(before("type", settingsListComponents.SearchableSettingsList, ([{ sections }]) => manipulateSections(sections, data.getLayout()))); patches.push(before("type", settingsListComponents.SearchableSettingsList, ([{ sections }]) => manipulateSections(sections, data.getLayout())));
patches.push(after("getSettingListSearchResultItems", gettersModule, (_, ret) => { patches.push(after("getSettingListSearchResultItems", gettersModule, (_, ret) => {
ret.forEach((s: any) => screens.some(b => b.key === s.setting) && (s.breadcrumbs = ["Revenge"])) ret.forEach((s: any) => screens.some(b => b.key === s.setting) && (s.breadcrumbs = ["Vendetta"]))
})); }));
const oldRendererConfig = settingConstantsModule.SETTING_RENDERER_CONFIG; const oldRendererConfig = settingConstantsModule.SETTING_RENDERER_CONFIG;
@ -94,7 +94,7 @@ function newYouPatch(patches: Function[]) {
const isLabel = (i: any, name: string) => i?.label === name || i?.title === name; const isLabel = (i: any, name: string) => i?.label === name || i?.title === name;
function manipulateSections(sections: any[], layout: any) { function manipulateSections(sections: any[], layout: any) {
if (!Array.isArray(sections) || sections.find((i: any) => isLabel(i, "Revenge"))) return; if (!Array.isArray(sections) || sections.find((i: any) => isLabel(i, "Vendetta"))) return;
// Add our settings // Add our settings
const accountSettingsIndex = sections.findIndex((i: any) => isLabel(i, i18n.Messages.ACCOUNT_SETTINGS)); const accountSettingsIndex = sections.findIndex((i: any) => isLabel(i, i18n.Messages.ACCOUNT_SETTINGS));

View file

@ -12,7 +12,6 @@
"strict": true, "strict": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"skipLibCheck": true,
"paths": { "paths": {
"@/*": ["src/*"], "@/*": ["src/*"],
"@types": ["src/def.d.ts"], "@types": ["src/def.d.ts"],