Compare commits

...

11 commits

Author SHA1 Message Date
027db6fc8d
ci: modify for revenge builds
Some checks failed
Build / Build and push (push) Failing after 49s
2024-02-10 13:14:26 +01:00
Palm
0755af9366
chore(README): add contributing section 2024-02-10 10:42:47 +07:00
PalmDevs
f2916d4b79
fix: restore compatibility of plugins that have custom pages 2024-02-09 23:55:36 +07:00
PalmDevs
094ff7c879
chore!: rename __vendettaVersion constant to __revengeVersion 2024-02-09 02:04:56 +07:00
PalmDevs
e5d834fdbc
chore(README): update with more info 2024-02-09 02:01:36 +07:00
PalmDevs
aa4bd693bd
fix(ui/components/Search): type error with unnecessary property 2024-02-09 02:01:35 +07:00
PalmDevs
b7e329ad9f
fix: fix multiple type errors 2024-02-09 02:01:22 +07:00
PalmDevs
d0b9d63d12
chore: remove instances of Vendetta in places
This hopefully shouldn't break things, unless some kind of plugin depend on finding stuff with the string `Vendetta`. That is a very bad practice though
2024-02-09 02:01:21 +07:00
PalmDevs
6728bb9270
chore(README): update info 2024-02-09 02:00:35 +07:00
PalmDevs
6558cb3521
chore: switch to biome instead of prettier 2024-02-08 23:15:47 +07:00
PalmDevs
a573c3943f
chore: switch to bun pm 2024-02-08 23:15:18 +07:00
26 changed files with 139 additions and 589 deletions

View file

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

View file

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

View file

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

View file

@ -1,6 +1,7 @@
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,50 +1,51 @@
# 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]
> As of 06/02/24, Vendetta has been discontinued. > This project now uses [Bun](https://bun.sh) instead of Node.js.
> 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.
# Vendetta 1. Install [Vendetta](https://github.com/vendetta-mod/Vendetta)
A mod for Discord's mobile apps.
## Installing 1. Go to Settings > General and enable Developer Settings.
Vendetta's codebase is platform-agnostic, but you need a platform-specific loader.
### Android 2. Clone the repo:
* 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/vendetta-mod/Vendetta git clone https://github.com/revenge-mod/Revenge
``` ```
4. Install dependencies: 3. Install dependencies:
``` ```
pnpm i bun i
``` ```
<sup>`npm` or `yarn` should also work.</sup>
5. Build Vendetta's code: 4. Build Revenge's code:
``` ```
pnpm build bun run build
``` ```
<sup>`npm` or `yarn` should also work.</sup>
6. In the newly created `dist` directory, run a HTTP server. I recommend [http-server](https://www.npmjs.com/package/http-server). 5. In the newly created `dist` directory, run a HTTP server. We 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. e.g. `http://192.168.1.236:4040`) in the new input box labelled `VENDETTA URL`. 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`.
8. Restart Discord. Upon reload, you should notice that your device will download Vendetta's bundled code from your server, rather than GitHub. 7. 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! 8. Make your changes, rebuild, reload, go wild!

14
biome.json Normal file
View file

@ -0,0 +1,14 @@
{
"$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/vendetta.js", outfile: "./dist/revenge.js",
minify: true, minify: true,
bundle: true, bundle: true,
format: "iife", format: "iife",
@ -44,10 +44,10 @@ try {
alias(aliases), alias(aliases),
], ],
define: { define: {
__vendettaVersion: `"${commit}"`, __revengeVersion: `"${commit}"`,
}, },
footer: { footer: {
js: "//# sourceURL=Vendetta", js: "//# sourceURL=Revenge",
}, },
legalComments: "none", legalComments: "none",
}); });

BIN
bun.lockb Executable file

Binary file not shown.

View file

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

View file

@ -1,461 +0,0 @@
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) => T; useProxy: <T>(storage: T & { [key: symbol]: any }) => 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 __vendettaVersion: string; const __revengeVersion: string;
interface Window { interface Window {
[key: PropertyKey]: any; [key: Exclude<PropertyKey, number>]: 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 Vendetta!"); console.log("Hello from Revenge!");
// Make 'freeze' and 'seal' do nothing // Make 'freeze' and 'seal' do nothing
Object.freeze = Object; Object.freeze = Object;
@ -10,9 +10,10 @@ 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 Vendetta!\n", "Failed to load Revenge!\n",
`Build Number: ${ClientInfoManager.Build}`, `Build Number: ${ClientInfoManager.Build}`,
`Vendetta: ${__vendettaVersion}`, // TODO: Rename this
`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("Vendetta is ready!"); logger.log("Revenge is ready!");
} }

View file

@ -1,8 +1,9 @@
// 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/vendetta-mod"; export const GITHUB = "https://github.com/revenge-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 = __vendettaVersion; export const versionHash: string = __revengeVersion;
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("Vendetta"); const logger: Logger = new logModule("Revenge");
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("[Vendetta] Failed to initialize themes...", e); console.error("[Revenge] 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>> { export async function createStorage<T>(backend: StorageBackend): Promise<Awaited<T & { [key: symbol]: any }>> {
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 explode // @ts-expect-error On unload, nothing would be using this
delete window.vendetta; delete window.vendetta;
}, },
}); });

View file

@ -9,7 +9,6 @@ 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="Vendetta" title={`Vendetta${settings.safeMode?.enabled ? " (Safe Mode)" : ""}`}> <FormSection key="Revenge" title={`Revenge${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("VendettaSettings", youKeys), key: formatKey("RevengeSettings", youKeys),
title: "General", title: "General",
icon: "settings", icon: "settings",
render: General, render: General,
}, },
{ {
key: formatKey("VendettaPlugins", youKeys), key: formatKey("RevengePlugins", 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 proxied/verified by Vendetta staff. Are you sure you want to continue?", content: "The plugin you are trying to install has not been verified by Revenge 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("VendettaThemes", youKeys), key: formatKey("RevengeThemes", 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("VendettaDeveloper", youKeys), key: formatKey("RevengeDeveloper", 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: "Vendetta Page", title: "Revenge 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: "Vendetta", title: "Revenge",
label: "Vendetta", label: "Revenge",
// 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 Vendetta from a custom endpoint."} subLabel={"Load Revenge 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/vendetta.js" placeholder="http://localhost:4040/revenge.js"
title="VENDETTA URL" title="REVENGE 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: "Vendetta", onPress: () => navigation.push("VendettaCustomPage", { render: () => <undefined /> }) }, { label: "Revenge", 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: "Vendetta", label: "Revenge",
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: ["Vendetta"], breadcrumbs: ["Revenge"],
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 = ["Vendetta"])) ret.forEach((s: any) => screens.some(b => b.key === s.setting) && (s.breadcrumbs = ["Revenge"]))
})); }));
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, "Vendetta"))) return; if (!Array.isArray(sections) || sections.find((i: any) => isLabel(i, "Revenge"))) 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,6 +12,7 @@
"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"],